This project builds and compares multiple machine learning models to classify eye detection status (EYEDETECTION) using data stored in Snowflake.
Models evaluated:
- K-Nearest Neighbors (KNN)
- Naive Bayes
- Logistic Regression
- Data is fetched from a Snowflake database using
snowflake-connector-python. - Table queried:
EYE(schema:PUBLIC, database:EYE)
- Python
- Snowflake Connector
- Pandas, NumPy
- Scikit-learn
- Matplotlib
-
Connect to Snowflake and load data into a Pandas DataFrame
-
Split features and target (
EYEDETECTION) -
Apply appropriate feature scaling:
- Normalizer for KNN
- MinMaxScaler for Naive Bayes
- No scaling for Logistic Regression
-
Train and evaluate models using accuracy
-
Compare model performance using a bar chart
-
KNN
- Normalizer
n_neighbors = 5
-
Naive Bayes
- MinMax Scaling
- GaussianNB
-
Logistic Regression
- Default configuration
- Metric used: Accuracy
- Train/Test split: 80/20
- Random state:
42
- Accuracy score for each model
- Bar chart comparing model accuracies
-
Install dependencies:
pip install snowflake-connector-python pandas numpy scikit-learn matplotlib
-
Update Snowflake credentials in the script
-
Run the notebook or Python script