mirror of
https://github.com/ArthurDanjou/ArtStudies.git
synced 2026-02-01 10:29:32 +01:00
Correction de la mise en forme et mise à jour de la version de Python dans le notebook TP_2_M2_ISF.ipynb
This commit is contained in:
@@ -44,7 +44,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
"id": "97d58527",
|
"id": "be5e7be4",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
@@ -52,13 +52,13 @@
|
|||||||
"import pandas as pd\n",
|
"import pandas as pd\n",
|
||||||
"import numpy as np\n",
|
"import numpy as np\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#Graphiques \n",
|
"# Graphiques\n",
|
||||||
"import seaborn as sns\n",
|
"import seaborn as sns\n",
|
||||||
"sns.set()\n",
|
"sns.set()\n",
|
||||||
"import plotly.express as px\n",
|
"import plotly.express as px\n",
|
||||||
"import plotly.graph_objects as gp\n",
|
"import plotly.graph_objects as gp\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#Statistiques\n",
|
"# Statistiques\n",
|
||||||
"from scipy.stats import chi2_contingency\n",
|
"from scipy.stats import chi2_contingency\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Machine Learning\n",
|
"# Machine Learning\n",
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": 3,
|
||||||
"id": "c9597b48",
|
"id": "c9597b48",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
@@ -140,8 +140,7 @@
|
|||||||
"#Itinitialisation algo\n",
|
"#Itinitialisation algo\n",
|
||||||
"kmeans = KMeans(init=init_points.reshape(-1,1),\n",
|
"kmeans = KMeans(init=init_points.reshape(-1,1),\n",
|
||||||
" n_clusters=#Complétez avec votre code,\n",
|
" n_clusters=#Complétez avec votre code,\n",
|
||||||
" n_init = 1) \n",
|
" n_init = 1)"
|
||||||
" "
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -155,7 +154,7 @@
|
|||||||
"data_x = np.array(x)\n",
|
"data_x = np.array(x)\n",
|
||||||
"data_x = data_x.reshape(-1,1)\n",
|
"data_x = data_x.reshape(-1,1)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Fitting \n",
|
"# Fitting\n",
|
||||||
"kmeans.fit(data_x)"
|
"kmeans.fit(data_x)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -180,7 +179,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#Représentation Graphique \n",
|
"#Représentation Graphique\n",
|
||||||
"plt.scatter(x, y, c=labels, cmap='viridis')\n",
|
"plt.scatter(x, y, c=labels, cmap='viridis')\n",
|
||||||
"plt.show()"
|
"plt.show()"
|
||||||
]
|
]
|
||||||
@@ -242,7 +241,7 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#Complétez avec votre code "
|
"#Complétez avec votre code"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -519,7 +518,7 @@
|
|||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3 (ipykernel)",
|
"display_name": "studies",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
@@ -533,7 +532,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.5"
|
"version": "3.13.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|||||||
Reference in New Issue
Block a user