ee.Reducer.ridgeRegression
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tạo một hàm giảm tính toán hồi quy sườn núi với numX biến độc lập (không bao gồm hằng số) theo sau là numY biến phụ thuộc. Hồi quy theo đường gờ là một dạng điều chỉnh Tikhonov giúp giảm các hệ số hồi quy bằng cách áp dụng một mức phạt đối với kích thước của các hệ số đó. Với cách triển khai hồi quy sườn núi này, bạn KHÔNG CẦN đưa vào giá trị không đổi cho độ lệch.
Đầu ra đầu tiên là một mảng hệ số có kích thước (numX + 1, numY); mỗi cột chứa các hệ số cho biến phụ thuộc tương ứng cộng với hệ số chặn cho biến phụ thuộc trong cột cuối cùng. Các đầu ra bổ sung là một vectơ biểu thị căn bậc hai của giá trị trung bình của phần dư của mỗi biến phụ thuộc và một vectơ biểu thị giá trị p cho mỗi biến phụ thuộc. Đầu ra có giá trị rỗng nếu hệ thống chưa xác định được, ví dụ: số lượng đầu vào nhỏ hơn numX + 1.
Cách sử dụng | Giá trị trả về |
---|
ee.Reducer.ridgeRegression(numX, numY, lambda) | Bộ giảm tốc |
Đối số | Loại | Thông tin chi tiết |
---|
numX | Số nguyên | số lượng biến độc lập được hồi quy. |
numY | Số nguyên, mặc định: 1 | số lượng biến phụ thuộc. |
lambda | Độ chính xác đơn, mặc định: 0,1 | Tham số điều chuẩn. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]