added my_data4 after outputting merged_df3 for pnca to test the ml models
This commit is contained in:
parent
25a55ac914
commit
04e0267dd1
11 changed files with 5918 additions and 377 deletions
|
@ -157,9 +157,9 @@ print('Class Ratio:',
|
|||
sum(my_df2['resistance'])/len(my_df2['resistance'])
|
||||
)
|
||||
|
||||
skf = StratifiedKFold(n_splits=10, shuffle=True, random_state=42)
|
||||
target = my_df2.loc[:,'resistance']
|
||||
|
||||
skf = StratifiedKFold(n_splits=10, shuffle=True, random_state=42)
|
||||
fold_no = 1
|
||||
for train_index, test_index in skf.split(my_df2, target):
|
||||
train = my_df2.loc[train_index,:]
|
||||
|
@ -373,4 +373,4 @@ plot_confusion_matrix(cm, classes = ['0 - Susceptible', '1 - Resistant'],
|
|||
title = 'R/S Confusion Matrix')
|
||||
|
||||
print(rf_classifier.feature_importances_)
|
||||
print(f" There are {len(rf_classifier.feature_importances_)} features in total")
|
||||
print(f" There are {len(rf_classifier.feature_importances_)} features in total")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue