Downloads · 30 days
0
FlavioRubensOttaviani/Educational-KNN-from-EDA-to-PCA
Educational-KNN-from-EDA-to-PCA is a machine learning model from FlavioRubensOttaviani. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Questo repository presenta un'analisi completa di Machine Learning focalizzata sull'algoritmo K-Nearest Neighbors (KNN). Il progetto illustra l'intero workflow di data science, ponendo particolare enfasi sulla prepara…
Downloads · 30 days
0
Access
Public
Updated Feb 15, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.ipynb459 KB · 98%
From the Hugging Face model README
Questo repository presenta un'analisi completa di Machine Learning focalizzata sull'algoritmo K-Nearest Neighbors (KNN). Il progetto illustra l'intero workflow di data science, ponendo particolare enfasi sulla preparazione statistica dei dati e sulla riduzione della dimensionalità.
Il Machine Learning viene qui approcciato come un processo ingegneristico rigoroso, dove la qualità del modello finale è determinata dalla meticolosa cura della fase di preprocessing. L'obiettivo è trasformare dati grezzi in informazioni altamente strutturate e pronte per l'inferenza.
La fase di analisi esplorativa è fondamentale per comprendere la struttura del dataset attraverso:


A differenza di altri algoritmi, il KNN è estremamente sensibile alla distanza euclidea. I valori estremi (outlier) possono distorcere significativamente il calcolo delle distanze, compromettendo la precisione del modello.
Dato che il KNN calcola distanze spaziali, feature con scale numeriche diverse dominerebbero impropriamente il modello. Tutti i dati sono stati riportati nell'intervallo [0, 1] per garantire che ogni variabile contribuisca equamente alla decisione finale.
L'applicazione della Principal Component Analysis (PCA) risponde a tre esigenze:
Le prestazioni sono state misurate attraverso strumenti analitici dettagliati:


This repository presents a comprehensive Machine Learning analysis focused on the K-Nearest Neighbors (KNN) algorithm. The project illustrates the entire data science workflow, with a particular emphasis on statistical data preparation and dimensionality reduction.
Machine Learning is approached here as a rigorous engineering process, where the quality of the final model is determined by the meticulous care of the preprocessing stage. The goal is to transform raw data into highly structured, inference-ready information.
The exploratory analysis phase is essential for understanding the dataset structure through:
Unlike other algorithms, KNN is extremely sensitive to Euclidean distance. Extreme values (outliers) can significantly distort distance calculations, compromising model accuracy.
Since KNN calculates spatial distances, features with different numerical scales would improperly dominate the model. All data has been scaled to the [0, 1] range to ensure that each variable contributes equally to the final decision.
The application of Principal Component Analysis (PCA) serves three purposes:
Performance was measured through detailed analytical tools:

Flavio Rubens Ottaviani Project developed for educational purposes to deepen the dynamics of feature engineering and instance-based models.