com.datumbox.framework.core.machinelearning.common.dataobjects
Class KnowledgeBase<MP extends ModelParameters,TP extends TrainingParameters>
- java.lang.Object
-
- com.datumbox.framework.core.machinelearning.common.dataobjects.KnowledgeBase<MP,TP>
-
- Type Parameters:
MP-TP-
- All Implemented Interfaces:
- Savable, java.lang.AutoCloseable
public class KnowledgeBase<MP extends ModelParameters,TP extends TrainingParameters> extends java.lang.Object implements Savable
The KnowledgeBase stores internally the training and model parameters of the algorithm.
-
-
Constructor Summary
Constructors Constructor and Description KnowledgeBase(java.lang.String storageName, Configuration configuration)Constructor which is called when we pre-trained load stored models.KnowledgeBase(java.lang.String storageName, Configuration configuration, TP trainingParameters)Constructor which is called on model initialization before training.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclear()Clears the KnowledgeBase object by deleting all its data, while keeping open the connection to the storage engine.voidclose()voiddelete()Deletes the storage of the algorithm and closes the storage engine.ConfigurationgetConfiguration()Getter for the Configuration.MPgetModelParameters()Getter for the Model Parameters.StorageEnginegetStorageEngine()Getter for the Storage Engine.TPgetTrainingParameters()Getter for the Training Parameters.voidsave(java.lang.String storageName)Saves the KnowledgeBase using the storage engine.
-
-
-
Constructor Detail
-
KnowledgeBase
public KnowledgeBase(java.lang.String storageName, Configuration configuration, TP trainingParameters)Constructor which is called on model initialization before training.- Parameters:
storageName-configuration-trainingParameters-
-
KnowledgeBase
public KnowledgeBase(java.lang.String storageName, Configuration configuration)Constructor which is called when we pre-trained load stored models.- Parameters:
storageName-configuration-
-
-
Method Detail
-
getStorageEngine
public StorageEngine getStorageEngine()
Getter for the Storage Engine.- Returns:
-
getConfiguration
public Configuration getConfiguration()
Getter for the Configuration.- Returns:
-
getTrainingParameters
public TP getTrainingParameters()
Getter for the Training Parameters.- Returns:
-
getModelParameters
public MP getModelParameters()
Getter for the Model Parameters.- Returns:
-
save
public void save(java.lang.String storageName)
Saves the KnowledgeBase using the storage engine.
-
delete
public void delete()
Deletes the storage of the algorithm and closes the storage engine.
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
clear
public void clear()
Clears the KnowledgeBase object by deleting all its data, while keeping open the connection to the storage engine.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG