Linear-Regression-Automation
Project description
automate_LinearRegression
-
This package is specific to build a Linear Regeression model on the dataset passed as the parameter with its features as well as label to be regressed against. And as such, it is presumed that the analysis and the feature engineering has already been done on the dataset.
-
This package will standardize the data via StandardScaler() so that all features can be on the same scale and obviously so that the model optimization could increase.
-
Accuracy of the model built by this package is computed using
adjusted R-squared
. -
User will also have the flexibility of building the model with regularization modes viz.
Lasso (L1
,Ridge (L2)
andElasticNet
and to compare their accuracies accordingly.
An Example of How to Use:
from automate_LinearRegression import automate_linReg
df # the dataset you want to build the model of
features # df's features
label # df's label
linear_model = automate_linReg(df, features, label)
linear_model.split(testSize = 0.15) # first and foremost step is to split the features and label into train and test subdata
linear_model.build()
print(linear_model.accuracy()) # will print the accuracy computed using adjusted R-squared
# should the user desires to build the model using regularization
linear_model.buildLasso() # or linear_model.buildRidge() or linear_model.buildElasticNet()
print(linear_model.accuracy(mode="L1")) # or mode="L2" or mode="Elastic"
linear_model.predict(test_input, mode="L1") # to yield the prediction outcome
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
Close
Hashes for automate_LinearRegression-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9740612724be469f3c990d56bf35b61abe9f5db980021a0ef4764414544b1cbf |
|
MD5 | 952e60ba3e4111910647874e5ef776d3 |
|
BLAKE2b-256 | 3e10610cb273025e8c6259fa05c6de27138bcc184cf7301f639a1ccc775ab47e |
Close
Hashes for automate_LinearRegression-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3456067e416fc5653a0b32245c5f617d5826d1ca8a205a8cc0ffb02fdf1ca84f |
|
MD5 | a63655cc8eee95d9037c91eb7ec293ec |
|
BLAKE2b-256 | ad3d6b94cd884d46a929a002c1c06cb0728dfe69793d870cdb9d7c690958e9a5 |