$ npm install --save ml-regression-simple-linear Usage import { SimpleLinearRegression } from 'ml-regression-simple-linear'; const x = [0.5, 1, 1.5, 2, 2.5]; const y = [0, 1, 2, 3, 4]; const regression = new SimpleLinearRegression(x, y); regression.slope; // 2 regression.int...
$ npm i ml-regression-exponential Usage This calculates parameters A and B for the equationy = B * e^(A * x). import{ExponentialRegression}from'ml-regression-exponential';constx=[0,1,2,3,4];consty=[1.5,2.5,3.5,5.0,7.5];constregression=newExponentialRegression(x,y);regression.A;// ...
Compare npm package download counts over time to spot trends and see which to use and which to avoid.
$ npm install ml-regression Examples Simple linear regression constSLR=require("ml-regression").SLR;letinputs=[80,60,10,20,30];letoutputs=[20,40,30,50,60];letregression=newSLR(inputs,outputs);regression.toString(3)==="f(x) = - 0.265 * x + 50.6"; ...
$ npm i ml-regression-polynomial Usage import{PolynomialRegression}from'ml-regression-polynomial';constx=[50,50,50,70,70,70,80,80,80,90,90,90,100,100,100];consty=[3.3,2.8,2.9,2.3,2.6,2.1,2.5,2.9,2.4,3.0,3.1,2.8,3.3,3.5,3.0,];constdegree=5;// setup the maximum degree of the po...
$ npm i ml-regression-power Usage This calculates parameters A and B for the equationy = A * x^B. License MIT About Power Regression mljs.github.io/regression-power/ Resources Readme License MIT license Activity Custom properties Stars ...
$ npm i ml-pls Usage PLS import PLS from 'ml-pls'; const X = [ [0.1, 0.02], [0.25, 1.01], [0.95, 0.01], [1.01, 0.96], ]; const Y = [ [1, 0], [1, 0], [1, 0], [0, 1], ]; const options = { latentVectors: 10, tolerance: 1e-4, }; const pls = new PLS(...
npm install @stdlib/ml-incr-sgd-regression Alternatively, To load the package in a website via a script tag without installation and bundlers, use the ES Module available on the esm branch (see README). If you are using Deno, visit the deno branch (see README for usage intructions). ...
(http://gruntjs.com/creating-plugins#storing-task-files) .grunt # node-waf configuration .lock-wscript # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules jspm_packages # Optional npm cache directory .npm # Optional REPL history ....
npm i ml-random-forest API Documentation Usage As classifier importIrisDatasetfrom'ml-dataset-iris';import{RandomForestClassifierasRFClassifier}from'ml-random-forest';consttrainingSet=IrisDataset.getNumbers();constpredictions=IrisDataset.getClasses().map((elem)=>IrisDataset.getDistinctClasses().indexOf(...