{% block title %} Choosing a machine learning model {% endblock %}
{% block title %} Choosing a Machine Learning Model {% endblock %}
{% block content %}
<divclass="subheading">Choosing a Machine Learning Model</div>
...
...
@@ -16,294 +16,298 @@
<imgsrc="{{ url_for('static', filename='images/models_accuracy.png') }}"alt="Accuracy of Each Model"class="accuracy-chart-image">
</div>
<divclass="description">In these confusion matrices, we can see how logistic regression has the greatest number of predicted moods matching the true moods for all except "Calm". When we compare the accuracies we see that logistic regression performs the best, where the accuracy is how many correctly classified instances there are over the total number of instances. However, this may not always be the best measure if the dataset is not completely balanced (there are slight differences in number of songs per mood in the dataset). So, we can look at other metrics to compare the models:</div>
<hrclass="gradient">
<divclass="table">
<tableclass="table1">
<thead>
<tr>
<th>Gaussian NB</th>
<th>Precision</th>
<th>Recall</th>
<th>F1-Score</th>
<th>Support</th>
</tr>
</thead>
<tbody>
<tr>
<td>Calm</td>
<td>0.48</td>
<td>0.68</td>
<td>0.57</td>
<td>47</td>
</tr>
<tr>
<td>Excited</td>
<td>0.76</td>
<td>0.69</td>
<td>0.72</td>
<td>51</td>
</tr>
<tr>
<td>Happy</td>
<td>0.49</td>
<td>0.63</td>
<td>0.55</td>
<td>35</td>
</tr>
<tr>
<td>Sad</td>
<td>0.95</td>
<td>0.59</td>
<td>0.73</td>
<td>64</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Accuracy</td>
<td> </td>
<td> </td>
<td>0.64</td>
<td>197</td>
</tr>
<tr>
<td>Macro Avg</td>
<td>0.67</td>
<td>0.65</td>
<td>0.64</td>
<td>197</td>
</tr>
<tr>
<td>Weighted Avg</td>
<td>0.71</td>
<td>0.64</td>
<td>0.66</td>
<td>197 </td>
</tr>
</tbody>
</table>
</div>
<divclass="description">In the confusion matrices, we can see how logistic regression has the greatest number of predicted moods matching the true moods for all except "Calm". When we compare the accuracies we see that logistic regression performs the best, where the accuracy is how many correctly classified instances there are over the total number of instances. However, this may not always be the best measure if the dataset is not completely balanced (there are slight differences in number of songs per mood in the dataset). So, we can look at other metrics to compare the models:</div>