jiegzhan / multi-class-text-classification-cnn-rnn

Classify Kaggle San Francisco Crime Description into 39 classes. Build the model with CNN, RNN (GRU and LSTM) and Word Embeddings on Tensorflow.
https://www.kaggle.com/c/sf-crime/data
Apache License 2.0
599 stars 262 forks source link

KeyError: 'RECOVERED VEHICLE',what's the small_sample.csv? #39

Open EagleYing opened 5 years ago

EagleYing commented 5 years ago

(tensorflow) F:\Postgraduate\KaggleLearning\multi-class-text-classification-cnn-rnn-master\multi-class-text-classification-cnn-rnn-master>python predict.py ./t rained_results_1541818386/ ./data2/samples.csv D:\Anaconda\anaconda\envs\tensorflow\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial warnings.warn("detected Windows; aliasing chunkize to chunkize_serial") Traceback (most recent call last): File "predict.py", line 141, in predict_unseen_data() File "predict.py", line 68, in predict_unseendata x, y_, df = load_test_data(test_file, labels) File "predict.py", line 43, in load_testdata y = df[select[1]].apply(lambda x: label_dict[x]).tolist() File "D:\Anaconda\anaconda\envs\tensorflow\lib\site-packages\pandas\core\series.py", line 3194, in apply mapped = lib.map_infer(values, f, convert=convert_dtype) File "pandas/_libs/src\inference.pyx", line 1472, in pandas._libs.lib.mapinfer File "predict.py", line 43, in y = df[select[1]].apply(lambda x: label_dict[x]).tolist() KeyError: 'RECOVERED VEHICLE'