For selecting the optimal features using the stepwise algorithm
Project description
Stepwise Selection
Select the optimal features in a dataset using the stepwise method.
Instructions
- Install:
pip install Selection_Method
- Plug in your train and test dataset, and your preferred algorithm.
Forward_Stepwise
from Selection_Method.Forward_Stepwise import forward_stepwise
initialize forward_stepwise object, inputting your already split train and test dataframes, and your already created regression model object.
selection = forward_stepwise(x_train, x_test, y_train, y_test, linear_model)
select the best features using the stepwise algorithm through the .select() method.
final_list, final_score = selection.select()
Backward_Stepwise
from Selection_Method.Backward_Stepwise import backward_stepwise
initialize backward_stepwise object, inputting your already split train and test dataframes, and your already created regression model object.
selection = backard_stepwise(x_train, x_test, y_train, y_test, linear_model)
select the best features using the stepwise algorithm through the .select() method.
final_list, final_score = selection.select()
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
Selection_Method-0.0.2.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for Selection_Method-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0009257e25ab1c3ffa68277ddf5a9abee52abc33cfcb48e4e10fc1f71d8acceb |
|
MD5 | a912a19bc6f32dc45e745b86a266a8f2 |
|
BLAKE2b-256 | 3842b8fab9fc1f6e1e5374a98cd10ba6fc1f7e1d5661be44cb0b259c89eff434 |