Full API

.visualize()

Display a 4-panel matplotlib figure. Requires matplotlib - install with pip install matplotlib or pip install "fling[viz]".

Classifier panels

PanelWhat it shows
Confusion MatrixHeatmap of true vs predicted labels
Per-class MetricsPrecision / Recall / F1 bar chart per class
ROC CurveAUC score + shaded curve (binary)
Feature ImportancesHorizontal bar chart of top 12 features

Regressor panels

PanelWhat it shows
Actual vs PredictedScatter plot with perfect-prediction diagonal and R² annotation
Residuals vs PredictedScatter with zero line and ±1 RMSE shaded band
Residual DistributionHistogram with mean marker and zero-error line
Feature ImportancesHorizontal bar chart; falls back to stat tiles if model doesn't support importances

Example

python
model = Classifier(data="titanic.csv", target="Survived")
model.train()
model.visualize()   # opens the 4-panel figure