A library to implement basic machine learning in the browser
npm install @cudemans/ml.jsA small library for machine learning in JavaScript.
Currently a work in progress - logistic regression not tested
So far the package can only be installed through npm. unpkg coming soon.
To install:
npm install @cudemans/ml.js
Functionality is based on the sklearn model, and includes:
1. LinearRegression
2. LogisticRegression
1. Accuracy
2. Mean absolute error
3. Mean squared error
4. Root mean squared error
5. R squared
``
const linReg = new LinearRegression()
linReg.fit(xTrain, y_train)
const predictions = linReg.predict(xTest)
const accuracy = linreg.score(yTest, predictions)
`
import { linearRegression } from "@cudemans/ml.js"`