CustomLearner

class nimble.CustomLearner

Class for creating custom learners for use within the Nimble API.

Base class defining a hierarchy of objects which encapsulate what is needed to be a single learner callable through the Custom Universal Interface. At minimum, a subclass must provide a learnerType attribute, an implementation for the method apply and at least one out of train or incrementalTrain. If incrementalTrain is implemented yet train is not, then incrementalTrain is used in place of calls to train. Furthermore, a subclass must not require any arguments for its __init__ method.

Keywords

algorithm, model, regression, classification, neural network, clustering, supervised learning, unsupervised learning, deep learning, predictor, estimator

Attributes

learnerType

Describe the type of the learner.

Methods

apply(testX)

Apply the learner to the testing data.

getApplyDefaults()

Class method used to determine the default values of only the apply method.

getApplyParameters()

Class method used to determine the parameters of only the apply method.

getLearnerDefaultValues()

Class method used by the a custom learner interface to supply learner parameter default values to the user through the standard nimble functions.

getLearnerParameterNames()

Class method used by the a custom learner interface to supply learner parameters to the user through the standard nimble functions.

getScores(testX)

If this learner is a classifier, then return the scores for each class on each data point, otherwise raise an exception.

getTrainDefaults()

Class method used to determine the default values of only the train method.

getTrainParameters()

Class method used to determine the parameters of only the train method.

incrementalTrain(trainX, trainY)

Train or continue training the learner on new training data.

train(trainX, trainY)

Train the learner on the training data.