Comparing version 6.0.0-2 to 6.0.0-3
{ | ||
"name": "ml-matrix", | ||
"version": "6.0.0-2", | ||
"version": "6.0.0-3", | ||
"description": "Matrix manipulation and computation library", | ||
@@ -53,3 +53,3 @@ "main": "matrix.js", | ||
"devDependencies": { | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", | ||
"@babel/plugin-transform-modules-commonjs": "^7.4.3", | ||
"benchmark": "^2.1.4", | ||
@@ -69,5 +69,4 @@ "csv-parse": "^4.4.0", | ||
"dependencies": { | ||
"ml-array-max": "^1.1.1", | ||
"ml-array-rescale": "^1.2.1" | ||
} | ||
} |
@@ -1351,4 +1351,5 @@ import rescale from 'ml-array-rescale'; | ||
for (var i = 0; i < this.rows; i++) { | ||
var scaled = rescale(this.getRow(i), { min, max }); | ||
newMatrix.setRow(i, scaled); | ||
const row = this.getRow(i); | ||
rescale(row, { min, max, output: row }); | ||
newMatrix.setRow(i, row); | ||
} | ||
@@ -1375,7 +1376,9 @@ return newMatrix; | ||
for (var i = 0; i < this.columns; i++) { | ||
var scaled = rescale(this.getColumn(i), { | ||
const column = this.getColumn(i); | ||
rescale(column, { | ||
min: min, | ||
max: max | ||
max: max, | ||
output: column | ||
}); | ||
newMatrix.setColumn(i, scaled); | ||
newMatrix.setColumn(i, column); | ||
} | ||
@@ -1833,3 +1836,3 @@ return newMatrix; | ||
const variance = this.variance(means, unbiased); | ||
const variance = this.variance(unbiased, means); | ||
for (var i = 0; i < variance.length; i++) { | ||
@@ -1836,0 +1839,0 @@ variance[i] = Math.sqrt(variance[i]); |
@@ -215,3 +215,3 @@ import { Matrix, WrapperMatrix2D } from '../index'; | ||
V[n - 1][n - 1] = 1; | ||
V.set(n - 1, n - 1, 1); | ||
e[0] = 0; | ||
@@ -218,0 +218,0 @@ } |
@@ -1,3 +0,1 @@ | ||
import max from 'ml-array-max'; | ||
import Matrix from './matrix'; | ||
@@ -60,7 +58,5 @@ import SingularValueDecomposition from './dc/svd'; | ||
var x = svd.solve(b); | ||
var error = max( | ||
Matrix.sub(b, Abis.mmul(x)) | ||
.abs() | ||
.to1DArray() | ||
); | ||
var error = Matrix.sub(b, Abis.mmul(x)) | ||
.abs() | ||
.max(); | ||
results.setRow( | ||
@@ -67,0 +63,0 @@ i, |
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
1
290794
- Removedml-array-max@^1.1.1