<?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 の続きです。今回はglmnetエンジンでペナルティ付きのロジスティクス回帰モデルを試してみます。 まず、トレーニング用のデータフレームとテスト用のデータフレームを作ります。 glmnetエンジンでペナルティ付きのロジスティクス回帰モデルならば、重要でない変数は自動的に削除されますから、各説明変数の2乗項、平方根項、交差項を追加してみました。 tidymodelsのlogistic_reg()でモデルを設定します。 penaltyというものがglmnetでのlambdaに相当して、mixtureというものがalphaに相当します。これは、後でチューニングして…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.crosshyou.info%2Fentry%2F2025%2F12%2F20%2F105654&quot; title=&quot;UCI Machine Learning RepositoryのBlood Transfusion Service Senterのデータの分析4 - glmnetのエンジンでのモデル。 - 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/20251220/20251220100944.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-12-20 10:56:54</published>
  <title>UCI Machine Learning RepositoryのBlood Transfusion Service Senterのデータの分析4 - glmnetのエンジンでのモデル。</title>
  <type>rich</type>
  <url>https://www.crosshyou.info/entry/2025/12/20/105654</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
