Skip to content

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
Also fixes the build.
  • Loading branch information
targos committed Oct 16, 2024
1 parent aab5dfb commit a498858
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 26 deletions.
11 changes: 11 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import cheminfo from "eslint-config-cheminfo/base";
import globals from "globals";

export default [
...cheminfo,
{
languageOptions: {
globals: { ...globals.jest },
},
},
];
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,25 @@
"testEnvironment": "node"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@types/jest": "^29.5.12",
"eslint": "^8.57.0",
"eslint-config-cheminfo": "^9.2.0",
"@babel/plugin-transform-modules-commonjs": "^7.25.7",
"@types/jest": "^29.5.13",
"eslint": "^9.12.0",
"eslint-config-cheminfo": "^12.0.1",
"globals": "^15.11.0",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"rollup": "^4.17.2"
"prettier": "^3.3.3",
"rollup": "^4.24.0"
},
"dependencies": {
"ml-kernel": "^3.0.0",
"ml-matrix": "^6.11.0",
"ml-regression-base": "^3.0.0",
"ml-regression-exponential": "^2.1.0",
"ml-matrix": "^6.12.0",
"ml-regression-base": "^4.0.0",
"ml-regression-exponential": "^3.0.1",
"ml-regression-multivariate-linear": "^2.0.4",
"ml-regression-polynomial": "^3.0.0",
"ml-regression-power": "^2.0.0",
"ml-regression-polynomial": "^3.0.1",
"ml-regression-power": "^3.0.0",
"ml-regression-robust-polynomial": "^3.0.0",
"ml-regression-simple-linear": "^3.0.0",
"ml-regression-theil-sen": "^2.0.0"
"ml-regression-simple-linear": "^3.0.1",
"ml-regression-theil-sen": "^3.0.0"
}
}
14 changes: 7 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import PotentialRegression from "./regression/potential-regression";
import { PotentialRegression } from "./regression/potential-regression";

export {
SimpleLinearRegression,
SimpleLinearRegression as SLR,
} from "ml-regression-simple-linear";
export { PolynomialRegression } from "ml-regression-polynomial";
export { default as ExponentialRegression } from "ml-regression-exponential";
export { default as PowerRegression } from "ml-regression-power";
export { ExponentialRegression } from "ml-regression-exponential";
export { PowerRegression } from "ml-regression-power";
export { default as MultivariateLinearRegression } from "ml-regression-multivariate-linear";
const NLR = {
PotentialRegression,
};
export { NLR, NLR as NonLinearRegression };

export {
default as KernelRidgeRegression,
default as KRR,
KernelRidgeRegression,
KernelRidgeRegression as KRR,
} from "./regression/kernel-ridge-regression";
export { default as PolinomialFitting2D } from "./regression/poly-fit-regression2d";
export { PolynomialFitRegression2D as PolinomialFitting2D } from "./regression/poly-fit-regression2d";

// robust regressions
export { default as TheilSenRegression } from "ml-regression-theil-sen";
export { TheilSenRegression } from "ml-regression-theil-sen";
export { RobustPolynomialRegression } from "ml-regression-robust-polynomial";
4 changes: 2 additions & 2 deletions src/regression/kernel-ridge-regression.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Kernel from "ml-kernel";
import { Matrix, solve } from "ml-matrix";
import BaseRegression from "ml-regression-base";
import { BaseRegression } from "ml-regression-base";

const defaultOptions = {
lambda: 0.1,
Expand All @@ -11,7 +11,7 @@ const defaultOptions = {

// Implements the Kernel ridge regression algorithm.
// http://www.ics.uci.edu/~welling/classnotes/papers_class/Kernel-Ridge.pdf
export default class KernelRidgeRegression extends BaseRegression {
export class KernelRidgeRegression extends BaseRegression {
constructor(inputs, outputs, options) {
super();
if (inputs === true) {
Expand Down
4 changes: 2 additions & 2 deletions src/regression/poly-fit-regression2d.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Matrix, SVD } from "ml-matrix";
import BaseRegression from "ml-regression-base";
import { BaseRegression } from "ml-regression-base";

const defaultOptions = {
order: 2,
};
// Implements the Kernel ridge regression algorithm.
// http://www.ics.uci.edu/~welling/classnotes/papers_class/Kernel-Ridge.pdf
export default class PolynomialFitRegression2D extends BaseRegression {
export class PolynomialFitRegression2D extends BaseRegression {
/**
* Constructor for the 2D polynomial fitting
*
Expand Down
4 changes: 2 additions & 2 deletions src/regression/potential-regression.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import BaseRegression, { maybeToPrecision } from "ml-regression-base";
import { BaseRegression, maybeToPrecision } from "ml-regression-base";
import { PolynomialRegression } from "ml-regression-polynomial";

/*
Expand All @@ -10,7 +10,7 @@ import { PolynomialRegression } from "ml-regression-polynomial";
* @param {Number} M - The exponent of the potential fit.
* @return {Number} A - The A coefficient of the potential fit.
*/
export default class PotentialRegression extends BaseRegression {
export class PotentialRegression extends BaseRegression {
/**
* @constructor
* @param x: Independent variable
Expand Down

0 comments on commit a498858

Please sign in to comment.