...
Receive the path to the model type and the configuration for the path.
Load
Code Block |
---|
language | py |
---|
theme | FadeToGrey |
---|
|
def load(self, model_dir, name, version): |
Receive the path to the model type, the name of the model and the version of it, in this section the loading of the model is expected.
Save
Code Block |
---|
language | py |
---|
theme | FadeToGrey |
---|
|
def save(self): |
Save the current loaded model.
Clear
Code Block |
---|
language | py |
---|
theme | FadeToGrey |
---|
|
def clear(self): |
Remove the current loaded model, and any training data in memory.
Feed
Code Block |
---|
language | py |
---|
theme | FadeToGrey |
---|
|
def feed(self, data): |
Receives a list of string tokens to be added to the training data.
Train
Code Block |
---|
language | py |
---|
theme | FadeToGrey |
---|
|
def train(self, **kwargs): |
Trains the model with the documents fed, the model can be either kept in memory or saved.
Predict
Code Block |
---|
language | py |
---|
theme | FadeToGrey |
---|
|
def predict(self, data: list): |
...
Implements regression. We yet haven't implement a model for this particular method, at the moment it exists for future implementation.
Classify
Code Block |
---|
language | py |
---|
theme | FadeToGrey |
---|
|
def classify(self, data) -> (str, float): |
...