TwoVariableRelation
TwoVariableRelation Package is intended to establish the relationship between two features of the dataset.It starts with performing multivariate outlier detection on those two features of a dataset to remove outliers based on density and distance.Further,it divides the dataset into train-test(70:30), fits polynomial models on training data up to polynomial degree based on input given by the user.Capturing all inputs, it recommends the best model based on train RMSE and test accuracy.
Installation
Dependencies
TwoVariableRelation Package requires:
- Numpy
- Pandas
- Scikit-learn
- Scipy
User Installation
Use the package manager pip to install TwoVariableRelation.
pip install TwoVariableRelation
Usage
import TwoVariableRelation
# Returns table with metrices(RMSE,Rsquare and Accuracy) for polynomial model from degree (0-N) and recommends the best model.
TwoVariableRelation.polynomial_model(N,X,Y)
where:
N=Maximum degree to consider for training a polynomial model.
X=Pandas series of Independent Variable.
Y=Pandas series of Dependent Variable.
Result
Following is the result generated when package is called with below mentioned argument on the dataset:
TwoVariableRelation.polynomial_model(3,X=df.iloc[:,0],Y=df.iloc[:,1])
| Order | Train RMSE | Test RMSE | Train Rsquare | Test Rsquare | Test Accuracy |
|---|---|---|---|---|---|
| 0 | 9.829 | 10.534 | 0.000 | -0.179 | 75.595% |
| 1 | 9.489 | 9.103 | 0.068 | 0.120 | 74.737% |
| 2 | 9.463 | 8.627 | 0.073 | 0.210 | 76.590% |
| 3 | 9.463 | 8.640 | 0.073 | 0.207 | 76.607% |
Model is best fitted at polynomial degree 3
*Accuracy is calculated with following formula:
Accuracy=[1-[abs[(sum of actual Y_test)-(sum of predicted Y_test)]/Sum of actual Y_test]]*100
License
Release files for TwoVariableRelation 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| TwoVariableRelation-0.2.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| TwoVariableRelation-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / TwoVariableRelation-0.2.tar.gz
| Download URL | TwoVariableRelation-0.2.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b98d635f0116c2e9bd97fcebbb31dc5810806413834e8429e47da82b522eb7ed
|
|
BLAKE2b-256 checksum How to use checksums |
1e2e02a2a2dd67ad920438d00de508bed74575289cc42729cec2b091103f23aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Release files / TwoVariableRelation-0.2-py3-none-any.whl
| Download URL | TwoVariableRelation-0.2-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6052c1b2aa6309c81b017c125c7ef5b01682b22a85801fe13155223271862ce2
|
|
BLAKE2b-256 checksum How to use checksums |
d658653761965d12fb8cffe7156b915027db6074133b036424012ed68c28f6d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|