ee.Reducer.ridgeRegression
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Tworzy funkcję redukującą, która oblicza regresję grzbietową z zmienną numX niezależną (bez stałej) i zmienną numY zależną. Regresja grzbietowa to forma regularyzacji Tichonowa, która zmniejsza współczynniki regresji, nakładając karę za ich wielkość. W przypadku tej implementacji regresji grzbietowej NIE TRZEBA uwzględniać stałej wartości odchylenia.
Pierwszym wynikiem jest tablica współczynników o wymiarach (numX + 1, numY); każda kolumna zawiera współczynniki dla odpowiedniej zmiennej zależnej oraz punkt przecięcia dla zmiennej zależnej w ostatniej kolumnie. Dodatkowe dane wyjściowe to wektor pierwiastków średnich kwadratów reszt każdej zmiennej zależnej i wektor wartości p dla każdej zmiennej zależnej. Jeśli system jest niedookreślony, np. liczba danych wejściowych jest mniejsza niż numX + 1, dane wyjściowe mają wartość null.
Wykorzystanie | Zwroty |
---|
ee.Reducer.ridgeRegression(numX, numY, lambda) | Ograniczenie |
Argument | Typ | Szczegóły |
---|
numX | Liczba całkowita | liczba regresowanych zmiennych niezależnych. |
numY | Liczba całkowita, domyślnie: 1 | liczbę zmiennych zależnych. |
lambda | Liczba zmiennoprzecinkowa, domyślnie: 0,1 | Parametr regularyzacji. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]