<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>cross_hyou</author_name>
  <author_url>https://blog.hatena.ne.jp/cross_hyou/</author_url>
  <blog_title>Rで何かをしたり、読書をするブログ</blog_title>
  <blog_url>https://www.crosshyou.info/</blog_url>
  <categories>
    <anon>データ分析</anon>
  </categories>
  <description>www.crosshyou.info の続きです。今回はランダムフォレストで分類してみます。 レシピを作成して、rand_forest()でエンジンをrangerにしてランダムフォレストモデルを作ります。 ワークフロー作成、クロスバリデーションの設定、チューングリッドの作成をします。 チューニング実行して最適なパラメータを見つけ、最終ワークフローを作成し、モデルをフィットします。 テスト用のデータで予測して、予測結果をみてみます。 正解率は89.9%とglmnetでのelastic-net回帰やkknnでのk-NNよりも悪い結果でした。 3つのモデルによる予測があるので、「3人寄れば文殊の知恵…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.crosshyou.info%2Fentry%2F2026%2F03%2F20%2F195041&quot; title=&quot;日銀が保有する国債残高のデータの分析6 - Rで機械学習 - 3人寄れば文殊の知恵 - Elastic-Net, k-NN, ランダムフォレストの三つの多数決で正解率が向上 - Rで何かをしたり、読書をするブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/c/cross_hyou/20260320/20260320192005.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-03-20 19:50:41</published>
  <title>日銀が保有する国債残高のデータの分析6 - Rで機械学習 - 3人寄れば文殊の知恵 - Elastic-Net, k-NN, ランダムフォレストの三つの多数決で正解率が向上</title>
  <type>rich</type>
  <url>https://www.crosshyou.info/entry/2026/03/20/195041</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
