TwoVariableRelation Package is intended to establish the relationship between two features of the dataset.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file TwoVariableRelation-0.2.tar.gz.
File metadata
- Download URL: TwoVariableRelation-0.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b98d635f0116c2e9bd97fcebbb31dc5810806413834e8429e47da82b522eb7ed
|
|
| MD5 |
5e275f5969916d8d4566674dfc84dd0d
|
|
| BLAKE2b-256 |
1e2e02a2a2dd67ad920438d00de508bed74575289cc42729cec2b091103f23aa
|
File details
Details for the file TwoVariableRelation-0.2-py3-none-any.whl.
File metadata
- Download URL: TwoVariableRelation-0.2-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6052c1b2aa6309c81b017c125c7ef5b01682b22a85801fe13155223271862ce2
|
|
| MD5 |
955a717a92fd0fac778c0ea9d3a8a793
|
|
| BLAKE2b-256 |
d658653761965d12fb8cffe7156b915027db6074133b036424012ed68c28f6d8
|