Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Mar 24, 2021
1 parent c811168 commit 1871fb2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/workflows/documentationjs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Deploy documentation.js on GitHub pages

on:
workflow_dispatch:
release:
types: [published]

Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
branches: master
pull_request:

env:
NODE_VERSION: 14.x

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm install
- name: Run ESLint
Expand All @@ -22,10 +25,11 @@ jobs:
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,33 @@ on:
branches:
- master

env:
NODE_VERSION: 14.x

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Get package name
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.BOT_TOKEN }}
release-type: node
package-name: 'ml-levenberg-marquardt'
package-name: ${{ env.PACKAGE_NAME }}
bump-minor-pre-major: Yes
- uses: actions/checkout@v2
# These if statements ensure that a publication only occurs when a new release is created
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm install
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOT_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# levenberg-marquardt

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![build status][ci-image]][ci-url]
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]

Expand All @@ -22,9 +22,11 @@ In order to get a general idea of the problem you could also check the [Wikipedi
Next there is some options could change the behavior of the code.

### centralDifference

The jacobian matrix is approximated by finite difference; forward differences or central differences (one additional function evaluation). The option centralDifference select one of them, by default the jacobian is calculated by forward difference.

### gradientDifference

The jacobian matrix is approximated as mention above, the gradientDifference option is the step size (dp) to calculate de difference between the function with the current parameter state and the perturbation added. It could be a number (same step size for all parameters) or an array with different values for each parameter, if the gradientDifference is zero the derive will be zero, and the parameter will hold fixed

## Example
Expand All @@ -47,7 +49,7 @@ let data = {
],
y: [
/* y1, y2, ... */
]
],
};

// array of initial parameter values
Expand All @@ -70,7 +72,7 @@ const options = {
maxValues: maxValues,
gradientDifference: 10e-2,
maxIterations: 100,
errorTolerance: 10e-3
errorTolerance: 10e-3,
};

let fittedParams = LM(data, sinFunction, options);
Expand All @@ -82,11 +84,11 @@ Or test it in [Runkit](https://runkit.com/npm/ml-levenberg-marquardt)

[MIT](./LICENSE)

[npm-image]: https://img.shields.io/npm/v/ml-levenberg-marquardt.svg?style=flat-square
[npm-image]: https://img.shields.io/npm/v/ml-levenberg-marquardt.svg
[npm-url]: https://npmjs.org/package/ml-levenberg-marquardt
[travis-image]: https://img.shields.io/travis/mljs/levenberg-marquardt/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/mljs/levenberg-marquardt
[codecov-image]: https://img.shields.io/codecov/c/github/mljs/levenberg-marquardt.svg?style=flat-square
[codecov-image]: https://img.shields.io/codecov/c/github/mljs/levenberg-marquardt.svg
[codecov-url]: https://codecov.io/gh/mljs/levenberg-marquardt
[download-image]: https://img.shields.io/npm/dm/ml-levenberg-marquardt.svg?style=flat-square
[ci-image]: https://github.com/mljs/levenberg-marquardt/workflows/Node.js%20CI/badge.svg?branch=master
[ci-url]: https://github.com/mljs/levenberg-marquardt/actions?query=workflow%3A%22Node.js+CI%22
[download-image]: https://img.shields.io/npm/dm/ml-levenberg-marquardt.svg
[download-url]: https://npmjs.org/package/ml-levenberg-marquardt
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@
},
"homepage": "https://github.com/mljs/levenberg-marquardt#readme",
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.12.1",
"@babel/plugin-transform-modules-commonjs": "^7.13.8",
"benchmark": "^2.1.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.14.0",
"eslint-config-cheminfo": "^5.2.2",
"eslint": "^7.22.0",
"eslint-config-cheminfo": "^5.2.3",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-prettier": "^3.2.0",
"eslint-plugin-jest": "^24.3.2",
"eslint-plugin-prettier": "^3.3.1",
"jest": "^26.6.3",
"jest-matcher-deep-close-to": "^2.0.1",
"prettier": "^2.2.1",
"rollup": "^2.34.1"
"rollup": "^2.42.3"
},
"dependencies": {
"is-any-array": "^0.1.0",
"ml-matrix": "^6.5.3"
"is-any-array": "^1.0.0",
"ml-matrix": "^6.7.0"
},
"config": {
"commitizen": {
Expand Down

0 comments on commit 1871fb2

Please sign in to comment.