Each demo runs from the terminal via ./flow run examples/<name>.flow. The gifs below show the expected terminal output.
- Iris Classification
- Regression Demo
- Grid Search Demo
- Full API Demo
- New Modules Demo
- Clustering Demo
- Ensemble Comparison
- SVM Demo
- Preprocessing Demo
Trains a LogisticRegression on synthetic iris-like data. Shows the predict/decide split, structured classification report, and Pipeline with clone-in-init.
./flow run examples/iris_classification.flowWhat it shows:
train_test_splitwith auto-stratifyStandardScalerpreprocessingLogisticRegressionwithpredict_proba(probabilities) anddecide(classes)classification_reportwith structured outputPipelinewith clone-in-init
Fits a LinearRegression with polynomial TermSpec on synthetic data. Prints MSE, RMSE, MAE, and R2.
./flow run examples/regression_demo.flowWhat it shows:
TermSpecfor polynomial features- Regression metrics (MSE, RMSE, MAE, R2)
StandardScalerin a pipeline- Weight printing
Runs GridSearchCV over hyperparameter grid with the ConsoleProgress capability for a live progress bar.
./flow run examples/grid_search_demo.flowWhat it shows:
GridSearchCVwith progress effect systemConsoleProgresscapability (progress bar)SilentProgresscapability (no output)- Best params and best score output
End-to-end pipeline covering preprocessing, PCA, feature selection, train/test split, multi-class logistic, confusion matrix, decision tree, random forest, gradient boosting, Gaussian NB, LinearSVC, KMeans, DBSCAN, regression, and learning curve.
./flow run examples/full_demo.flowWhat it shows:
StandardScaler+PCAdimensionality reductionSelectKBestfeature selectionMultiClassLogisticRegression(softmax)ConfusionMatrixwith formatted printingDecisionTree,RandomForest,GradientBoosting,GaussianNB,LinearSVCKMeansandDBSCANclustering- Ridge, Lasso,
GradientBoostingRegressor learning_curvewith progress reporting- Cohen's kappa and balanced accuracy
Showcases the newer modules: IsotonicRegression, KernelRidge (RBF and linear), PLSRegression, NMF, TSNE, and extended metrics.
./flow run examples/new_modules_demo.flowWhat it shows:
IsotonicRegressionwith monotonic fittingKernelRidgewith RBF and linear kernelsPLSRegression(NIPALS algorithm) for multi-targetNMFwith reconstruction errorTSNEdimensionality reductionmedian_absolute_error,max_error,mean_squared_log_error
Compares KMeans, MiniBatchKMeans, DBSCAN, and AgglomerativeClustering on 3 Gaussian blobs. Prints cluster labels and silhouette score.
./flow run examples/clustering_demo.flowWhat it shows:
KMeanswith inertia and centroid printingMiniBatchKMeanswith mini-batch updatesDBSCANwith noise point detectionAgglomerativeClusteringwith single linkagesilhouette_scorefor cluster quality
Trains six classifiers on the same dataset and prints a summary table comparing accuracy.
./flow run examples/ensemble_comparison.flowWhat it shows:
DecisionTreeClassifier(baseline)RandomForestClassifierGradientBoostingClassifierAdaBoostClassifierBaggingClassifierVotingClassifier- Summary table with all accuracies
Demonstrates LinearSVC, KernelSVC with RBF kernel, and LinearSVR. Prints weights, support vectors, and hinge loss.
./flow run examples/svm_demo.flowWhat it shows:
LinearSVCwith weight and bias printingKernelSVCwith RBF kernel and support vector countLinearSVRfor regression with R2hinge_lossmetric
Walks through every preprocessing transformer with before/after output.
./flow run examples/preprocessing_demo.flowWhat it shows:
StandardScalerwith mean/stdMinMaxScalerwith min/maxRobustScalerwith medianMaxAbsScalerNormalizer(L2)BinarizerKBinsDiscretizerPolynomialFeatures(shape change)LabelEncoderSimpleImputer(before/after)
The gifs referenced above live in gifs/. To record them:
# Using asciinema
asciinema rec gifs/iris_classification.cast --command "./flow run examples/iris_classification.flow"
# Then convert to gif:
agg gifs/iris_classification.cast gifs/iris_classification.gif
# Or using terminalizer
terminalizer record -k "./flow run examples/iris_classification.flow" -o gifs/iris_classification.yml
terminalizer render gifs/iris_classification.yml -o gifs/iris_classification.gifEach gif should be 800x600 or smaller, under 5 MB, and loop seamlessly.








