Abstract
Protected
constructorProtected
Readonly
batchProtected
Readonly
consoleProtected
Readonly
dataProtected
Readonly
epochProtected
Readonly
nameProtected
Readonly
nameProtected
Readonly
useAbstract
doGets a sample of test data and returns the model output, with some basic operations to reshape the output as 1d tensor.
A list of two elements that are 1d tensors corresponding to a list [b1, b2, ...]. These two list are 0-1 lists for each batch element to be a bot trajectory (1 means bot).
The batch size for the sample.
Get prediction and labels and return the accuracy per class.
The model prediction reshaped as 1D tensor of 0 (human) or 1 (bot).
The true labels, 1d tensor of 0 or 1.
Get prediction and labels and return the confusion matrix.
The model prediction reshaped as 1D tensor of 0 (human) or 1 (bot).
The true labels, 1d tensor of 0 or 1.
Abstract
loadAbstract
runRun the entire model logic, including loading (if nameToLoad is not null), load all data, train the model, save it (if nameToSave is not null), test it and show all additional information with tfjs-vis or in the console.
Abstract
saveGet the model prediction batch and its corresponding labels as 1D tensors and show with tfjs-vis or in console (according to useTfjsVis and consoleInfo) the accuracy of each class and the confusion matrix.
The model prediction reshaped as 1D tensor of 0 (human) or 1 (bot).
The true labels, 1d tensor of 0 or 1.
Default to "validation", used in the container name of tfjs-vis.
Abstract
trainGenerated using TypeDoc
An abstract class to represent a model that we can train from a DataTraining instance. This model is originally meant to be used as a classifier. There are two main implementations : RandomForestModel for Random Forest and TensorFlowModel for Neural Networks.
You can extend this class to create a brand-new classifier architecture.