v2026.11.2
All Bundles
Bundle

Convolutional neural networks on the CPU: layers with forward and backward passes, the Adam and SGD optimizers, an image dataset with train, validation and test splits and on-the-fly augmentation, and a training loop that records the metrics of every epoch. The layers are native (libobjk_ml, Eigen plus a small thread pool); this library holds the model API, the dataset and the trainer. Compile with -lib ml_cnn,ml,ml_lab,opencv,csv,json,cipher,gen_collect. Design, validation and measurements: docs/AI.md, "Convolutional networks (System.ML.Cnn)".

CnnEvaluation

The result of CnnTrainer.Evaluate on a subset, with class 1 as the positive class. Precision, recall and F1 are System.ML.Metrics, and the confusion matrix is its layout: [actual, predicted] with [0, 0] true negatives, [0, 1] false positives, [1, 0] false negatives and [1, 1] true positives.

Operations

GetActuals #

The true class of each scored image (true for class 1), in subset order.

method : public : GetActuals() ~ Bool[]

Return

TypeDescription
Boolthe labels

GetScores #

The probability of class 1 for each scored image, in subset order: what Metrics->AucRoc, Metrics->RocCurve and Axes->RocCurve take with GetActuals.

method : public : GetScores() ~ Float[]

Return

TypeDescription
Floatthe scores, one per image

ToResultTable #

The metrics as a one-row System.ML.Lab ResultTable (columns loss, accuracy, precision, recall, f1, n), for the Lab text, Markdown, CSV and JSON output.

method : public : ToResultTable(title:String) ~ ResultTable

Parameters

NameTypeDescription
titleStringtable title

Return

TypeDescription
ResultTablethe table