title: Scikit-learn crashing when using linear_kernel
body: <p>I'm going through the following tutorial:</p>
  <p><a href="https://www.datacamp.com/community/tutorials/recommender-systems-python" rel="nofollow noreferrer">https://www.datacamp.com/community/tutorials/recommender-systems-python</a></p>
  <p>When I'm attempting to run the content based recommendation code, the execution halts outputting &quot;Killed&quot; on the terminal, which some say it's an out of memory issue. But I have 16gb of RAM on my machine, I doubt this would be an issue.</p>
  <p>The code is crashing on the last line of this snippet:</p>
  <pre><code>#Construct the required TF-IDF matrix by fitting and transforming the data
  tfidf_matrix = tfidf.fit_transform(metadata['overview'])
  
  #Output the shape of tfidf_matrix
  print(tfidf_matrix.shape)
  
  
  #Array mapping from feature integer indices to feature name.
  tfidf.get_feature_names()[5000:5010]
  
  
  # Compute the cosine similarity matrix   (THE LINE BELOW CRASHES)
  cosine_sim = linear_kernel(tfidf_matrix, tfidf_matrix) 
  </code></pre>
  <p>The terminal outputs this:</p>
  <pre><code>5.618207215134185
  160.0
  0    Led by Woody, Andy's toys live happily in his ...
  1    When siblings Judy and Peter discover an encha...
  2    A family wedding reignites the ancient feud be...
  3    Cheated on, mistreated and stepped on, the wom...
  4    Just when George Banks has recovered from his ...
  Name: overview, dtype: object
  (45466, 75827)
  Killed
  </code></pre>
  <p>I've tried changing</p>
  <pre><code>metadata = pd.read_csv('movies_metadata.csv', low_memory=False)
  </code></pre>
  <p>to</p>
  <pre><code>metadata = pd.read_csv('movies_metadata.csv', low_memory=True)
  </code></pre>
  <p>But that didn't work.</p>
  <p>What do I need to change in order to execute the code without hanging?</p>