added all classification algorithms params for gridsearch
This commit is contained in:
parent
d012542435
commit
0c4f1e1e5f
8 changed files with 503 additions and 110 deletions
|
@ -40,7 +40,7 @@ njobs = {'n_jobs': 10}
|
|||
# TODO: get accuracy and other scores through K-fold cv
|
||||
|
||||
# Multiple Classification - Model Pipeline
|
||||
def MultClassPipeSKFLoop(input_df, target, skf_cv, var_type = ['numerical','categorical','mixed']):
|
||||
def MultClassPipeSKFLoop(input_df, target, sel_cv, var_type = ['numerical','categorical','mixed']):
|
||||
|
||||
'''
|
||||
@ param input_df: input features
|
||||
|
@ -131,7 +131,7 @@ def MultClassPipeSKFLoop(input_df, target, skf_cv, var_type = ['numerical','cate
|
|||
fold_dict.update({ model_name: {}})
|
||||
|
||||
#scores_df = pd.DataFrame()
|
||||
for train_index, test_index in skf_cv.split(input_df, target):
|
||||
for train_index, test_index in sel_cv.split(input_df, target):
|
||||
x_train_fold, x_test_fold = input_df.iloc[train_index], input_df.iloc[test_index]
|
||||
y_train_fold, y_test_fold = target.iloc[train_index], target.iloc[test_index]
|
||||
#print("Fold: ", fold_no, len(train_index), len(test_index))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue