公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Reducer.ridgeRegression
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
建立縮減器,計算具有 numX 個自變數 (不含常數) 的嶺迴歸,然後計算 numY 個應變數。嶺迴歸是 Tikhonov 正則化的一種形式,會對迴歸係數的大小施加懲罰,藉此縮減係數。使用這種嶺迴歸實作方式時,不需要納入偏誤的常數值。
第一個輸出是係數陣列,維度為 (numX + 1, numY);每個資料欄都包含對應相依變數的係數,最後一個資料欄則包含相依變數的截距。其他輸出內容包括每個應變數殘差的均方根向量,以及每個應變數的 p 值向量。如果系統未充分判斷,例如輸入數量少於 numX + 1,輸出內容就會是空值。
用量 | 傳回 |
---|
ee.Reducer.ridgeRegression(numX, numY, lambda) | 縮減函式 |
引數 | 類型 | 詳細資料 |
---|
numX | 整數 | 要迴歸的自變數數量。 |
numY | 整數,預設值為 1 | 相依變數的數量。 |
lambda | 浮點值,預設值為 0.1 | 正規化參數。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eCreates a reducer for ridge regression, a regularization method that shrinks regression coefficients to prevent overfitting.\u003c/p\u003e\n"],["\u003cp\u003eOutputs include regression coefficients, root mean square of residuals, and p-values for each dependent variable.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the number of independent and dependent variables, along with an optional regularization parameter (lambda).\u003c/p\u003e\n"],["\u003cp\u003eThe reducer automatically handles the intercept term, so there's no need to add a constant value for bias.\u003c/p\u003e\n"],["\u003cp\u003eOutputs will be null if the system is underdetermined, meaning there are fewer input data points than independent variables plus one.\u003c/p\u003e\n"]]],[],null,["# ee.Reducer.ridgeRegression\n\nCreates a reducer that computes a ridge regression with numX independent variables (not including constant) followed by numY dependent variables. Ridge regression is a form of Tikhonov regularization which shrinks the regression coefficients by imposing a penalty on their size. With this implementation of ridge regression there NO NEED to include a constant value for bias.\n\n\u003cbr /\u003e\n\nThe first output is a coefficients array with dimensions (numX + 1, numY); each column contains the coefficients for the corresponding dependent variable plus the intercept for the dependent variable in the last column. Additional outputs are a vector of the root mean square of the residuals of each dependent variable and a vector of p-values for each dependent variable. Outputs are null if the system is underdetermined, e.g., the number of inputs is less than numX + 1.\n\n| Usage | Returns |\n|-----------------------------------------------------------|---------|\n| `ee.Reducer.ridgeRegression(numX, `*numY* `, `*lambda*`)` | Reducer |\n\n| Argument | Type | Details |\n|----------|---------------------|------------------------------------------------------|\n| `numX` | Integer | the number of independent variables being regressed. |\n| `numY` | Integer, default: 1 | the number of dependent variables. |\n| `lambda` | Float, default: 0.1 | Regularization parameter. |"]]