Lasso# class sklearn.linear_model.Lasso(alpha=1.0, *, fit_intercept=True, precompute=False, copy_X=True, max_iter=1000, tol=0.0001, warm_start=False, positive=False, random_state=None, selection='cyclic')[source]# Linear Model trained with L1 prior as regularizer (aka the Lasso). The optimization objective for Lasso is: Technically the Lasso model is optimizing the same objective function as the E
RandomForestClassifier# class sklearn.ensemble.RandomForestClassifier(n_estimators=100, *, criterion='gini', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='sqrt', max_leaf_nodes=None, min_impurity_decrease=0.0, bootstrap=True, oob_score=False, n_jobs=None, random_state=None, verbose=0, warm_start=False, class_weight=None, ccp_alpha=0.0, max_sam
LogisticRegression# class sklearn.linear_model.LogisticRegression(penalty='l2', *, dual=False, tol=0.0001, C=1.0, fit_intercept=True, intercept_scaling=1, class_weight=None, random_state=None, solver='lbfgs', max_iter=100, multi_class='deprecated', verbose=0, warm_start=False, n_jobs=None, l1_ratio=None)[source]# Logistic Regression (aka logit, MaxEnt) classifier. This class implements regularized
scikit-learn(サイキット・ラーン、旧称: scikits.learn)は、Pythonのオープンソース機械学習ライブラリ[2]である。サポートベクターマシン、ランダムフォレスト、勾配ブースティング、k近傍法、DBSCANなどを含む様々な分類、回帰、クラスタリングアルゴリズムを備えており、Pythonの数値計算ライブラリのNumPyとSciPyとやり取りするよう設計されている。 教師あり学習と教師なし学習に対応している。ただし、強化学習・深層学習・グラフィカルモデル(隠れマルコフモデルなど)・シーケンス予測には対応しない方針となっている[3]。 Scikit-learnプロジェクトは David Cournapeau によるGoogle Summer of Codeプロジェクト、scikits.learnとして始まった。名前は「Scikit」 (SciPy Toolkit) つま
1.15. Isotonic regression# The class IsotonicRegression fits a non-decreasing real function to 1-dimensional data. It solves the following problem: subject to \(\hat{y}_i \le \hat{y}_j\) whenever \(X_i \le X_j\), where the weights \(w_i\) are strictly positive, and both X and y are arbitrary real quantities. The increasing parameter changes the constraint to \(\hat{y}_i \ge \hat{y}_j\) whenever \(
Pipelining: chaining a PCA and a logistic regression¶ The PCA does an unsupervised dimensionality reduction, while the logistic regression does the prediction. We use a GridSearchCV to set the dimensionality of the PCA print(__doc__) # Code source: Gaël Varoquaux # Modified for documentation by Jaques Grobler # License: BSD 3 clause import numpy as np import matplotlib.pyplot as plt from sklearn i
はじめに Pythonで機械学習といえばscikit-learnですが、scikit-learnを使うにはnumpyやscipyといった大きめのライブラリを入れる必要があります。でも、プログラムでほんのちょこっとだけ機械学習のモデルを使って分類したいって場合だと、わざわざそういう重いもの入れたくないなーと思うときがあります。scikit-learnで学習したものをnumpy, scipy, scikit-learnなしに使って分類処理ができたらなーって。 そこで今回はscikit-learnの決定木 (DecisionTreeClassifier) やRandom forest (RandomForestClassifier) からif-then形式のコードを生成するものを紹介します。 コード https://github.com/ikegami-yukino/misc/blob/mast
1. scikit-learnを使った実験概要 Gradient Boostingについて - 準備編 - ( http://goo.gl/y2EVLI ) の予告通り今回はSklearnで実験をしてみました。目的は、GBDTを使ったfeature transformationが予測を改善するのか、という点を確認する事です。 ところで、Gradient Boostingでfeature transformationする話は昔からあったはずですが、ADKDD'14で発表されたPractical Lessons from Predicting Clicks on Ads at Facebook[1]が非常に有名です。実験はこの論文がやっている事と同じですが、featureの安定性等は計算していません。実務で適用する場合は重要な点ですので、ぜひトライしてみて下さい(結果を教えて頂けるととてもうれ
こんにちは。 林@アイエンターです。 前回はブログでは数学的なアプローチの回帰分析のお話をいたしました。 最近は統計分析や機械学習の分野では、Pythonが使われるケースが増えています。 Pythonには、数理演算やデータ可視化の強力なライブラリがそろっているのが その一因かと思います。 今回は「scikit-learn」という機械学習で良く用いられるpythonライブラリを紹介します。 非常にパワフルなライブラリーです。 実際、前回のブログのサンプルデータをライブラリーで回帰分析してみます。 ■環境セットアップ 「Anaconda」という、Pythonパッケージをインストールします。 これはPython本体と、科学技術、数学、データ分析関連で良く使われるライブラリを、一括でインストールできるパッケージです。 Windows/MacOS/Linuxのそれぞれのパッケージが用意されています。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く