I have a set trainFeaturesand a set testFeatureswith positive, neutral and negative labels:
trainFeats = negFeats + posFeats + neutralFeats
testFeats = negFeats + posFeats + neutralFeats
For example, one entry inside trainFeatsis
(['blue', 'yellow', 'green'], 'POSITIVE')
the same for the list of test functions, so I specify the labels for each set. My question is, how can I use the scikit implementation of the Random Forest classifier and SVM to get the accuracy of this classifier as a whole with accuracy and feedback for each class? The problem is that I am currently using words as functions, and from what I read, these classifiers require numbers. Can I achieve my goal without changing functionality? Many thanks!
source
share