Skip to content

Instantly share code, notes, and snippets.

@michelkana
Created October 26, 2021 15:38
Show Gist options
  • Save michelkana/54b9caf22d8cafbadb8f988de3f082e2 to your computer and use it in GitHub Desktop.
Save michelkana/54b9caf22d8cafbadb8f988de3f082e2 to your computer and use it in GitHub Desktop.
best_model = KNNModels[3]
x_new = np.arange(start=1, stop=3*365*24*60, step=1)
x_new = x_new.reshape(-1, 1)
y_new_predicted = best_model.predict(x_new)
indices_min_score = np.argwhere(y_new_predicted == 0)
index_min_score = indices_min_score[-1][0]
index_max_score = np.argmax(y_new_predicted)
plt.figure(figsize=(20, 5))
plt.plot(x_new / (24*60), y_new_predicted)
plt.axvline(x=index_max_score / (24*60), color='red')
plt.axvline(x=index_min_score / (24*60), color='green')
plt.xlabel('Days Played')
plt.ylabel('Score')
plt.title('Fortnite Performance Prediction between ' +
str(round(index_min_score / (24*60))) + ' days and ' +
str(round(index_max_score / (24*60))) + ' days');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment