<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Scikit Learn > 原文:[https://www.bookbookmark.ds100.org/ch/20/ref_sklearn.html](https://www.bookbookmark.ds100.org/ch/20/ref_sklearn.html) ``` # HIDDEN # Clear previously defined variables %reset -f # Set directory for data loading to work properly import os os.chdir(os.path.expanduser('~/notebooks/20')) ``` ## 型號和型號選擇 | 進口 | 功能 | 截面 | 說明 | | --- | --- | --- | --- | | `sklearn.model_selection` | [`train_test_split(*arrays, test_size=0.2)`](http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html) | 建模與估計 | 返回傳入的每個數組的兩個隨機子集,其中第一個子集中有 0.8 個數組,第二個子集中有 0.2 個數組 | | `sklearn.linear_model` | [`LinearRegression()`](http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html) | Modeling and Estimation | 返回普通最小二乘線性回歸模型 | | `sklearn.linear_model` | [`LassoCV()`](http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html) | Modeling and Estimation | 返回通過交叉驗證選擇最佳模型的 Lasso(L1 正則化)線性模型 | | `sklearn.linear_model` | [`RidgeCV()`](http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html) | Modeling and Estimation | 返回一個脊線(L2 正則化)線性模型,并通過交叉驗證選擇最佳模型 | | `sklearn.linear_model` | [`ElasticNetCV()`](http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html) | Modeling and Estimation | 返回 ElasticNet(l1 和 l2 正則化)線性模型,并通過交叉驗證選擇最佳模型 | | `sklearn.linear_model` | [`LogisticRegression()`](http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html) | Modeling and Estimation | 返回邏輯回歸分類器 | | `sklearn.linear_model` | [`LogisticRegressionCV()`](http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegressionCV.html) | Modeling and Estimation | 返回通過交叉驗證選擇最佳模型的邏輯回歸分類器 | ## 使用模型[?](#Working-with-a-Model) 假設您有一個`model`變量是`scikit-learn`對象: | Function | Section | Description | | --- | --- | --- | | `model.fit(X, y)` | Modeling and Estimation | 與傳入的 X 和 Y 匹配的模型 | | `model.predict(X)` | Modeling and Estimation | 返回根據模型傳入的 x 的預測 | | `model.score(X, y)` | Modeling and Estimation | 返回基于 corect 值(y)的 x 預測精度 |
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看