added file containing model names and hyperaprams to run for all models inc FS
This commit is contained in:
parent
9c07ad3ce8
commit
5d6dccfc09
6 changed files with 536 additions and 299 deletions
|
@ -6,9 +6,27 @@ Created on Tue May 24 08:11:05 2022
|
|||
@author: tanu
|
||||
"""
|
||||
|
||||
# my function
|
||||
#import fsgs from UQ_FS_fn
|
||||
|
||||
fsgs(input_df = X
|
||||
, target = y
|
||||
, param_gridLd = param_grid_abc
|
||||
, blind_test_df = X_bts
|
||||
, blind_test_target = y_bts
|
||||
, estimator = AdaBoostClassifier(**rs)
|
||||
, var_type = 'mixed')
|
||||
|
||||
ds_lrD = fsgs(input_df = X
|
||||
, target = y
|
||||
, param_gridLd = param_grid_lr
|
||||
, blind_test_df = X_bts
|
||||
, blind_test_target = y_bts
|
||||
, estimator = LogisticRegression(**rs)
|
||||
, var_type = 'mixed')
|
||||
|
||||
|
||||
|
||||
import fsgs from
|
||||
fsgs(X,y,param_gridLd=param_grid_abc, blind_test_df = X_bts, estimator=AdaBoostClassifier(**rs), var_type = 'mixed')
|
||||
|
||||
|
||||
|
||||
|
@ -17,13 +35,13 @@ fsgs(X,y,param_gridLd=param_grid_abc, blind_test_df = X_bts, estimator=AdaBoostC
|
|||
# Write final output file
|
||||
# https://stackoverflow.com/questions/19201290/how-to-save-a-dictionary-to-a-file
|
||||
#========================================
|
||||
#output final dict as a json
|
||||
outFile = 'LR_FS.json'
|
||||
with open(outFile, 'w') as f:
|
||||
f.write(json.dumps(output_modelD,cls=NpEncoder))
|
||||
# #output final dict as a json
|
||||
# outFile = 'LR_FS.json'
|
||||
# with open(outFile, 'w') as f:
|
||||
# f.write(json.dumps(output_modelD,cls=NpEncoder))
|
||||
|
||||
# read json
|
||||
file = 'LR_FS.json'
|
||||
with open(file, 'r') as f:
|
||||
data = json.load(f)
|
||||
# # read json
|
||||
# file = 'LR_FS.json'
|
||||
# with open(file, 'r') as f:
|
||||
# data = json.load(f)
|
||||
##############################################################################
|
Loading…
Add table
Add a link
Reference in a new issue