Skip to main content

MetaModelCVReport

MetaModelCVReport(
    data: vectorbtpro.data.base.Data,
    s1: str,
    s2: str,
    model: ~BaseStatArb,
    use_close: bool = True,
    freq: str = 'auto',
)
Breakdown analysis for meta model, extending BaseModelBreakdownCV. Method generated by attrs for class BaseReportCV.

Ancestors

  • systematica.api.base.BaseReportCV
  • systematica.api.base.BaseReportMixin
  • abc.ABC

Methods

score

score(
    self,
    estimator: sklearn.base.BaseEstimator,
    X: pandas.core.frame.DataFrame | numpy.ndarray,
    y: numpy.ndarray | pandas.core.series.Series,
    scoring: str = 'accuracy',
    n_jobs: int = None,
    verbose: int = 0,
) ‑> pandas.core.series.Series
Evaluate a score by cross-validation. This method uses scikit-learn’s cross_val_score to evaluate the performance of an estimator on a given dataset using cross-validation. See Also:
  • cross_validate: To run cross-validation on multiple metrics and also to return train scores, fit times and score times.
  • cross_val_predict: Get predictions from each split of cross-validation for diagnostic purposes.
  • sklearn.metrics.make_scorer: Make a scorer from a performance metric or loss function.
Parameters:
NameTypeDefaultDescription
estimatorBaseEstimator--The object to use to fit the data.
Xpd.DataFrame--The data to fit.
ypd.Series--The target variable.
scoringstraccuracyThe scoring method to use for evaluation. It can be one of the predefined strings in scikit-learn, such as ‘accuracy’, ‘f1’, ‘roc_auc’, etc., or a custom scoring function that follows the scikit-learn scorer interface. Defaults to accuracy.
n_jobsintNoneNumber of jobs to run in parallel. Training the estimator and computing the score are parallelized over the cross-validation splits. None means 1 unless in a joblib.parallel_backend context. -1 means using all processors. Default is None.
verboseint0Verbosity level. Controls the verbosity of the output during cross-validation. 0 means no output, 1 means progress messages, and higher values increase verbosity. Default is 0.
Returns:
TypeDescription
pd.SeriesScores of the estimator for each run of the cross validation.

RollingMetaModelReport

RollingMetaModelReport(
    data: vectorbtpro.data.base.Data,
    s1: str,
    s2: str,
    model: ~BaseStatArb,
    use_close: bool = True,
    freq: str = 'auto',
)
Breakdown analysis for meta model, extending BaseRollingReport. Method generated by attrs for class BaseRollingReport.

Ancestors

  • systematica.api.base.BaseRollingReport
  • systematica.api.base.BaseReportMixin
  • abc.ABC