expose full parameter set for SVM outlier detection. Set default shuffle to false to improve reproducibility

This commit is contained in:
robcaulk
2022-07-30 13:40:05 +02:00
parent f22b140782
commit dd8288c090
2 changed files with 4 additions and 3 deletions

View File

@@ -530,8 +530,9 @@ class FreqaiDataKitchen:
else:
# use SGDOneClassSVM to increase speed?
nu = self.freqai_config["feature_parameters"].get("svm_nu", 0.2)
self.svm_model = linear_model.SGDOneClassSVM(nu=nu).fit(
svm_params = self.freqai_config["feature_parameters"].get(
"svm_params", {"shuffle": False, "nu": 0.1})
self.svm_model = linear_model.SGDOneClassSVM(**svm_params).fit(
self.data_dictionary["train_features"]
)
y_pred = self.svm_model.predict(self.data_dictionary["train_features"])