コード例 #1
0
        "min-sample-split_" + str(min_sample_split) + "_" +\
        "max-depth_" + str(max_depth) + "_" +\
        "max-leaf-nodes_" + str(max_leaf_nodes) + "_" +\
        "random-state_" + str(random_state) + "_" +\
        "class-weight_" + class_weight
tag = writestr + "_" + specific_info

## END OF PARAMS TO MODIFY ##

PARAMETERS = {
	"X_train" : X_train,
	"Y_train" : Y_train,
	"X_dev" : X_dev,
	"Y_dev" : Y_dev,
	"architecture" : architecture,
	"num_estimators" : num_estimators,
	"min_sample_split" : min_sample_split,
	"max_depth" : max_depth,
	"max_leaf_nodes" : max_leaf_nodes,
	"random_state" : random_state,
	"class_weight" : class_weight,
	"n_jobs" : n_jobs,
	"tag" : tag,
	"print_cost" : True
}

modelDriver = ModelDriver(PARAMETERS)
modelDriver.load()
modelDriver.init_model()
out = modelDriver.run_model()
コード例 #2
0
        "random-state_" + str(random_state) + "_" +\
        "class-weight_" + class_weight
tag = writestr + "_" + specific_info

## END OF PARAMS TO MODIFY ##

PARAMETERS = {
    "X_train": X_train,
    "Y_train": Y_train,
    "X_dev": X_dev,
    "Y_dev": Y_dev,
    "X_test": X_test,
    "Y_test": Y_test,
    "architecture": architecture,
    "num_estimators": num_estimators,
    "min_sample_split": min_sample_split,
    "max_depth": max_depth,
    "max_leaf_nodes": max_leaf_nodes,
    "random_state": random_state,
    "class_weight": class_weight,
    "n_jobs": n_jobs,
    "tag": tag,
    "print_cost": True
}

modelDriver = ModelDriver(PARAMETERS)
#modelDriver.load()
#modelDriver.init_model()
#out = modelDriver.run_model()
modelDriver.cross_validation()