实用函数#

sktime 有许多专门用于实用函数的模块

  • sktime.datatypes,其中包含用于数据格式检查和转换的实用函数。

  • sktime.pipeline,其中包含用于构建管道的泛型。

  • sktime.registry,其中包含用于估计器和标签搜索以及将估计器蓝图序列化为字符串的实用函数。

  • sktime.utils,其中包含通用实用函数。

数据格式检查和转换#

sktime.datatypes

模块导出:数据类型定义、检查、验证、固定装置、转换器。

convert_to(obj, to_type[, as_scitype, ...])

将对象转换为不同的机器表示形式,受科学类型 (scitype) 约束。

convert(obj, from_type, to_type[, ...])

在不同的机器表示形式之间转换对象,受科学类型 (scitype) 约束。

check_raise(obj, mtype[, scitype, var_name])

检查对象是否符合 mtype 规范,不符合则引发错误。

check_is_mtype(obj, mtype[, scitype, ...])

检查对象是否符合 mtype 规范,并返回元数据。

check_is_scitype(obj, scitype[, ...])

检查对象是否符合科学类型 (scitype) 规范,并返回元数据。

mtype(obj[, as_scitype, exclude_mtypes])

推断被视为特定科学类型 (scitype) 的对象的 mtype。

scitype(obj[, candidate_scitypes, ...])

推断对象的科学类型 (scitype)。

mtype_to_scitype(mtype[, return_unique, ...])

推断属于 mtype 的科学类型 (scitype)。

scitype_to_mtype(scitype[, softdeps])

返回属于科学类型 (scitype) 的所有 mtype 列表。

管道构建泛型#

sktime.pipeline

管道创建实用函数。

make_pipeline(*steps)

从任何类型的估计器创建管道。

sklearn_to_sktime(estimator)

将 sklearn 估计器强制转换为 sktime 管道接口。

估计器搜索和检索,估计器标签#

sktime.registry

sktime 估计器基类、标签、全局别名的注册表。

all_estimators([estimator_types, ...])

按科学类型 (scitype) 或标签列出 sktime 中的所有估计器或对象。

all_tags([estimator_types, as_dataframe])

列出 sktime 中特定类型对象的所有标签。

check_tag_is_valid(tag_name, tag_value)

检查标签值的有效性。

估计器蓝图序列化#

sktime.registry

sktime 估计器基类、标签、全局别名的注册表。

craft(spec)

从规范字符串实例化对象。

deps(spec)

获取 craft 规范的 PEP 440 依赖要求。

imports(spec)

获取 craft 规范的导入代码块。

绘图#

sktime.utils.plotting

常见的时间序列绘图功能。

plot_series(*series[, labels, markers, ...])

绘制一个或多个时间序列。

plot_lags(series[, lags, suptitle])

绘制一个或多个时间序列的滞后版本。

plot_correlations(series[, lags, alpha, ...])

绘制时间序列及其 ACF 和 PACF 值。

估计器有效性检查#

sktime.utils.estimator_checks

用于扩展的估计器检查器。

check_estimator(estimator[, ...])

对单个估计器运行所有测试。