For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n
unit lower triangular matrix L, an n-by-n upper triangular matrix U,
and a permutation vector piv of length m so that A(piv,:) = L*U.
If m < n, then L is m-by-m and U is m-by-n.
The LU decomposition with pivoting always exists, even if the matrix is
singular, so the constructor will never fail. The primary use of the
LU decomposition is in the solution of square systems of simultaneous
linear equations. This will fail if isNonsingular() returns false.
The PolynomialRegression class performs a polynomial regression
on an set of N data points (yi, xi).
That is, it fits a polynomial
y = β0 + β1x +
β2x2 + ... +
βdxd
(where y is the response variable, x is the predictor variable,
and the βi are the regression coefficients)
that minimizes the sum of squared residuals of the multiple regression model.
It also computes associated the coefficient of determination R2.
This implementation performs a QR-decomposition of the underlying
Vandermonde matrix, so it is neither the fastest nor the most numerically
stable way to perform the polynomial regression.
QR Decomposition.
For an m-by-n matrix A with m >= n, the QR decomposition is an m-by-n
orthogonal matrix Q and an n-by-n upper triangular matrix R so that
A = Q*R.
The QR decompostion always exists, even if the matrix does not have
full rank, so the constructor will never fail. The primary use of the
QR decomposition is in the least squares solution of nonsquare systems
of simultaneous linear equations. This will fail if isFullRank()
returns false.
Singular Value Decomposition.
For an m-by-n matrix A with m >= n, the singular value decomposition is
an m-by-n orthogonal matrix U, an n-by-n diagonal matrix S, and
an n-by-n orthogonal matrix V so that A = USV'.
The singular values, sigma[k] = S[k][k], are ordered so that
sigma[0] >= sigma[1] >= ... >= sigma[n-1].
The singular value decompostion always exists, so the constructor will
never fail. The matrix condition number and the effective numerical
rank can be computed from this decomposition.
Return evenly spaced values within a given interval.
Values are generated within the half-open interval [start, stop) (in other words, the interval including start but excluding stop).
When using a non-integer step, such as 0.1, It is better to use linspace.
Generate a Vandermonde matrix.
The columns of the output matrix are powers of the input vector. The
order of the powers is determined by the increasing boolean argument.
Specifically, when increasing is False, the i-th output column is
the input vector raised element-wise to the power of N - i - 1. Such
a matrix with a geometric progression in each row is named for Alexandre-
Theophile Vandermonde.
Generates an Array with n elements containing non-negative random floating
point value uniformly distributed in the range from 0.0, inclusive,
to 1.0, exclusive.
Generates an Array with n elements containing non-negative random floating
point value uniformly distributed in the range from 0.0, inclusive,
to 1.0, exclusive.
Generates an ArrayComplex with n elements containing non-negative random floating
point value uniformly distributed complex numbers in the range
from 0.0, inclusive, to 1.0, exclusive.
Integrate y(x) using samples along the given axis and the composite
Simpson's rule. If x is None, spacing of dx is assumed.
If there are an even number of samples, N, then there are an odd
number of intervals (N-1), but Simpson's rule requires an even number
of intervals. The parameter 'even' controls how this is handled.