1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-14 16:26:55 +08:00

Black(new version) Format

This commit is contained in:
Young
2022-02-06 22:33:16 +08:00
parent 76b7b5f24b
commit 6a946761cf
14 changed files with 35 additions and 35 deletions

View File

@@ -160,7 +160,7 @@ class DEnsembleModel(Model, FeatureInt):
h_avg = h.groupby("bins")["h_value"].mean()
weights = pd.Series(np.zeros(N, dtype=float))
for i_b, b in enumerate(h_avg.index):
weights[h["bins"] == b] = 1.0 / (self.decay ** k_th * h_avg[i_b] + 0.1)
weights[h["bins"] == b] = 1.0 / (self.decay**k_th * h_avg[i_b] + 0.1)
return weights
def feature_selection(self, df_train, loss_values):