Back to projects

Academic study · Machine learning

Respiratory disease classification

A coauthored study comparing four models to distinguish asthma, acute bronchitis, and pneumonia in a public symptom dataset.

  • Python
  • Jupyter
  • scikit-learn
  • pandas
  • NumPy
  • Matplotlib
  • Seaborn

Context

Respiratory diseases can share symptoms, making classification a useful problem for studying model evaluation. The work uses a public Kaggle dataset and organizes exploratory analysis, feature selection, and algorithm comparison in a notebook within an academic setting.

My contribution

I developed the study with Caio Moura Portela de Sousa, contributing to data preparation, modeling, evaluation, and interpretation. The notebook brings together decision trees, Random Forest, logistic regression, and an MLP, with metrics and visualizations for comparing their behavior.

How it works

  1. The dataset is filtered to the three selected diseases and symptoms with no occurrences are removed.
  2. A stratified split reserves 30% for testing; feature count is selected through a feature-selection pipeline and cross-validation on training data.
  3. Four models are trained and evaluated using confusion matrices, precision, recall, F1, and balanced accuracy.
  4. The analysis compares errors, feature importance, and train-test differences, exporting a metrics table.

Technical decisions

Separate selection from final testing

The test set is held aside while the pipeline selects feature count using training data. This avoids using the final test result as direct guidance for that choice.

Interpret multiple metrics

The comparison includes weighted F1, macro F1, balanced accuracy, and class-level errors. In the saved run, logistic regression achieved a weighted F1 of 0.9026 on 999 test examples; this is an experimental dataset result.

What I learned

Evaluating a model requires discussing data origins, feature selection, and error types alongside the final metric. The study showed how a linear approach can be competitive and how interpretation depends on the experimental setting.

Limits and next steps

  • An academic study without clinical validation; the binary-symptom dataset does not support use as a diagnostic tool.
  • The repository does not include the dataset or pinned dependency versions. The metrics presented are saved results, without guaranteed reproduction in another environment.

Credits

João Matheus de Figueirêdo Tavares and Caio Moura Portela de Sousa · Information Systems, Unifacisa.