How marcosabp/projeto-am-2026-2 works
This repository contains two independent experiments on the Spambase dataset. Q1 explores joint clustering of observations and features, selects a partition, and reports visual and external-quality diagnostics. Q2 compares four classifiers using repeated stratified outer folds and inner hyperparameter selection, then summarizes and saves fold results. The sampled sources establish these workflows and core model behavior; unsampled modules are represented only where the tree or sampled callers support their role.
Main entry points: k_folds.py Inner model selection · q1/main.py Clustering runner · q2/main.py Classification runner · plots.py Plots and summary
Components 16
Q1 Clustering
- Clustering runner
src/q1/main.py - Double K-Means
src/q1/double_kmeans.py
Q1 Analysis
- Partition evaluation
src/q1/double_kmeans.py - Plots and summary
src/q1/plots.py
Q2 Evaluation
- Classification runner
src/q2/main.py - Outer cross-validation
src/q2/utils/k_folds.py - Inner model selection
src/q2/utils/k_folds.py - Metrics and summaries
src/q2/utils/metrics.py
Q2 Classifiers
- Gaussian Bayes
src/q2/models/gauss_bayes.py - KNN Bayes
src/q2/models/knn_bayes.py - Parzen Bayes
src/q2/models/parzen_bayes.py - Logistic regression
Other components
- Spambase files
- scikit-learn
- Q1 figures
- Q2 result files
Connections 17
- Spambase files → Clustering runner: provides data
- Clustering runner → Double K-Means: fits partitions
- Clustering runner → Partition evaluation: evaluates pairs
- Clustering runner → Plots and summary: requests plots
- Plots and summary → Q1 figures: writes figures
- Spambase files → Classification runner: provides data
- Classification runner → Outer cross-validation: runs evaluation
- Classification runner → Metrics and summaries: summarizes results
- Classification runner → Q2 result files: writes results
- Outer cross-validation → Inner model selection: selects parameters
- Outer cross-validation → Metrics and summaries: scores predictions
- Inner model selection → Gaussian Bayes: fits and predicts
- Inner model selection → KNN Bayes: fits and predicts
- Inner model selection → Parzen Bayes: fits and predicts
- Inner model selection → Logistic regression: fits and predicts
- Outer cross-validation → scikit-learn: scales folds
- Logistic regression → scikit-learn: uses estimator