Fix XGBoost regressor "used before assignment"
This commit is contained in:
parent
283dab667d
commit
1ef38f137d
@ -29,6 +29,7 @@ class XGBoostRFRegressor(BaseRegressionModel):
|
|||||||
|
|
||||||
if self.freqai_info.get("data_split_parameters", {}).get("test_size", 0.1) == 0:
|
if self.freqai_info.get("data_split_parameters", {}).get("test_size", 0.1) == 0:
|
||||||
eval_set = None
|
eval_set = None
|
||||||
|
eval_weights = None
|
||||||
else:
|
else:
|
||||||
eval_set = [(data_dictionary["test_features"], data_dictionary["test_labels"])]
|
eval_set = [(data_dictionary["test_features"], data_dictionary["test_labels"])]
|
||||||
eval_weights = [data_dictionary['test_weights']]
|
eval_weights = [data_dictionary['test_weights']]
|
||||||
|
@ -29,6 +29,7 @@ class XGBoostRegressor(BaseRegressionModel):
|
|||||||
|
|
||||||
if self.freqai_info.get("data_split_parameters", {}).get("test_size", 0.1) == 0:
|
if self.freqai_info.get("data_split_parameters", {}).get("test_size", 0.1) == 0:
|
||||||
eval_set = None
|
eval_set = None
|
||||||
|
eval_weights = None
|
||||||
else:
|
else:
|
||||||
eval_set = [(data_dictionary["test_features"], data_dictionary["test_labels"])]
|
eval_set = [(data_dictionary["test_features"], data_dictionary["test_labels"])]
|
||||||
eval_weights = [data_dictionary['test_weights']]
|
eval_weights = [data_dictionary['test_weights']]
|
||||||
|
Loading…
Reference in New Issue
Block a user