# センチメント分析例

> センチメント分析例 - Composable MLを適用して、テキストからセンチメントをキャプチャします。

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-07-15T05:55:45.026845+00:00` (UTC).

## Primary page

- [センチメント分析例](https://docs.datarobot.com/ja/docs/reference/pred-ai-ref/cml-ref/cml-sentiment-example.html.md): Full documentation for this topic (Markdown sidecar).

## Documentation content

この例のモデルには、レビューまたはツイートが含まれています。 目標は、テキスト内でセンチメントをキャプチャすることによってモデルの改善を図ることです。 これには、 [ブループリントを変更](https://docs.datarobot.com/ja/docs/classic-ui/modeling/special-workflows/cml/cml-blueprint-edit.html.md#access-the-blueprint-editor) するだけです（つまり、 コピーして編集 をクリックして開始）。 以下はシンプルなブループリント（テキストのみ）ですが、モデルには特徴量がある場合もあります。

word-gramカウントの行列 または ElasticNet Classifier ノードにカーソルを合わせると、以下が表示されます。

- そのタスクに必要な入力のタイプ。
- 返される出力のタイプ。

たとえば、 word-gramカウントの行列 タスクでは、入力がテキスト型であることが必要で、すべての数値特徴量を含むデータフレームを返します。

この例で、テキスト特徴量のセンチメントをキャプチャするには、 テキスト特徴量 ノードにカーソルを合わせて、 [タスクセレクター](https://docs.datarobot.com/ja/docs/classic-ui/modeling/special-workflows/cml/cml-blueprint-edit.html.md#use-the-task-selector) のプラス記号（ [https://docs.datarobot.com/ja/docs/images/icon-plus.png](https://docs.datarobot.com/ja/docs/images/icon-plus.png) ）をクリックします。 タスクを選択 ダイアログボックスで、 前処理 > テキスト前処理 を展開して、テキスト操作のオプションを表示します。 （これらのオプションの一部は [高度なチューニング](https://docs.datarobot.com/ja/docs/classic-ui/modeling/analyze-models/evaluate/adv-tuning.html.md) でも利用できますが、他のオプションは、ここからしかアクセスできません。） TextBlob Sentiment Featurizer を選択して追加します。

ブループリントに新しいノードが赤枠付きで表示されるようになりました。 ノードにカーソルを合わせると、テキストが必要であることがわかります。

ノードの出力は、数値特徴量（ `Data Type: Numeric` ）を含むデータフレームであることに注意してください。 TextBlob Sentiment Featurizer は前処理モジュールであるため、 [モデルタスクに接続する](https://docs.datarobot.com/ja/docs/classic-ui/modeling/special-workflows/cml/cml-blueprint-edit.html.md#work-with-nodes) 必要があります。 （TextBlobノードにカーソルを合わせ、斜めの矢印（ [https://docs.datarobot.com/ja/docs/images/icon-diagonal-arrow.png](https://docs.datarobot.com/ja/docs/images/icon-diagonal-arrow.png) ）アイコンを ElasticNet Classifier ノードにドラッグしてクリックします。）

新しいブループリントは [トレーニングの準備ができています](https://docs.datarobot.com/ja/docs/classic-ui/modeling/special-workflows/cml/cml-blueprint-edit.html.md#train-new-models) 。 （トレーニングの前に、特徴量セットまたはトレーニングサンプルサイズを変更できます。）

これはリーダーボード上のモデルで、上位4つのモデルの1つとして表示されています。
