Create Classifiers to Predict HEEM labels on Texts

Use this notebook to generate the classifiers needed to predict HEEM labels for new texts. You only need to do this once. The notebook saves the classifiers on you hard disk.

Usage:

%run embem/machinelearning/rakel_save_clf.py <train file> <output_dir>

The train file is in <embodied emotions data directory>/ml/all_spellingnormalized.txt (or use <embodied emotions data directory>/ml/all.txt to train classifiers based on non spelling normalized data.)

The classifier object is saved to <output_dir>/classifier.pkl

Training the classifiers takes a couple of minutes.


In [4]:
%run embem/machinelearning/rakel_save_clf.py /home/jvdzwaan/data/embem/ml/all_spellingnormalized.txt /home/jvdzwaan/data/tmp/classifier/


start training
finished training
saved /home/jvdzwaan/data/tmp/classifier//classifier.pkl