tommy.controller.model_parameters_controller
Classes
- class tommy.controller.model_parameters_controller.ModelParametersController[source]
Bases:
object
Controls the access to and changes to the parameters to be used in topic modelling
- property algorithm_changed_event: EventHandler[None]
The event that is triggered when the algorithm is changed
- get_bert_max_features() int | None [source]
Return the maximum number of terms in the BERTopic matrix
- get_model_alpha_beta_custom_enabled() bool [source]
Return whether the alpha and beta parameters should be set manually
- property n_topics_changed_event: EventHandler[int]
The event that is triggered when the number of topics is changed
- on_model_swap() None [source]
Notify the frontend that the model parameters model has changed :return: None
- property params_model_changed_event: EventHandler[None]
This event gets triggered when the model parameters model is changed for example due to changing configs :return: The event
- set_bert_max_features(max_features: int | None) None [source]
Set the value of the minimum frequency of a term in the BERTopic algorithm :param max_features: new value of min_df
- set_bert_min_df(min_df: float | None) None [source]
Set the value of the minimum frequency of a term in the BERTopic algorithm :param min_df: new value of min_df
- set_model_alpha_beta_custom_enabled(enabled: bool) None [source]
Set whether the alpha and beta parameters should be set manually :param enabled: whether the parameters should be set manually
- set_model_n_topics(n_topics: int) None [source]
Set the number of topics to use in the topic modelling :param n_topics: the desired number of topics
- set_model_refs(model_parameters_model: ModelParametersModel) None [source]
Set the reference to the model-parameters-model