Abstract class for all models that do not rely on the python library 'transformers'.
Objects of this 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.
model
('tensorflow_model' or 'pytorch_model')
Field for storing the 'tensorflow' or 'pytorch' model after loading.
model_config
('list()')
List for storing information about the configuration of the model.
last_training
('list()')
List for storing the history, the configuration, and the results of the last
training. This information will be overwritten if a new training is started.
last_training$start_time
: Time point when training started.
last_training$learning_time
: Duration of the training process.
last_training$finish_time
: Time when the last training finished.
last_training$history
: History of the last training.
last_training$data
: Object of class table
storing the initial frequencies of the passed data.
last_training$config
: List storing the configuration used for the last training.
get_model_info()
Method for requesting the model information.
AIFEBaseModel$get_model_info()
list
of all relevant model information.
get_text_embedding_model()
Method for requesting the text embedding model information.
AIFEBaseModel$get_text_embedding_model()
list
of all relevant model information on the text embedding model underlying the model.
set_publication_info()
Method for setting publication information of the model.
AIFEBaseModel$set_publication_info(authors, citation, url = NULL)
authors
List of authors.
citation
Free text citation.
url
URL of a corresponding homepage.
Function does not return a value. It is used for setting the private members for publication information.
get_publication_info()
Method for requesting the bibliographic information of the model.
AIFEBaseModel$get_publication_info()
list
with all saved bibliographic information.
set_model_license()
Method for setting the license of the model.
AIFEBaseModel$set_model_license(license = "CC BY")
license
string
containing the abbreviation of the license or the license text.
Function does not return a value. It is used for setting the private member for the software license of the model.
get_model_license()
Method for getting the license of the model.
AIFEBaseModel$get_model_license()
license
string
containing the abbreviation of the license or the license text.
string
representing the license for the model.
set_documentation_license()
Method for setting the license of the model's documentation.
AIFEBaseModel$set_documentation_license(license = "CC BY")
license
string
containing the abbreviation of the license or the license text.
Function does not return a value. It is used for setting the private member for the documentation license of the model.
get_documentation_license()
Method for getting the license of the model's documentation.
AIFEBaseModel$get_documentation_license()
license
string
containing the abbreviation of the license or the license text.
Returns the license as a string
.
set_model_description()
Method for setting a description of the model.
AIFEBaseModel$set_model_description(
eng = NULL,
native = NULL,
abstract_eng = NULL,
abstract_native = NULL,
keywords_eng = NULL,
keywords_native = NULL
)
eng
string
A text describing the training, its theoretical and empirical background, and output in
English.
native
string
A text describing the training , its theoretical and empirical background, and output in
the native language of the model.
abstract_eng
string
A text providing a summary of the description in English.
abstract_native
string
A text providing a summary of the description in the native language of the
model.
keywords_eng
vector
of keyword in English.
keywords_native
vector
of keyword in the native language of the model.
Function does not return a value. It is used for setting the private members for the description of the model.
get_model_description()
Method for requesting the model description.
AIFEBaseModel$get_model_description()
list
with the description of the classifier in English and the native language.
dir_path
string
Path of the directory where the model should be saved.
folder_name
string
Name of the folder that should be created within the directory.
Function does not return a value. It saves the model to disk.
dir_path
string
Path of the directory where the model is saved.
Function does not return a value. It is used to load the weights of a model.
get_package_versions()
Method for requesting a summary of the R and python packages' versions used for creating the model.
AIFEBaseModel$get_package_versions()
Returns a list
containing the versions of the relevant R and python packages.
get_sustainability_data()
Method for requesting a summary of tracked energy consumption during training and an estimate of the resulting CO2 equivalents in kg.
AIFEBaseModel$get_sustainability_data()
Returns a list
containing the tracked energy consumption, CO2 equivalents in kg, information on the
tracker used, and technical information on the training infrastructure.
get_ml_framework()
Method for requesting the machine learning framework used for the model.
AIFEBaseModel$get_ml_framework()
Returns a string
describing the machine learning framework used for the classifier.
get_text_embedding_model_name()
Method for requesting the name (unique id) of the underlying text embedding model.
AIFEBaseModel$get_text_embedding_model_name()
Returns a string
describing name of the text embedding model.
check_embedding_model()
Method for checking if the provided text embeddings are created with the same TextEmbeddingModel as the model.
AIFEBaseModel$check_embedding_model(text_embeddings)
text_embeddings
Object of class EmbeddedText or LargeDataSetForTextEmbeddings.
TRUE
if the underlying TextEmbeddingModel are the same. FALSE
if the models differ.
count_parameter()
Method for counting the trainable parameters of a model.
AIFEBaseModel$count_parameter()
Returns the number of trainable parameters of the model.
is_configured()
Method for checking if the model was successfully configured. An object can only be used if this
value is TRUE
.
AIFEBaseModel$is_configured()
bool
TRUE
if the model is fully configured. FALSE
if not.
get_private()
Method for requesting all private fields and methods. Used for loading and updating an object.
AIFEBaseModel$get_private()
Returns a list
with all private fields and methods.
get_all_fields()
Return all fields.
AIFEBaseModel$get_all_fields()
Method returns a list
containing all public and private fields
of the object.
clone()
The objects of this class are cloneable with this method.
AIFEBaseModel$clone(deep = FALSE)
deep
Whether to make a deep clone.