MOYSES
Description
MOYSES is a Support Vector Machine (SVM) library for node.js using TypeScript. It's used for binary classification purposes using n-dimensional datasets.
Overview

Directory structure
.├── core│ ├── engine│ │ └── svm.ts│ └── kernels│ └── kernels.ts├── index.ts├── types│ └── dataset_type.ts└── utils ├── dataset_generation │ ├── dataset_generator.ts │ └── generate_points.ts └── utils.ts How to build the library to be used in production-ready projects?
npm install moyses
How to use?
// will generate 10 pairs of labeled data you might as well wanna use your own dataset; //instanciate SVM; //classify data;; Svm arguments :
dataset: type: IDataset Interface can be found in lib/types/dataset_type.ts or see example below.c: type: number c parameter for soft margin classification.kernel: type: string Only 'RBF' kernel is supported yet.- OPTIONAL
rbfSigma: type: number variance. Default value = 15 .
DatasetGenerator arguments :
shape: type: string Overall shape of dataset (CIRCULAR, LINEAR, XOR).total: type: number Total amount of data pairs (1 and -1 output).- OPTIONAL
dimension: type: number dataset dimension default is 2 dim.
Note: Dataset boundaries are fixed. This should be fixed at some point..
Example dataset :
NPM custom commands
build: Build the JavaScript files.build:watch: Build the JavaScript files in watch mode.test: Run jest in test mode.test:watch: Run jest in interactive test mode.docs: Generate the docs directory.lint: Runs linter on the whole project.
Other/Optional considerations
The model converges, however it is a simplified version of the sequential minimum optimisation algorithm published by John C.Platt.
Please follow the links below for more informations on the model.
- https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-98-14.pdf
- http://cs229.stanford.edu/materials/smo.pdf
License
Bastien GUIHARD