Class: Classification

Classification(typeopt)

new Classification(typeopt)

Creates a set of classification objects using the constructor from emscripten
Parameters:
Name Type Attributes Description
type string <optional>
which classification algorithm to use
Properties:
Name Type Description
Module.ClassificationCpp function constructor from emscripten
Source:

Methods

getK() → {Array}

Returns a vector of current k values for each model.
Source:
Returns:
k values
Type
Array

process(input)

Deprecated! USe run() instead
Parameters:
Name Type Description
input
Source:

reset() → {Boolean}

Returns the model set to its initial configuration.
Source:
Returns:
true indicates successful initialization
Type
Boolean

run(input) → {Array}

Does classifications on an input vector.
Parameters:
Name Type Description
input Array An array of features to be processed. Non-arrays are converted.
Source:
Returns:
output - One number for each model in the set
Type
Array

setK(whichModel, newK)

Sets the k values for a particular model model.
Parameters:
Name Type Description
whichModel Number which model
newK Number set K to this value
Source:

train(trainingSet) → {Boolean}

Trains the models using the input. Clears previous training set.
Parameters:
Name Type Description
trainingSet Object An array of training examples.
Source:
Returns:
true indicates successful training
Type
Boolean