Improve robustness of numeric data distribution visualization
- Linguagem predominante
- Python
- Estrelas
- 9
- Forks
- 12
- Merge médio
- 2h 23min
- PRs com merge (30d)
- 2
Descrição
## Summary
The numeric data distribution helper (`plot_numeric_distributions`) introduced in PR #145 works well for basic use cases, but there are several opportunities to make it more robust and user-friendly for ML analysis workflows.
## Tasks
- Add explicit validation for the `columns` argument:
- Ensure all requested columns exist in `df.columns`.
- Optionally enforce or warn when non-numeric columns are requested.
- Raise clear `ValueError` messages for invalid columns.
- Improve subplot layout behavior:
- Avoid creating unused extra axes for small numbers of columns (e.g. 1 column resulting in a 1x2 grid).
- Keep the layout readable for larger numbers of numeric features.
- Document headless usage considerations:
- Clarify in the docstring how to use the function safely in CI or non-GUI environments (e.g. using a non-interactive matplotlib backend).
- Consider re-exporting `plot_numeric_distributions` from the `apps/ml/visualizations/__init__.py` module if this is intended as the public API surface.
## Acceptance Criteria
- Calling `plot_numeric_distributions` with invalid or non-existent column names produces clear, actionable error messages.
- Subplot layouts are sensible for 1, 2, and many numeric columns.
- The docstring documents headless/CI usage expectations.
- Existing tests continue to pass, and additional tests are added where helpful (e.g. column validation).
Guia de contribuição
Direção de pesquisa
Start at plot_numeric_distributions, then inspect apps/ml/visualizations/__init__.py and the existing tests around the helper. Check invalid and non-numeric column cases, subplot layouts for 1, 2, and many columns, and the docstring's headless-use guidance; run the existing test suite and add focused tests where helpful. Done means clear ValueError messages, sensible layouts, documented CI usage, and passing tests.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- matplotlib, python
- Domínio
- data-visualization, machine-learning
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 48/100