公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Reducer.linearRegression
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
创建一个计算线性最小二乘回归的 reducer,其中包含 numX 个自变量和 numY 个因变量。
每个输入元组都将包含自变量的值,后跟因变量的值。
第一个输出是维度为 (numX, numY) 的系数数组;每列都包含相应因变量的系数。第二个输出是每个因变量的残差的均方根向量。如果系统欠定,例如输入数量小于或等于 numX,则两个输出均为 null。
用法 | 返回 |
---|
ee.Reducer.linearRegression(numX, numY) | 缩减器 |
参数 | 类型 | 详细信息 |
---|
numX | 整数 | 输入维度的数量。 |
numY | 整数,默认值:1 | 输出维度数。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):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. |"]]