Constructor
new TrainingSet(inputDimensionopt, outputDimensionopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
inputDimension |
Number |
<optional> |
null | Input dimension
(if |
outputDimension |
Number |
<optional> |
null | Output dimension.
(if |
- Source:
Example
import * as mano from 'mano-js/client';
const example = new mano.Example();
const trainingSet = new mano.TrainingSet();
const xmmProcessor = new mano.XmmProcesssor();
example.setLabel('test');
example.addElement([0, 1, 2, 3]);
const rapidMixJsonExample = example.toJSON();
trainingSet.addExample(rapidMixJsonExample);
const rapidMixJsonTrainingSet = trainingSet.toJSON();
xmmProcessor
.train(rapidMixJsonTrainingSet)
.then(() => { ... });
Members
length
Get the number of examples.
- Source:
Methods
addExample(example)
Add an example to the training set.
Parameters:
Name | Type | Description |
---|---|---|
example |
JSON | A rapid-mix formatted example. |
- Source:
addTrainingSet(trainingSet)
Add all examples from another rapid-mix JSON training set.
Parameters:
Name | Type | Description |
---|---|---|
trainingSet |
JSON | A rapid-mix compliant training set. |
- Source:
clear()
Clear the training set.
- Source:
getLabels() → {Array.String}
Return an array of the current training set labels.
- Source:
Returns:
- Sorted labels of the training set.
- Type
- Array.String
removeExampleAtIndex(index)
Remove example at index.
Parameters:
Name | Type | Description |
---|---|---|
index |
Number | The index of the example to remove. |
- Source:
removeExamplesByLabel(label)
Remove all examples of a certain label.
Parameters:
Name | Type | Description |
---|---|---|
label |
String | The label of the recordings to be removed. |
- Source:
setTrainingSet(trainingSet)
Initialize from another rapid-mix JSON training set. If null
, clear the
trainingSet.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
trainingSet |
JSON | null | A rapid-mix compliant training set. |
- Source:
toJSON() → {JSON}
Return the rapid-mix compliant training set in JSON format.
- Source:
Returns:
- Training set.
- Type
- JSON