Code Interpreterとは
世界に衝撃を与え続けているChatGPTであるが、Code Interpreterの便利さは驚愕的。CSVやEXCELファイルをアップロードし、データの加工や分析、グラフの作成を一瞬で行ってくれる(Code Interpreterの使用には月額20ドルの有料プラン契約が必要)。ちなみに、パワーポイントのスライドも一瞬で出力してくれる。
Code Interpreterの使い方
有料プランで、Settingで”Code interpreter”をオンにする。

GPT-4を選択。オプションの選択で、”Code interpreter”を選択。


選択すると、ダイアログに+マークが現れ、ここからファイルをアップロードできる。

時系列データの解析
毎回用いるデータであるが、ドル円の始値、高値などのデータを用いる。アップロードしたら、以下のpromptを入力。これだけで自動で解析が開始される。


データの要約、適切な解析方法の選択、およびグラフのプロットまで一気にやってくれる。グラフの描写はきちんとPythonのCodeも掲載してくれる。
結果
終値のグラフの描写。

季節性の分析。

ACFも計算してくれる。

解析がうまく行かないときは、自動で他の手段を選択する。

最終的に、具体的な予測を出力させることも可能。

感想
上の例ではSARIMAまで行おうとしていた(ドル円のデータには季節性はないと考えられるので、これはあまりうまく行かないだろう)。対話型promptなので、解析手法をあまり知らなくても、一通りの解析ができてしまうところがすごい。研究レベルで使えるかと言われると微妙ではあるが、飲食店や中小企業など、小規模なデータ分析ではお釣りがくるレベル。
関連記事
ChatGTPで臨床検査技師国家試験演習Webサイトを作成
経済・ファイナンスデータの計量時系列分析
単位根検定とは?Pythonでの実装方法と結果の解釈について
変動値の従う分布について。正規分布と正規性の検定手法
水曜日のドル円は上昇する、あるいは7月のドル円は下落する
ChatGPTより便利なAI論文補助サービス
コメント