Merge changes

This commit is contained in:
augustin64 2025-04-01 09:30:28 +02:00
parent 8481103e4d
commit ada69748ce

View File

@ -335,6 +335,17 @@
" return df.copy()" " return df.copy()"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"id": "fda6aaad-7b1e-4daa-8d28-cd049df9cec2",
"metadata": {},
"outputs": [],
"source": [
"data_features=filter_df(data)\n",
"data_features"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"id": "d1eb67d7-d16b-4b93-8486-582830ac3903", "id": "d1eb67d7-d16b-4b93-8486-582830ac3903",
@ -407,9 +418,11 @@
] ]
}, },
{ {
"cell_type": "markdown", "cell_type": "code",
"id": "48cbb634-6754-4956-a945-539d329812ef", "execution_count": null,
"id": "24e7ff6e-c308-4cc8-aeac-eeb372f4c479",
"metadata": {}, "metadata": {},
"outputs": [],
"source": [ "source": [
"In this part, we achieved to do two things for the classification: create a decision tree on the database and, given a cheese and its characteristics, find where it originates from. \n", "In this part, we achieved to do two things for the classification: create a decision tree on the database and, given a cheese and its characteristics, find where it originates from. \n",
"\n" "\n"
@ -507,8 +520,27 @@
"metadata": {}, "metadata": {},
"source": [ "source": [
"Not good, even quite bad. \n", "Not good, even quite bad. \n",
"We cannot find the region a cheese originates from given its characteristic. \n", "In short, it seems that we cannot find the region a cheese originates from given its characteristic. "
"\n", ]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7fd507d0-1a68-4cd7-a12e-12c9ab1061e3",
"metadata": {},
"outputs": [],
"source": [
"model.predict(X)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9faf2aee-84f5-4633-b3de-039af42d31d3",
"metadata": {},
"outputs": [],
"source": [
"yprime=pd.DataFrame(model.predict(X),columns=[\"latitude\",\"longitude\"])\n",
"\n" "\n"
] ]
}, },
@ -578,9 +610,11 @@
] ]
}, },
{ {
"cell_type": "markdown", "cell_type": "code",
"id": "84bf779a-36d0-4aa2-b3a2-0da9bb25fc01", "execution_count": null,
"id": "78ef08e7-1436-440f-b035-8b480af1cc7b",
"metadata": {}, "metadata": {},
"outputs": [],
"source": [ "source": [
"For Pattern Mining, we only kept relevant columns (binary attributes) thus dropping RGB colors and any location based information, keeping only information relevant to the final cheese itself.\n", "For Pattern Mining, we only kept relevant columns (binary attributes) thus dropping RGB colors and any location based information, keeping only information relevant to the final cheese itself.\n",
"\n", "\n",
@ -588,24 +622,6 @@
"\n", "\n",
"Est-ce que les fromages artisanaux ont souvent plus de \"goûts\" que les autres ?\n" "Est-ce que les fromages artisanaux ont souvent plus de \"goûts\" que les autres ?\n"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ce4db7c9-8049-4838-af30-b9fe2bca2925",
"metadata": {},
"outputs": [],
"source": [
"len(data_features[data_features[\"pecorino\"] == True]), len(data_features[data_features[\"pecorino\"] == False])"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7d9f17c2-6c42-4f24-b0d0-e8640a661801",
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {