trying Stratified Kfold split on running multiple pipelines
This commit is contained in:
parent
bb8f6f70ba
commit
1bfb35c30c
7 changed files with 287 additions and 72 deletions
24
my_data9.py
24
my_data9.py
|
@ -7,12 +7,6 @@ Created on Sat Mar 5 12:57:32 2022
|
|||
"""
|
||||
#%%
|
||||
# data, etc for now comes from my_data6.py and/or my_data5.py
|
||||
#%%
|
||||
homedir = os.path.expanduser("~")
|
||||
os.chdir(homedir + "/git/ML_AI_training/")
|
||||
|
||||
# my function
|
||||
from MultClassPipe2 import MultClassPipeline2
|
||||
#%% try combinations
|
||||
#import sys, os
|
||||
#os.system("imports.py")
|
||||
|
@ -130,5 +124,21 @@ pipeline = Pipeline(steps=[('prep', col_transform)
|
|||
, ('classifier', LogisticRegression())])
|
||||
#%% Added this to the MultClassPipeline
|
||||
|
||||
tN_res = MultClassPipeline(X_trainN, X_testN, y_trainN, y_testN)
|
||||
tN_res
|
||||
|
||||
t2_res = MultClassPipeline2(X_train, X_test, y_train, y_test, input_df = all_features_df)
|
||||
t2_res
|
||||
t2_res
|
||||
|
||||
t3_res = MultClassPipeSKF(input_df = numerical_features_df
|
||||
, y_targetF = target1
|
||||
, var_type = 'numerical'
|
||||
, skf_splits = 10)
|
||||
t3_res
|
||||
|
||||
|
||||
t4_res = MultClassPipeSKF(input_df = all_features_df
|
||||
, y_targetF = target1
|
||||
, var_type = 'mixed'
|
||||
, skf_splits = 10)
|
||||
t4_res
|
Loading…
Add table
Add a link
Reference in a new issue