Hello,
Thanks for sharing this project. I am trying to run it and I have encountered a couple of problems. I will submit another pug report in a moment.
Here I am getting an error that I tried to fix by setting the inputs to document_term_matrix as numpy arrays but that still do not help. Do you have any ideas on what the problem is?
I am using Python 3.
Regards
Burke
TypeError Traceback (most recent call last)
in ()
----> 1 precision, recall, fscore = crossValidate(chisqDtm, labels, "SVM", 10)
in crossValidate(document_term_matrix, labels, classifier, nfold)
16 for train_index, test_index in skf:
17 print(train_index, test_index)
---> 18 X_train, X_test = document_term_matrix[train_index], document_term_matrix[test_index]
19 y_train, y_test = labels[train_index], labels[test_index]
20 model = clf.fit(X_train, y_train)
TypeError: only integer arrays with one element can be converted to an index