title: scikit-learn - Prediction model return "wrong" prediction
body: <p>I have below dataset in a CSV file called <code>shipments.csv</code>. The file have >8k rows:</p>
  
  <pre><code>| Consignor Code | Consignee Code | Origin | Destination | Carrier Code | 
  |----------------|----------------|--------|-------------|--------------| 
  | 6403623194     | 6405167792     | DKCPH  | AUMEL       | 6402746389   | 
  | 6403623194     | 6403823770     | DKBLL  | CNTSN       | 6402746354   | 
  | 6403623194     | 6403823770     | DKBLL  | CNTSN       | 6402746354   | 
  | 6403623194     | 6402546085     | DKBLL  | USDEN       | 6402746424   | 
  | 6403623194     | 6402546085     | DKBLL  | USDEN       | 6402746424   | 
  ...
  </code></pre>
  
  <p>I am trying to create a simple model, where I can predict the <code>Destination</code> based on the <code>Consignee Code</code>.</p>
  
  <p>To do that, I have created below code:</p>
  
  <pre class="lang-py prettyprint-override"><code>#Load the dataset and remove unwanted columns and NaN values.
  dataset = pd.read_csv('shipments_non_empty.csv', header=0, skip_blank_lines=True)
  dataset.drop(columns=['Consignor Code','Carrier Code', 'Origin'], inplace=True)
  dataset.dropna(subset=['Consignee Code', 'Destination'], inplace=True)
  
  #Treat the Consignee Code as a string
  dataset['Consignee Code'] = dataset['Consignee Code'].astype('int64')
  
  #Define our target (what we want to predict) - and remove it from the 
  target = dataset.pop('Destination')
  
  #Convert all our data to numeric values, so we can use the .fit function.
  #For that, we use LabelEncoder
  le_consignee = preprocessing.LabelEncoder()
  le_target = preprocessing.LabelEncoder()
  target = le_target.fit_transform(list(target))
  dataset['Consignee Code'] = le_consignee.fit_transform(
      list(dataset['Consignee Code']))
  
  # Prepare the dataset.
  X_train, X_test, y_train, y_test = train_test_split(
      dataset, target, test_size=0.30, random_state=42)
  </code></pre>
  
  <p>At this point, my dataset (train/test) is ready. I then move on to fit the model and predict on a new input:</p>
  
  <pre class="lang-py prettyprint-override"><code># Prepare the model and .fit it.
  model = RandomForestClassifier()
  model.fit(X_train, y_train)
  
  # Make a prediction on the test set.
  predictions = model.predict(X_test)
  
  # Print the accuracy score.
  print("The accuracy score of the predicted output is: {}".format(
      accuracy_score(y_test, predictions)))
  
  #Test on a new input.
  new_input = ["6402546085"]
  fitted_new_input = np.array([le_consignee.transform([new_input[0]])[0]])
  new_predictions = model.predict(fitted_new_input.reshape(1, -1))
  
  print(le_target.inverse_transform(new_predictions))
  </code></pre>
  
  <p>The above code will print out below:</p>
  
  <pre><code>The accuracy score of the predicted output is: 0.7233265720081136
  ['SAJED']
  </code></pre>
  
  <p>As you can see, it predicts the destination as "SAJED". I am finding this very odd, as <strong>none</strong> of my dataset, where the <code>Consignee Code</code> is <code>6402546085</code>, is the destination <code>SAJED</code>.</p>
  
  <p>What am I doing wrong here?  </p>