
Base class for models using neural nets
Source:R/obj_ModelsBasedOnTextEmbeddings.R
ModelsBasedOnTextEmbeddings.Rd
Abstract class for all models that do not rely on the python library 'transformers'. All models of this class require text embeddings as input. These are provided as objects of class EmbeddedText or LargeDataSetForTextEmbeddings.
Objects of this class containing fields and methods used in several other classes in 'AI for Education'.
This class is not designed for a direct application and should only be used by developers.
See also
Other R6 Classes for Developers:
AIFEBaseModel
,
ClassifiersBasedOnTextEmbeddings
,
LargeDataSetBase
,
TEClassifiersBasedOnProtoNet
,
TEClassifiersBasedOnRegular
Super class
aifeducation::AIFEBaseModel
-> ModelsBasedOnTextEmbeddings
Methods
Inherited methods
aifeducation::AIFEBaseModel$count_parameter()
aifeducation::AIFEBaseModel$get_all_fields()
aifeducation::AIFEBaseModel$get_documentation_license()
aifeducation::AIFEBaseModel$get_ml_framework()
aifeducation::AIFEBaseModel$get_model_description()
aifeducation::AIFEBaseModel$get_model_info()
aifeducation::AIFEBaseModel$get_model_license()
aifeducation::AIFEBaseModel$get_package_versions()
aifeducation::AIFEBaseModel$get_private()
aifeducation::AIFEBaseModel$get_publication_info()
aifeducation::AIFEBaseModel$get_sustainability_data()
aifeducation::AIFEBaseModel$is_configured()
aifeducation::AIFEBaseModel$is_trained()
aifeducation::AIFEBaseModel$load()
aifeducation::AIFEBaseModel$save()
aifeducation::AIFEBaseModel$set_documentation_license()
aifeducation::AIFEBaseModel$set_model_description()
aifeducation::AIFEBaseModel$set_model_license()
aifeducation::AIFEBaseModel$set_publication_info()
Method get_text_embedding_model_name()
Method for requesting the name (unique id) of the underlying text embedding model.
Method check_embedding_model()
Method for checking if the provided text embeddings are created with the same TextEmbeddingModel as the model.
Arguments
text_embeddings
Object of class EmbeddedText or LargeDataSetForTextEmbeddings.
Returns
TRUE
if the underlying TextEmbeddingModel are the same. FALSE
if the models differ.
Method load_from_disk()
loads an object from disk and updates the object to the current version of the package.
Method plot_training_history()
Method for requesting a plot of the training history. This method requires the R package 'ggplot2' to work.
Usage
ModelsBasedOnTextEmbeddings$plot_training_history(
final_training = FALSE,
pl_step = NULL,
measure = "loss",
y_min = NULL,
y_max = NULL,
add_min_max = TRUE,
text_size = 10
)
Arguments
final_training
bool
IfFALSE
the values of the performance estimation are used. IfTRUE
only the epochs of the final training are used.pl_step
int
Number of the step during pseudo labeling to plot. Only relevant if the model was trained with active pseudo labeling.measure
Measure to plot.
y_min
Minimal value for the y-axis. Set to
NULL
for an automatic adjustment.y_max
Maximal value for the y-axis. Set to
NULL
for an automatic adjustment.add_min_max
bool
IfTRUE
the minimal and maximal values during performance estimation are port of the plot. IfFALSE
only the mean values are shown. Parameter is ignored iffinal_training=TRUE
.text_size
Size of the text.
Returns
Returns a plot of class ggplot
visualizing the training process.
Prepare history data of objects
Function for preparing the history data of a model in order to be plotted in AI for Education - Studio.
final bool
If TRUE
the history data of the final training is used for the data set.
pl_step int
If use_pl=TRUE
select the step within pseudo labeling for which the data should be prepared.
Returns a named list
with the training history data of the model. The
reported measures depend on the provided model.
Utils Studio Developers internal