• home
  • about
  • 全ての投稿
  • ソフトウェア・ハードウェアの設定のまとめ
  • 分析関連のまとめ
  • ヘルスケア関連のまとめ
  • 生涯学習関連のまとめ

tsfresh

date: 2022-03-09 excerpt: tsfreshの使い方

tag: statistics機械学習tsfreshpython


tsfreshの使い方

概要

  • 時系列のデータの特徴量自動作成ツール

インストール

$ python3 -m pip install tsfresh

基本的な使い方

サンプルをロード

from tsfresh.examples.robot_execution_failures import download_robot_execution_failures, \
    load_robot_execution_failures
download_robot_execution_failures()
timeseries, y = load_robot_execution_failures()
display(timeseries.head())

特徴量作成

from tsfresh import extract_features
extracted_features = extract_features(timeseries, column_id="id", column_sort="time")
extracted_features

特徴量の厳選

from tsfresh import select_features
from tsfresh.utilities.dataframe_functions import impute

impute(extracted_features)
filtered_features = select_features(extracted_features, y)
filtered_features

Google Colab

  • tsfresh-example

参考

  • tsfresh.readthedocs.io


statistics機械学習tsfreshpython Share Tweet