-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
75 additions
and
36 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import cheminfo from 'eslint-config-cheminfo-typescript'; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
...cheminfo, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
rules: {} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,12 @@ import { sortCollectionSet } from './util/sortCollectionSet'; | |
* Solves XtX*K = XtY for the variables in Pset | ||
* if XtX (or XtX(vars,vars)) is singular, performs the svd and find pseudo-inverse, otherwise (even if ill-conditioned) finds inverse with LU decomposition and solves the set of equations | ||
* it is consistent with matlab results for ill-conditioned matrices (at least consistent with test 'ill-conditioned square X rank 2, Y 3x1' in cssls.test) | ||
* @param Cssls object, @see {@link Cssls} | ||
* @param options - @see {@link Cssls} | ||
* @param options.XtX | ||
Check warning on line 16 in src/cssls.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options.XtY | ||
Check warning on line 17 in src/cssls.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options.Pset | ||
Check warning on line 18 in src/cssls.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options.nColsX | ||
Check warning on line 19 in src/cssls.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options.nColsY | ||
Check warning on line 20 in src/cssls.ts GitHub Actions / nodejs / lint-eslint
|
||
*/ | ||
export function cssls({ XtX, XtY, Pset, nColsX, nColsY }: Cssls): Matrix { | ||
let K = Matrix.zeros(nColsX, nColsY); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,13 @@ interface Initialisation { | |
/** | ||
* Solves OLS problem, overwriting the negative values of K with 0. | ||
* It also pre-computes part of the pseudo-inverse used to solve Least Squares. | ||
* @param XtX - input data matrix | ||
* @param XtY - output data matrix | ||
* @param options | ||
Check warning on line 16 in src/initialisation.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options.XtX - input data matrix | ||
* @param options.XtY - output data matrix | ||
* @param options.nRowsX | ||
* @param options.nColsX | ||
* @param options.nRowsY | ||
* @param options.nColsY | ||
* @returns initial values for the algorithm (including the solution K to least squares, overwriting of negative values with 0) | ||
*/ | ||
export function initialisation({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters