公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Reducer.linearRegression
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
建立縮減器,計算具有 numX 個自變數和 numY 個應變數的線性最小平方迴歸。
每個輸入元組都會有獨立變數的值,後面接著相依變數。
第一個輸出是維度為 (numX, numY) 的係數陣列,每個資料欄都包含對應相依變數的係數。第二個輸出內容是每個應變數殘差的均方根向量。如果系統未充分決定,例如輸入數量小於或等於 numX,則兩個輸出都會是空值。
用量 | 傳回 |
---|
ee.Reducer.linearRegression(numX, numY) | 縮減函式 |
引數 | 類型 | 詳細資料 |
---|
numX | 整數 | 輸入維度數量。 |
numY | 整數,預設值為 1 | 輸出維度數量。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eComputes a linear least squares regression with user-defined independent and dependent variables.\u003c/p\u003e\n"],["\u003cp\u003eEach input to the reducer should contain values for independent variables followed by dependent variables.\u003c/p\u003e\n"],["\u003cp\u003eOutputs a coefficients array and a root mean square error vector, or null if the system is underdetermined.\u003c/p\u003e\n"],["\u003cp\u003eThe coefficients array provides coefficients for each dependent variable, organized in columns.\u003c/p\u003e\n"],["\u003cp\u003eThe root mean square error vector quantifies the residual error for each dependent variable.\u003c/p\u003e\n"]]],[],null,["# ee.Reducer.linearRegression\n\nCreates a reducer that computes a linear least squares regression with numX independent variables and numY dependent variables.\n\n\u003cbr /\u003e\n\nEach input tuple will have values for the independent variables followed by the dependent variables.\n\nThe first output is a coefficients array with dimensions (numX, numY); each column contains the coefficients for the corresponding dependent variable. The second output is a vector of the root mean square of the residuals of each dependent variable. Both outputs are null if the system is underdetermined, e.g., the number of inputs is less than or equal to numX.\n\n| Usage | Returns |\n|-----------------------------------------------|---------|\n| `ee.Reducer.linearRegression(numX, `*numY*`)` | Reducer |\n\n| Argument | Type | Details |\n|----------|---------------------|----------------------------------|\n| `numX` | Integer | The number of input dimensions. |\n| `numY` | Integer, default: 1 | The number of output dimensions. |"]]