the goal of my project is to predict the accuracy level of some textual descriptions.
I made the vectors with FASTTEXT.
TSV output:
label lenght
1 0 1:43
2 0 1:10
3 0 1:8
4 0 1:110
5 1 1:105
6 0 1:446
Then I'm processing the .tsv files using the library e1071 by this script:
library (e1071)
accuracy.model = read.table(file = 'file.tsv', sep = '\t', header = FALSE, col.names= c( "label", "lenght" ))
head(accuracy.model)
classifier = svm( formula = label ~ .,
data = accuracy.model,
type = 'C-classification',
kernel = 'radial',
cost = 32,
gamma = 8,
cross = 10)
classifier
Doing the cross validation (10 folds) I'm able to retrieve the overall accuracy percentage.
I would like to have also the F1 score, precision and recall value.
For the confusion matrix I went through some others stack thread and I figured out that has to be done using the caret library but I don't know how to do it.
Suggestions?
Regards