1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-11 23:06:58 +08:00

fix some typo in doc/comments (#1389)

* fix typo in docstrings

* fix typo

* fix typo

* fix black lint

* fix black lint
This commit is contained in:
YQ Tsui
2022-12-11 14:29:16 +08:00
committed by GitHub
parent 57f9813f85
commit 5e3924d7a6
6 changed files with 25 additions and 21 deletions

View File

@@ -155,7 +155,7 @@ class QlibRecorder:
The arguments of this function are not set to be rigid, and they will be different with different implementation of
``ExpManager`` in ``Qlib``. ``Qlib`` now provides an implementation of ``ExpManager`` with mlflow, and here is the
example code of the this method with the ``MLflowExpManager``:
example code of the method with the ``MLflowExpManager``:
.. code-block:: Python

View File

@@ -30,7 +30,8 @@ class RecordTemp:
"""
artifact_path = None
depend_cls = None # the depend class of the record; the record will depend on the results generated by `depend_cls`
depend_cls = None # the dependant class of the record; the record will depend on the results generated by
# `depend_cls`
@classmethod
def get_path(cls, path=None):
@@ -119,7 +120,7 @@ class RecordTemp:
Check if the records is properly generated and saved.
It is useful in following examples
- checking if the depended files complete before generating new things.
- checking if the dependant files complete before generating new things.
- checking if the final files is completed
Parameters
@@ -186,7 +187,7 @@ class SignalRecord(RecordTemp):
return raw_label
def generate(self, **kwargs):
# generate prediciton
# generate prediction
pred = self.model.predict(self.dataset)
if isinstance(pred, pd.Series):
pred = pred.to_frame("score")
@@ -285,7 +286,8 @@ class HFSignalRecord(SignalRecord):
class SigAnaRecord(ACRecordTemp):
"""
This is the Signal Analysis Record class that generates the analysis results such as IC and IR. This class inherits the ``RecordTemp`` class.
This is the Signal Analysis Record class that generates the analysis results such as IC and IR.
This class inherits the ``RecordTemp`` class.
"""
artifact_path = "sig_analysis"
@@ -382,7 +384,7 @@ class PortAnaRecord(ACRecordTemp):
indicator_analysis_freq : str|List[str]
indicator analysis freq of report
indicator_analysis_method : str, optional, default by None
the candidated values include 'mean', 'amount_weighted', 'value_weighted'
the candidate values include 'mean', 'amount_weighted', 'value_weighted'
"""
super().__init__(recorder=recorder, skip_existing=skip_existing, **kwargs)
@@ -456,9 +458,9 @@ class PortAnaRecord(ACRecordTemp):
pred = self.load("pred.pkl")
# replace the "<PRED>" with prediction saved before
placehorder_value = {"<PRED>": pred}
placeholder_value = {"<PRED>": pred}
for k in "executor_config", "strategy_config":
setattr(self, k, fill_placeholder(getattr(self, k), placehorder_value))
setattr(self, k, fill_placeholder(getattr(self, k), placeholder_value))
# if the backtesting time range is not set, it will automatically extract time range from the prediction file
dt_values = pred.index.get_level_values("datetime")