I have a terror attack (tabular) data set. Each row is one attack and there are columns like:

  • Date of the attack (daily resolution)
  • Location of the attack (long/lat, as well as city/country)
  • Number of casualties
  • Attack/weapon type
  • A few boolean columns like whether it was a suicide attack

Furthermore, I have a text column that holds a 2-3 sentence description of the attack. This is the main column I want to use for training/predicting.

There are several target columns of the form "is_left_wing", "is_right_wing", etc. The values are 0, 1, and -1. Here 0 means the attack didn't have the respective motive, 1 means it had the motive and -1 means it is unknown.

In short, my goal is to build a model that is trained on the 0 and 1 values in the target columns and makes predictions about the -1s.

The main thing I'm stuck on is how to extract features from the text column with the attack description. I have limited NLP experience and I want to use something more sophisticated than a simple bag of words model.

I would appreciate suggestions about the general approach to this problem (also some good readings on the topic).


1 Answer 1


Use word embedding and encode the entire sentence into one fixed feature vector by using vanilla RNN or more sophisticated model like attentional LSTM.
see Sentiment analysis using RNNs(LSTM)
Concat the other features with the fixed length representation of the sentence and append on top of them either dense layer.
the architecture feedforward(concat(other_features,RNN(sentence)))


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.