注: 以下の翻訳の正確性は検証されていません。AIPを利用して英語版の原文から機械的に翻訳されたものです。
単一の時系列に対して線形回帰を実行する関数を返します。
線形回帰は、入力時系列のデータ点に最もよく適合する直線のパラメーターを求めます。
線形回帰は y = Ax + B と表され、A は直線の傾き、B は
y 切片です。返される関数は、パラメーター A と B を返します。
線形回帰は、時系列データの線形トレンドを特定して定量化する必要がある場合に役立ちます。
FunctionNode) -> SummarizerNode| 列名 | データ型 | 説明 |
|---|---|---|
| max_bounds.first_value | Float | y=Ax+B の傾き (A) の最大値です。 |
| max_bounds.second_value | Float | y=Ax+B の切片 (B) の最大値です。 |
| min_bounds.first_value | Float | y=Ax+B の傾き (A) の最小値です。 |
| min_bounds.second_value | Float | y=Ax+B の切片 (B) の最小値です。 |
| regression_fit_function. linear_regression_fit. slope | Float | y=Ax+B における線形回帰の近似直線のパラメーター「A」(傾き)です。 |
| regression_fit_function. linear_regression_fit. intercept | Float | y=Ax+B における線形回帰の近似直線のパラメーター「B」(切片)です。 |
| regression_fit_function. linear_regression_fit. statistics.rsquared | Float | 線形回帰の適合度を示す 決定係数(R 二乗値)です。 |
この関数は数値系列にのみ適用できます。
Copied!1 2 3 4 5 6 7 8 9 10>>> series = F.points( ... (10, 6.0), (20, 12.0), (30, 24.0), (40, 48.0), (50, 96.0), name="series" ... ) >>> series.to_pandas() timestamp value 0 1970-01-01 00:00:00.000000010 6.0 1 1970-01-01 00:00:00.000000020 12.0 2 1970-01-01 00:00:00.000000030 24.0 3 1970-01-01 00:00:00.000000040 48.0 4 1970-01-01 00:00:00.000000050 96.0
Copied!1 2 3 4>>> lin_regr = F.linear_regression()(series) >>> lin_regr.to_pandas() max_bounds.first_value max_bounds.second_value min_bounds.first_value min_bounds.second_value regression_fit_function.linear_regression_fit.intercept regression_fit_function.linear_regression_fit.slope regression_fit_function.linear_regression_fit.statistics.rsquared 0 50.0 96.0 10.0 6.0 -27.6 2.16 0.870968