tommy.model.model_parameters_model
Classes
- class tommy.model.model_parameters_model.ModelParametersModel(derive_from: ModelParametersModel = None)[source]
Bases:
object
A class representing the topic modelling parameters.
- __init__(derive_from: ModelParametersModel = None)[source]
Create an instance of ModelParametersModel :param derive_from: If derive_from is None, then all parameters are set to the default value. If derive_from is set to an instance of ModelParametersModel, all parameters will be copied from there
- alpha: float
- alpha_beta_custom_enabled: bool
- beta: float
- default_alpha: float = 0.33
- default_alpha_beta_custom_enabled: bool = False
- default_bert_max_features: int | None = None
- default_bert_min_df: float | None = None
- default_beta: float = 0.33
- default_n_topics: int = 3
- default_word_amount: int = 10
- classmethod from_dict(model_parameters_dict: dict) ModelParametersModel [source]
Create a ModelParametersModel instance from a dictionary representation. :param model_parameters_dict: Dictionary representation of the model parameters :return: ModelParametersModel instance
- n_topics: int
- to_dict()[source]
Convert the model parameters object to a dictionary. :return: Dictionary representation of the model parameters
- word_amount: int