Visualization
This section covers visualization tools for analysis and interpretation.
Overview
NIRS4ALL provides comprehensive visualization tools for analyzing predictions, understanding model behavior, and interpreting results.
Visualize spectra, folds, targets, augmentation, and exclusions during pipeline execution.
Visualize predictions, residuals, and model performance.
Visualize pipeline structure as interactive diagrams.
Explain model predictions with SHAP values.
Quick Example
import nirs4all
from nirs4all.visualization import PredictionAnalyzer
# Run pipeline and get results
result = nirs4all.run(pipeline, dataset="data/")
# Create analyzer from the Predictions object
analyzer = PredictionAnalyzer(result.predictions)
# Generate charts
analyzer.plot_top_k(k=5) # Top-K model comparison
analyzer.plot_histogram() # Score distribution
analyzer.plot_candlestick(variable='model_name') # Score ranges
Available Charts
Chart Type |
Method |
Use Case |
|---|---|---|
Top-K Comparison |
|
Compare best models |
Confusion Matrix |
|
Classification accuracy |
Score Histogram |
|
Score distribution |
Candlestick |
|
Score ranges per group |
Heatmap |
|
Performance across factors |
See Also
Interactive Example Browser - Example visualizations
Operator catalog: choose a job, then inspect the method - Chart operators in pipelines