fix bug with lightgbm and colons

This commit is contained in:
robcaulk 2022-11-03 21:03:48 +01:00
parent d721b50230
commit db942321ad

View File

@ -1153,6 +1153,7 @@ class FreqaiDataKitchen:
pairs = self.freqai_config["feature_parameters"].get("include_corr_pairlist", [])
for pair in pairs:
pair = pair.replace(':', '') # lightgbm doesnt like colons
valid_strs = [f"%-{pair}", f"%{pair}", f"%_{pair}"]
pair_cols = [col for col in dataframe.columns if
any(substr in col for substr in valid_strs)]