# multilabelsvm

> multilabel svm classifier for browser/nodejs

Latest version **1.0.4** (published 2015-09-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install multilabelsvm
pnpm add multilabelsvm
yarn add multilabelsvm
bun add multilabelsvm
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2015-09-29 |
| First published | 2015-09-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | vimalpt1 |
| Maintainers | vimalpt1 |
| Keywords | multilabel, classifiers, multiclass, classifiers, svmjs, svmclassifier, multiclass, svmclassifier, svm, nlp |

## Links

- npm: https://www.npmjs.com/package/multilabelsvm
- Repository: https://github.com/vimalpt/multilabelsvm
- Homepage: https://github.com/vimalpt/multilabelsvm#readme
- Issues: https://github.com/vimalpt/multilabelsvm/issues
- npm.io page: https://npm.io/package/multilabelsvm

## Dependencies (1)

- [svm](https://npm.io/package/svm.md) *

## Recent versions

- 1.0.4 (latest) — 2015-09-29
- 1.0.3 — 2015-09-29
- 1.0.2 — 2015-09-29
- 1.0.1 — 2015-09-29
- 1.0.0 — 2015-09-29

## README

# multilabelsvm
This library allows svm(support vector mechine) to support multiclasses in nodejs and browser.


## installation 

### node
```
npm install multilabelsvm
```
for svm kernel option refer svmjs 

initialize the classifier as the following 

```
	var multilabel = require('multilabelsvm' );
	var actionClassifier = new multilabel.Classifier({kernel : 'linear'});
```

### browser

You need to include svmjs for this.

```javascript
// include the library
<script src="./svmjs/lib/svm.js"></script>
<script src="./lib/multilabelsvm.js"></script>
<script>

var actionClassifier = new Classifier({
										kernel : 'rbf',
										C : 1.0,
										feature:{
											ngrams:2,
											casesensitive:true}
										});


</script>
```

## Usage

Example usages are given below.
svm configuration you can use all the parameter specified by the svmjs

in features option it suports ngrams,casesensitive
 

```javascript

var trainSet = [
{ input:'What is your name',output: "name" },
{ input:'how are you',output: "fine"},
{ input:'please tell your name please',output: "name" },
{ input:'your name please',output: "name" },
{ input:'what is your name',output: "name" },
{ input:'who am i',output: "listener" },
{ input:'who are you ',output: "name" },
{ input:'may i know your name',output: "name" },
{ input:'your name',output: "name" },
{ input:'where you coming from',output: "about" },
{ input:'how do you do',output: "fine" },
{ input:'how are you doing',output: "fine"},
{ input:'how are you',output: "fine"},
{ input:'how do you do',output: "fine"},
{ input:'how are you',output: "fine"},
{ input:'what do you do',output: "fine"},
{ input:'can you edit this',output: "edit"},


]

actionClassifier.trainBatch(trainSet);



console.log(actionClassifier.classify('who are you'))
console.log(actionClassifier.classify('how are you'))

//backing up
var json = actionClassifier.toJSON()
var newActionClassifier = new multilabel.Classifier();
console.log('----------New Classifier----');
//importing
newActionClassifier.fromJSON(json);
console.log(newActionClassifier.classify('how are you'));
console.log(newActionClassifier.classify('who are you'));

```

---
_Source: https://npm.io/package/multilabelsvm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
