Quickly train and evaluate a Transformer classification model on a given dataset.
QuickFormer allows you to:
- Produce and evaluate a Transformer classification model by only one line of code
- Evaluate the model and find precision, recall, and F1 score for all classes
- Generate confusion matrices for the model
-
Prepare your initial data in a CSV file with the columns
textandcat_label. Name the filemodel_name_input.csvwheremodel_nameis an arbitrary name. -
Call the
quickform()function. The only mandatory argument is the model name (model_name). The function will automatically load the data from the CSV file, train the model, evaluate it and saves all the results in files starting withmodel_name.
That's it!
model_name_train_data.csv- the data used for trainingmodel_name_test_data.csv- the data used for testingmodel_name_confusion_matrix.png- a visualization of the confusion matrixmodel_name_confusion_matrix_normalized.png- a visualization of the confusion matrix with normalized valuesmodel_name_confusion_matrix.txt- the raw data of the confusion matrixmodel_name_precision_recall_f1.txt- the data for precision, recall, and F1 score for each of the classesmodel_name_codes.txt- relation between the codes and the different classes in the datasetoutputs_model_name- saved model, which can be later reused for inference
Enjoy using QuickFormer!