Giter Club home page Giter Club logo

comparison-of-ridge-regression-and-lasso__basics_of_machine_learning__'s Introduction

Comparison-of-Ridge-Regression-and-Lasso

Wineデータを訓練事例とテスト事例に分割し、訓練事例でridge回帰とLASSOを学習させました。
正則化パラメータ(alpha)は2^-16,2^-15,...,2^12まで変化させ次の3つを出力しました。

  • 正則化パラメータ
  • 各特徴量とそれに対応する係数(昇順にソート)
  • 訓練誤差およびテスト誤差.

考察

テスト誤差が最小になる正則化パラメータにおいては、ラッソのテスト誤差がリッジ回帰よりわずかに小さいが、これはデータセットの選び方で変動するほどの非常に小さな差であり、ラッソとリッジ回帰の差はほとんどないと言える。

テスト誤差が最小になる正則化パラメータにおけるラッソでは、対応するモデルパラメータがゼロとなる特徴は存在せず、この設定では特徴選択の効果は見られていない。

まとめ

【ラッソ回帰】
〇一部のパラメータがゼロになる。→特徴選択できる。
×微分できない(推定で求めるようです)。

【リッジ回帰】
〇なめらかなモデルが得られる。
〇微分可能(解析的に解ける)。
×パラメータはゼロにならないので、モデルが複雑になりやすい。


.ipynbファイルが開かれない時は、こちらのリンクにURLを貼ってご覧になってください。
nbviewer

comparison-of-ridge-regression-and-lasso__basics_of_machine_learning__'s People

Contributors

n-yuzuto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.