Compare commits

...

2 Commits

Author SHA1 Message Date
Carlos A. Iglesias 0150ce7cf7
Update 3_7_SVM.ipynb
Updated formatted table
2 months ago
Carlos A. Iglesias 08dfe5c147
Update 3_4_Visualisation_Pandas.ipynb
Updated code to last version of seaborn
2 months ago

@ -220,7 +220,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Analise distributon\n",
"# Analise distribution\n",
"df.hist(figsize=(10,10))\n",
"plt.show()"
]
@ -233,7 +233,7 @@
"source": [
"# We can see the pairwise correlation between variables. A value near 0 means low correlation\n",
"# while a value near -1 or 1 indicates strong correlation.\n",
"df.corr()"
"df.corr(numeric_only = True)"
]
},
{
@ -249,11 +249,10 @@
"metadata": {},
"outputs": [],
"source": [
"# General description of relationship betweek variables uwing Seaborn PairGrid\n",
"# General description of relationship between variables uwing Seaborn PairGrid\n",
"# We use df_clean, since the null values of df would gives us an error, you can check it.\n",
"g = sns.PairGrid(df_clean, hue=\"Survived\")\n",
"g.map_diag(plt.hist)\n",
"g.map_offdiag(plt.scatter)\n",
"g.map(sns.scatterplot)\n",
"g.add_legend()"
]
},

@ -351,10 +351,10 @@
"We can obtain more information from the confussion matrix and the metric F1-score.\n",
"In a confussion matrix, we can see:\n",
"\n",
"||**Predicted**: 0| **Predicted: 1**|\n",
"|---------------------------|\n",
"|**Actual: 0**| TN | FP |\n",
"|**Actual: 1**| FN|TP|\n",
"| |**Predicted**: 0| **Predicted: 1**|\n",
"|-------------|----------------|-----------------|\n",
"|**Actual: 0**| TN | FP |\n",
"|**Actual: 1**| FN | TP |\n",
"\n",
"* **True negatives (TN)**: actual negatives that were predicted as negatives\n",
"* **False positives (FP)**: actual negatives that were predicted as positives\n",

Loading…
Cancel
Save