load_italy_power_demand
#
- load_italy_power_demand(split=None, return_X_y=True, return_type=None)[源代码]#
加载 ItalyPowerDemand 时间序列分类问题数据集。
- 参数:
- split: None 或 “TRAIN”, “TEST” 之一, 可选 (默认值=None)
是否加载训练集或测试集实例。默认加载训练集和测试集实例(在一个容器中)。
- return_X_y: bool, 可选 (默认值=True)
如果为 True,则分别返回 (特征, 目标) 而不是包含特征和目标列的单个数据框。
- return_type: 有效的 Panel mtype 字符串或 None, 可选 (默认值=None=”nested_univ”)
返回 X 的内存数据格式规范, None = “nested_univ” 类型。str 可以是任何支持的 sktime Panel mtype,
mtypes 列表请参见 datatypes.MTYPE_REGISTER;规范请参见 examples/AA_datatypes_and_datasets.ipynb
- 常用的规范
“nested_univ”: 嵌套的 pd.DataFrame, 单元格中为 pd.Series “numpy3D”/”numpy3d”/”np3D”: 3D np.ndarray (实例, 变量, 时间索引) “numpy2d”/”np2d”/”numpyflat”: 2D np.ndarray (实例, 时间索引) “pd-multiindex”: 带有 2 级 (实例, 时间) MultiIndex 的 pd.DataFrame
如果数据无法存储在请求的类型中,则会引发异常。
- 返回:
- X: sktime 数据容器, 遵循
return_type
的 mtype 规范 问题的时序数据, 包含 n 个实例
- y: 长度为 n 的 1D numpy 数组, 仅在 return_X_y 为 True 时返回
X 中每个时间序列实例的类别标签。如果 return_X_y 为 False, y 将附加到 X 而不是单独返回。
- X: sktime 数据容器, 遵循
注意
维度: 单变量 序列长度: 24 训练案例: 67 测试案例: 1029 类别数: 2
该数据源自意大利的十二个每月电力需求时间序列,并首次用于论文《智能图标:将轻量级数据挖掘和可视化集成到 GUI 操作系统中》(Intelligent Icons: Integrating Lite-Weight Data Mining and Visualization into GUI Operating Systems)。分类任务是区分 10 月至次年 3 月(含)和 4 月至 9 月的日期。数据集详情:http://timeseriesclassification.com/description.php?Dataset=ItalyPowerDemand
示例
>>> from sktime.datasets import load_italy_power_demand >>> X, y = load_italy_power_demand()