Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imgcook/datacook
Machine Learning and Data Analysis in JavaScript.
https://github.com/imgcook/datacook
data-science feature-engineering javascript machine-learning
Last synced: 3 months ago
JSON representation
Machine Learning and Data Analysis in JavaScript.
- Host: GitHub
- URL: https://github.com/imgcook/datacook
- Owner: imgcook
- License: apache-2.0
- Created: 2020-10-26T11:50:24.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-26T07:30:19.000Z (about 2 years ago)
- Last Synced: 2024-07-11T15:41:59.361Z (4 months ago)
- Topics: data-science, feature-engineering, javascript, machine-learning
- Language: TypeScript
- Homepage: https://imgcook.github.io/datacook
- Size: 3.41 MB
- Stars: 43
- Watchers: 11
- Forks: 7
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: Contributing.md
- License: LICENSE
Awesome Lists containing this project
- awesome-imgcook - imgcook/datacook - A JavaScript library for feature engineering on datasets. (JavaScript packages for machine learning / Feature engineering)
README
# DataCook
Machine learning and data science library for Javascript / Typescript.
---
## Getting started
### Dependencies
DataCook is built for javascript environment and can run in both [node.js](https://nodejs.org/) platform and browser. DataCook relies on [tensorflow.js](https://www.tensorflow.org/js) for basic numeric computation.
### Quick installation
DataCook can be installed by npm:
```bash
npm install @pipcook/datacook
```or by yarn
```javascript
yarn add @pipcook/datacook
```### Quick start: Train a simple linear-regression model
```javascript
import { Model } from '@pipcook/datacook';const { LinearRegression } = Model;
const X = [
[4, 5],
[2, 3],
[1, 4],
[3, 8],
];
const y = [10, 5.5, 6.5, 12];
// create model
const lm = new LinearRegression();
// train linear model using feature set X and label set y
await lm.fit(X, y);
// get prediction
const yPred = lm.predict(X);
yPred.print();
// [10, 6, 6, 12]
```