Marijkevandesteene / MachineLearning

repo to share progress and to manage versions of exam MachineLearning (M14)
0 stars 2 forks source link

Plot predicted revenue for top 100 selection vs Random selection #54

Closed Marijkevandesteene closed 4 months ago

Marijkevandesteene commented 4 months ago

To plot in predicted revenue for top 100 selection vs Random selection a bar chart

# Creating the dataframe
data = {
    'Labels': ['Random sample', 'Top 200'],
    'Predicted Revenue': [total_revenue_pred_sample, total_revenue_pred_selection]
}

df = pd.DataFrame(data)

# Plotting the bar chart
plt.bar(df['Labels'], df['Predicted Revenue'], color=['blue', 'green'])
plt.xlabel('Selection of hotel guests')
plt.ylabel('Predicted Revenue')
plt.title('Predicted Revenue Comparison')
plt.show()
dluts commented 4 months ago

Done