src.core.hmm package#
Submodules#
src.core.hmm.hmm module#
- class src.core.hmm.hmm.HMM(config_dict)[source]#
Bases:
object
A class to run HMM data preprocessing, training and inference
- Parameters:
config_dict (dict) – Config Params Dictionary
- evaluate(Y, YP)[source]#
Evaluation metrics
- Parameters:
Y (list) – True Labels
YP (list) – Prediction labels
- Returns:
Metrics Dictionary (clf_report, conf_matrix)
- Return type:
dict
- fit(X, y)[source]#
Fits HMM algo on preprocessed text
- Parameters:
X (list) – List of sentences
y (list) – Labels
- predict(X)[source]#
Predicts labels for text
- Parameters:
X (list) – List of sentences
- Returns:
Prediction labels
- Return type:
list