title: How to concatenate two TF-IDF Vectors as well as other features that can be fed into a model?
body: <p><strong>The solution I found that works in my case is posted below. Hope this helps someone.</strong>
  How would I concatenate the output of TF-IDF created with sklearn to be passed into a Keras model or tensor that could then be fed into a dense neural network? I'm working on the FakeNewsChallenge dataset. Any guidance would be helpful.</p>
  <p>The FakeNewsChallenge dataset is as such:</p>
  <p>Training Set - [Headline, Body text, label]</p>
  <ul>
  <li>Training Set is split into two different CSVs (train_bodies, train_stances) and are linked by BodyIDs.</li>
  <li>train_bodies - [Body ID (num), articleBody (text)]</li>
  <li>train_stances - [Headline (text), Body ID (num), Stance (text)]</li>
  </ul>
  <p>Test Set - [Headline, Bodytext]</p>
  <ul>
  <li>Test set is split into two different CSVs (test_stances_inlabled, test_bodies]</li>
  <li>Test_bodies - [Body ID, aritcleBody]</li>
  <li>Test_stances_unlabled - [Headline, Body ID]</li>
  </ul>
  <p>Distribution makes it extremely hard:</p>
  <ul>
  <li>rows - 49972</li>
  <li>unrelated - 0.73131</li>
  <li>discuss - 0.17828</li>
  <li>agree - 0.076012</li>
  <li>disagree - 0.0168094</li>
  </ul>
  <p>Stance - [ unrelated, discuss, agree, disagree]</p>
  <hr />
  <p>What I would like to do is concatenate two separate TF-IDF Vectors as well as other features that I can then feed into a some layer for instance a dense layer. How would you go about that? I</p>