Comparing version 6.1.2 to 6.2.0
@@ -0,1 +1,10 @@ | ||
# [6.2.0](https://github.com/mljs/matrix/compare/v6.1.2...v6.2.0) (2019-07-20) | ||
### Features | ||
* add NIPALS loop for factorization ([#91](https://github.com/mljs/matrix/issues/91)) ([043c8b6](https://github.com/mljs/matrix/commit/043c8b6)) | ||
## [6.1.2](https://github.com/mljs/matrix/compare/v6.1.1...v6.1.2) (2019-06-29) | ||
@@ -2,0 +11,0 @@ |
117
matrix.d.ts
@@ -111,13 +111,13 @@ type MaybeMatrix = AbstractMatrix | number[][]; | ||
/** | ||
* Constructs a matrix with the chosen dimensions from a 1D array. | ||
* @param newRows - Number of rows. | ||
* @param newColumns - Number of columns. | ||
* @param newData - A 1D array containing data for the matrix. | ||
* @returns The new matrix. | ||
*/ | ||
/** | ||
* Constructs a matrix with the chosen dimensions from a 1D array. | ||
* @param newRows - Number of rows. | ||
* @param newColumns - Number of columns. | ||
* @param newData - A 1D array containing data for the matrix. | ||
* @returns The new matrix. | ||
*/ | ||
static from1DArray( | ||
newRows: number, | ||
newColumns: number, | ||
newData: number[] | ||
newData: number[], | ||
): Matrix; | ||
@@ -163,11 +163,7 @@ | ||
*/ | ||
static rand( | ||
rows: number, | ||
columns: number, | ||
options?: IRandomOptions | ||
): Matrix; | ||
static rand(rows: number, columns: number, options?: IRandomOptions): Matrix; | ||
static random( | ||
rows: number, | ||
columns: number, | ||
options?: IRandomOptions | ||
options?: IRandomOptions, | ||
): Matrix; | ||
@@ -184,3 +180,3 @@ | ||
columns: number, | ||
options?: IRandomIntOptions | ||
options?: IRandomIntOptions, | ||
): Matrix; | ||
@@ -223,4 +219,4 @@ | ||
* Returns a matrix whose elements are the maximum between `matrix1` and `matrix2`. | ||
* @param matrix1 | ||
* @param matrix2 | ||
* @param matrix1 | ||
* @param matrix2 | ||
*/ | ||
@@ -325,3 +321,3 @@ static max(matrix1: MaybeMatrix, matrix2: MaybeMatrix): Matrix; | ||
* rows of the original matrix, and columns times the number of columns of the original matrix. | ||
* | ||
* | ||
* @example | ||
@@ -577,3 +573,3 @@ * var matrix = new Matrix([[1, 2]]); | ||
/** | ||
* Returns a new column-by-column scaled matrix. | ||
* Returns a new column-by-column scaled matrix. | ||
* @param options | ||
@@ -630,3 +626,3 @@ * @example | ||
startColumn: number, | ||
endColumn: number | ||
endColumn: number, | ||
): Matrix; | ||
@@ -643,3 +639,3 @@ | ||
startColumn?: number, | ||
endColumn?: number | ||
endColumn?: number, | ||
): Matrix; | ||
@@ -656,3 +652,3 @@ | ||
startRow?: number, | ||
endRow?: number | ||
endRow?: number, | ||
): Matrix; | ||
@@ -669,3 +665,3 @@ | ||
startRow: number, | ||
startColumn: number | ||
startColumn: number, | ||
): this; | ||
@@ -750,3 +746,3 @@ | ||
by: MatrixDimension, | ||
options?: IVarianceByOptions | ||
options?: IVarianceByOptions, | ||
): number[]; | ||
@@ -820,9 +816,6 @@ | ||
matrix: MaybeMatrix, | ||
value: ScalarOrMatrix | ||
value: ScalarOrMatrix, | ||
): Matrix; | ||
static rightShift(matrix: MaybeMatrix, value: ScalarOrMatrix): Matrix; | ||
static zeroFillRightShift( | ||
matrix: MaybeMatrix, | ||
value: ScalarOrMatrix | ||
): Matrix; | ||
static zeroFillRightShift(matrix: MaybeMatrix, value: ScalarOrMatrix): Matrix; | ||
@@ -934,3 +927,3 @@ // Functional operators (one arg) | ||
rowIndices: number[], | ||
columnIndices: number[] | ||
columnIndices: number[], | ||
); | ||
@@ -945,3 +938,3 @@ } | ||
startColumn: number, | ||
endColumn: number | ||
endColumn: number, | ||
); | ||
@@ -963,3 +956,3 @@ } | ||
array: number[], | ||
options?: IWrap1DOptions | ||
options?: IWrap1DOptions, | ||
): WrapperMatrix1D; | ||
@@ -983,3 +976,3 @@ | ||
rightHandSide: MaybeMatrix, | ||
useSVD?: boolean | ||
useSVD?: boolean, | ||
): Matrix; | ||
@@ -1024,3 +1017,3 @@ | ||
matrix: MaybeMatrix, | ||
options?: ILinearDependenciesOptions | ||
options?: ILinearDependenciesOptions, | ||
): Matrix; | ||
@@ -1034,10 +1027,7 @@ | ||
*/ | ||
export function pseudoInverse( | ||
matrix: MaybeMatrix, | ||
threshold?: number | ||
): Matrix; | ||
export function pseudoInverse(matrix: MaybeMatrix, threshold?: number): Matrix; | ||
export function covariance( | ||
matrix: MaybeMatrix, | ||
options?: ICovarianceOptions | ||
options?: ICovarianceOptions, | ||
): Matrix; | ||
@@ -1048,3 +1038,3 @@ | ||
yMatrix: MaybeMatrix, | ||
options?: ICovarianceOptions | ||
options?: ICovarianceOptions, | ||
): Matrix; | ||
@@ -1054,3 +1044,3 @@ | ||
matrix: MaybeMatrix, | ||
options?: ICorrelationOptions | ||
options?: ICorrelationOptions, | ||
): Matrix; | ||
@@ -1061,3 +1051,3 @@ | ||
yMatrix: MaybeMatrix, | ||
options?: ICorrelationOptions | ||
options?: ICorrelationOptions, | ||
): Matrix; | ||
@@ -1143,3 +1133,3 @@ | ||
/** | ||
* | ||
* | ||
* @param value - The matrix to decompose | ||
@@ -1190,1 +1180,42 @@ */ | ||
export { QrDecomposition as QR }; | ||
export interface INipalsOptions { | ||
/** | ||
* A column vector of length `X.rows` that contains known labels for supervised PLS. | ||
*/ | ||
Y?: MaybeMatrix | number[]; | ||
/** | ||
* The maximum number of allowed iterations before beraking the loop if convergence is not achieved. | ||
* Default: 1000 | ||
*/ | ||
maxIterations?: boolean; | ||
/** | ||
* Termination criteria | ||
* Default: 1e-10 | ||
*/ | ||
terminationCriteria?: number; | ||
} | ||
export class Nipals { | ||
/** | ||
* Implementation of the NIPALS algorithm. | ||
* Geladi, P and Kowalski, B.R. (1986) | ||
* Partial least squares and regression: | ||
* a tutorial. | ||
* Analytica Chimica Acta 185, 1-17. | ||
* @param X - A matrix to be factored | ||
* @param options | ||
*/ | ||
constructor(X: MaybeMatrix, options?: INipalsOptions); | ||
w: Matrix; | ||
s: Matrix; | ||
t: number; | ||
xResidual: Matrix; | ||
p: Matrix; | ||
q: Matrix; | ||
u: number; | ||
yResidual: Matrix; | ||
betas: number; | ||
} | ||
export { Nipals as NIPALS }; |
{ | ||
"name": "ml-matrix", | ||
"version": "6.1.2", | ||
"version": "6.2.0", | ||
"description": "Matrix manipulation and computation library", | ||
@@ -65,2 +65,3 @@ "main": "matrix.js", | ||
"mathjs": "^6.0.2", | ||
"ml-dataset-iris": "^1.0.0", | ||
"numeric": "^1.2.6", | ||
@@ -67,0 +68,0 @@ "pretty-hrtime": "^1.0.3", |
@@ -17,13 +17,14 @@ export { AbstractMatrix, default, default as Matrix } from './matrix'; | ||
default as SingularValueDecomposition, | ||
default as SVD | ||
default as SVD, | ||
} from './dc/svd.js'; | ||
export { | ||
default as EigenvalueDecomposition, | ||
default as EVD | ||
default as EVD, | ||
} from './dc/evd.js'; | ||
export { | ||
default as CholeskyDecomposition, | ||
default as CHO | ||
default as CHO, | ||
} from './dc/cholesky.js'; | ||
export { default as LuDecomposition, default as LU } from './dc/lu.js'; | ||
export { default as QrDecomposition, default as QR } from './dc/qr.js'; | ||
export { default as Nipals, default as NIPALS } from './dc/nipals.js'; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
315897
40
10157
15