Skip to content

Commit c10c349

Browse files
authored
remove unneeded code from workflow_by_code.ipynb && fix analysis_model_performance (#740)
1 parent 7cb1f7c commit c10c349

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

examples/workflow_by_code.ipynb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@
6262
"import qlib\n",
6363
"import pandas as pd\n",
6464
"from qlib.config import REG_CN\n",
65-
"from qlib.contrib.model.gbdt import LGBModel\n",
66-
"from qlib.contrib.data.handler import Alpha158\n",
67-
"from qlib.contrib.evaluate import (\n",
68-
" backtest as normal_backtest,\n",
69-
" risk_analysis,\n",
70-
")\n",
7165
"from qlib.utils import exists_qlib_data, init_instance_by_config\n",
7266
"from qlib.workflow import R\n",
7367
"from qlib.workflow.record_temp import SignalRecord, PortAnaRecord\n",

qlib/contrib/report/analysis_model/analysis_model_performance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def _group_return(pred_label: pd.DataFrame = None, reverse: bool = False, N: int
5757
).figure
5858

5959
t_df = t_df.loc[:, ["long-short", "long-average"]]
60-
_bin_size = ((t_df.max() - t_df.min()) / 20).min()
60+
_bin_size = float(((t_df.max() - t_df.min()) / 20).min())
6161
group_hist_figure = SubplotsGraph(
6262
t_df,
6363
kind_map=dict(kind="DistplotGraph", kwargs=dict(bin_size=_bin_size)),

0 commit comments

Comments
 (0)