2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

タイムスタンプから時間帯区分の列を作成する(SPSS Modeler データ加工逆引き1-13)

2
Last updated at Posted at 2023-09-13

タイムスタンプから時間帯区分の列を作成する

スクリーンショット 2023-09-06 9.12.05.png

1.想定される利用目的

・時間帯別の統計量の確認
・時間帯別の需要予測ための前処理

2.サンプルストリームのダウンロード

3.サンプルストリームの説明

スクリーンショット 2023-09-06 9.14.14.png

a.対象にするデータは以下の通りです。
スクリーンショット 2023-09-06 9.15.36.png

名義型で定義する

b.[フィールド作成]ノードを編集します。[派生:]を [名義型]にして時間帯を定義します。
スクリーンショット 2023-09-06 9.15.57.png

If-Thenの式で定義する

c.[フィールド作成]ノードを編集します。[派生:]を [CLEM式]にして時間帯を定義します。
スクリーンショット 2023-09-06 9.16.36.png

CLEM式

if datetime_hour(E_TS)  >= 4 and datetime_hour(E_TS)   <  8 then "早朝" 
elseif datetime_hour(E_TS)  >= 8 and datetime_hour(E_TS)   <  12 then "午前"
elseif datetime_hour(E_TS)  >= 12 and datetime_hour(E_TS)   <  15 then "午後"
elseif datetime_hour(E_TS)  >= 15 and datetime_hour(E_TS)   <  18 then "夕刻"
elseif datetime_hour(E_TS)  >= 18 and datetime_hour(E_TS)   <  22 then ""
else "深夜" endif 

[プレビュー]します。

スクリーンショット 2023-09-06 9.17.09.png

注意事項

名義型での区分作成は、該当がないとデフォルト値になります。

4.参考情報

値を任意の閾値でランクに分割する

SPSS Modeler ノードリファレンス目次

SPSS Modeler 逆引きストリーム集(データ加工)

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?