Spaces:
Sleeping
Sleeping
LLH
commited on
Commit
·
2605e64
1
Parent(s):
27fd484
2024/03/08/22:08
Browse files
analysis/model_train/tree_model.py
CHANGED
@@ -99,19 +99,12 @@ class DecisionTreeClassifierParams:
|
|
99 |
|
100 |
# 决策树分类
|
101 |
def decision_tree_classifier(container, params):
|
102 |
-
import logging
|
103 |
-
logging.basicConfig(level=logging.INFO)
|
104 |
-
logging.debug(str(params))
|
105 |
-
|
106 |
-
|
107 |
x_train, y_train, x_test, y_test, hyper_params_optimize = get_values_from_container_class(container)
|
108 |
info = {}
|
109 |
|
110 |
params = transform_params_list(DecisionTreeClassifierParams, params)
|
111 |
params['random_state'] = [StaticValue.RANDOM_STATE]
|
112 |
|
113 |
-
logging.debug(str(params))
|
114 |
-
|
115 |
random_forest_regression_model = DecisionTreeClassifier(random_state=StaticValue.RANDOM_STATE)
|
116 |
|
117 |
if hyper_params_optimize == "grid_search":
|
|
|
99 |
|
100 |
# 决策树分类
|
101 |
def decision_tree_classifier(container, params):
|
|
|
|
|
|
|
|
|
|
|
102 |
x_train, y_train, x_test, y_test, hyper_params_optimize = get_values_from_container_class(container)
|
103 |
info = {}
|
104 |
|
105 |
params = transform_params_list(DecisionTreeClassifierParams, params)
|
106 |
params['random_state'] = [StaticValue.RANDOM_STATE]
|
107 |
|
|
|
|
|
108 |
random_forest_regression_model = DecisionTreeClassifier(random_state=StaticValue.RANDOM_STATE)
|
109 |
|
110 |
if hyper_params_optimize == "grid_search":
|