ee.Reducer.linearRegression
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Tworzy funkcję redukującą, która oblicza regresję liniową metodą najmniejszych kwadratów z zmienną numX niezależną i zmienną numY zależną.
Każda krotka wejściowa będzie zawierać wartości zmiennych niezależnych, a następnie zmiennych zależnych.
Pierwszym wynikiem jest tablica współczynników o wymiarach (numX, numY); każda kolumna zawiera współczynniki dla odpowiedniej zmiennej zależnej. Drugi wynik to wektor pierwiastków średnich kwadratowych reszt każdej zmiennej zależnej. Jeśli system jest niedookreślony, np. liczba danych wejściowych jest mniejsza lub równa numX, oba wyniki mają wartość null.
Wykorzystanie | Zwroty |
---|
ee.Reducer.linearRegression(numX, numY) | Ograniczenie |
Argument | Typ | Szczegóły |
---|
numX | Liczba całkowita | Liczba wymiarów wejściowych. |
numY | Liczba całkowita, domyślnie: 1 | Liczba wymiarów wyjściowych. |
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\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. |"]]