Browse documentation
aner.ml

Machine learning

Fit nearest neighbor, clustering, neural classifier and contextual regression models with exact training, preprocessing and prediction contracts.

ImplementedAner 0.1.0 or newer

aner.ml provides immutable fitted decision tree, K nearest neighbor and K-means models, Dense neural classifier plans and training configurations, and contextual fitted preprocessing and models. The development workflows include PCA projections that preserve observation identity for downstream fitting. Each family has an explicit boundary between configuration, fitting and later transformation or prediction. All are native APIs; importing this module does not load a separate ML framework.

The model and technique reference provides one place to choose a family and find its complete parameter guide. The complete model API inventory supplies typed signatures and argument names alongside those semantic guides. KNN and K-means are native aner.ml techniques; Dense, convolutional and recurrent topology belongs to aner.nn.

Choose a workflow and its reference

WorkflowNative values and entry pointsDetailed reference
Decision tree classificationDecisionTreeClassifier; ml.fit_tree, prediction, leaf probabilities and text/DOT/SVG visualizationDecision tree API and held out example
K nearest neighbor classificationKNNClassifier; ml.fit_knn, predict, predict_proba, class and neighbor inspectionKNN parameters, behavior and inspectable example
K-means clusteringKMeansModel; ml.fit_kmeans, predict, centers, labels and convergenceK-means parameters, convergence and reproducibility
EMA mini batch clusteringCentroidModel; ml.fit_emeans, final centers, labels and loss; CPU and MetalNative e-means
Two level approximate clusteringCentroidModel; ml.fit_omeans, multi probe assignment and final exhaustive evaluationNative o-means
Recency weighted closing clusteringCentroidModel; ml.fit_pmeans, indexed assignment and an experimentally evaluated weighted final estimate at every budgetNative p-means
Dense neural classificationClassifierPipeline, FittedClassifier, EvaluationReport; ml.classifier, fit, evaluateAPI map below, aner.nn, neural workflows
Shuffled mini batches and validation selectionTrainingConfig; ml.training, validation, select_bestConfiguration below and partition contracts
Tracked training only preprocessing and regressionFeatureLedger, ContextLinearModel, ContextPrediction; fit_standardizer, transform, fit_linear, predictFeatureLedger API reference and building energy tutorial
Fitted Ridge regressionRidgePlan, FittedRidge, ContextPrediction; ml.ridge, fit, evaluate, saveRidge workflow
Binary logistic regressionLogisticPlan, FittedLogistic, ContextPrediction; ml.logistic, class probabilities, grouped folds, and held out log lossBinary logistic workflow
Histogram gradient boostingHistogramBoostPlan, FittedHistogramBoost; numerical regression, binary classification, and grouped foldsHistogram boosting workflow
Fitted contextual K-meansKMeansPlan and FittedKMeans with full batch Lloyd and explicit mini batch plans, grouped folds, and row aligned assignmentsFitted K-means workflow
Fitted principal component analysisPCAPlan and FittedPCA with row aligned projections, variance inspection, and grouped reconstruction scoresFitted PCA workflow
Detached evaluation of Tensor predictionsSeparate aner.metrics moduleMetrics API reference

Decision trees, KNN and Lloyd K-means execute on the CPU. Aner 0.0.10 e-means, o-means and p-means support CPU Float32/Float64 and Metal Float32 on compatible Apple builds. CUDA Float32 clustering requires a separate CUDA enabled profile; the portable defaults do not include CUDA. Retained development benchmarks identify their own binaries and do not qualify a rebuilt stable package. Dense classifier execution uses the selected supported CPU, CUDA or Metal/MPS profile. Contextual linear regression currently requires effective CPU Float64. These references describe implemented families, rather than importable aner.ml.* submodules. Tensor extraction discards Dataset/contextual membership identity; select the fitted workflow appropriate for the contracts your data retains.

Run the examples

Follow the one time installation guide to put aner on your PATH. From the folder containing the binary bundle's examples directory:

sh
aner check examples/ml_iris.aner
aner run examples/ml_iris.aner
aner check examples/kmeans_iris.aner
aner run examples/kmeans_iris.aner

The same commands work on macOS, Linux, and Windows, including VS Code's terminal. In VS Code, you can also open either file and use the current file check/run tasks. The Aner extension highlights the modules and fitted types in the active light or dark theme.

The online KNN Iris example, K-means Iris example, and mini batch neural example provide source and runnable commands.

Both classical examples use split seed 2026, 120 fitting rows and 30 held out rows, with training fitted standardization. KNN uses k = 5. K-means uses three clusters, initialization seed 42, at most 100 updates, and tolerance 0.000001; it reports a held out adjusted Rand comparison, not classification accuracy.

These examples reuse the licensed offline Iris data. Read dataset provenance and splitting and third party notices. Small historical teaching datasets, including Iris's preserved duplicate observations, do not establish clinical performance or huge dataset scalability.

A classifier from fit to prediction

aner
import aner.dataset;
import aner.tensor;
import aner.ml;
import aner.metrics;

fn main() -> Unit {
    let flowers = dataset.iris();
    let parts = dataset.split(flowers, 0.2, 2026);
    let training = dataset.train(parts);
    let testing = dataset.test(parts);
    let scaler = dataset.fit_standardizer(dataset.features(training));
    let x_train = dataset.transform(scaler, dataset.features(training));
    let x_test = dataset.transform(scaler, dataset.features(testing));
    let y_train = dataset.targets(training);
    let y_test = dataset.targets(testing);

    let model: KNNClassifier = ml.fit_knn(x_train, y_train, 5);
    let predicted = ml.predict(model, x_test);
    print(metrics.accuracy(predicted, y_test));
    let counts = metrics.confusion_matrix(predicted, y_test, dataset.classes(flowers));
    print(tensor.value(counts, 0, 0));
}

Fit preprocessing on training rows and apply those stored statistics to both partitions. The model does not own the standardizer or transform query features automatically. Do not use test results to choose k, scaling, seeds, or other settings without a separate validation design. Distance calculations use the supplied feature representation: changing feature units or scale changes the model.

KNNClassifier and KMeansModel are opaque immutable fitted value types. Import aner.ml for their names. Only fitting functions create them in Aner source; there is no public unfitted constructor. Bindings, function parameters, return types, and local inference work with these values. They cannot be printed or compared directly; use accessors. Copies share immutable fitted state, and fitting retains independent detached copies of the required data. Every tensor returned by this API is detached from automatic differentiation.

ml.predict accepts either fitted model type, selected by static checking. This is a built in overload, not general user defined overloading. Imports precede function definitions. Each namespace requires its own import. aner.ml and aner.metrics expose Tensor for annotations and literals; calling tensor.* still requires import aner.tensor;. Neural calls still require import aner.nn;.

K nearest neighbor classification

Existing KNN calls use uniform votes and serial CPU execution. Optional fitted weights: "distance", a local CPU execution context, and a positive max_workspace_bytes budget (64 MiB by default) require the matching unreleased runtime/editor. The complete local query example demonstrates weighting and execution as separate choices. The dedicated KNN guide explains every input and readout, how changing k affects voting, tie rules, class column mapping, source row inspection, scaling, validation and limitations. Its deterministic example prints inspectable results without files or network access. The table below remains the compact lookup.

Here N is the number of fitted rows, D the feature count, Q query rows, and C distinct fitted class IDs. All dimensions are positive.

FunctionResult and contract
ml.fit_knn(features: Tensor, labels: Tensor, k: Int64, weights: String = "uniform")KNNClassifier; X has shape N × D, y has shape N × 1, and 1 ≤ k ≤ N; weights is "uniform" or "distance"
ml.predict(model: KNNClassifier, input: Tensor)Q × 1 predicted class IDs, from Q × D query features
ml.predict_proba(model: KNNClassifier, input: Tensor)Q × C normalized fitted policy neighbor votes; each row sums to one up to floating point rounding
ml.classes(model: KNNClassifier)C × 1 fitted class IDs in ascending order; defines the probability column mapping
ml.neighbor_indices(model: KNNClassifier, input: Tensor)Q × k zero based row indices in the matrix supplied to fit_knn, nearest first
ml.neighbor_distances(model: KNNClassifier, input: Tensor)Q × k Euclidean distances in the same order, not squared distances

Class IDs are nonnegative exactly integral Float64 values no larger than 9,007,199,254,740,991. They need not be contiguous. Predicted IDs preserve those labels; probability column index zero is not necessarily class ID zero. Neighbors are found by exhaustive distance comparison. Equal distances are ordered by fitted row index. The default uniform policy gives each selected neighbor one vote; the optional fitted distance policy uses inverse Euclidean distance, with selected exact matches voting alone. Exact computed score ties choose the smallest class ID. Approximate neighbor search is not implemented.

Neighbor row indices refer to the fitted feature matrix, not automatically to original dataset row IDs. For a dataset view, its dataset.row_ids tensor records the corresponding training to source mapping. Querying training rows includes the row itself when its distance makes it a selected neighbor; no leave one out exclusion is implied. Vote fractions are model outputs, not a guarantee of calibrated probabilities.

K-means clustering

The dedicated K-means guide explains every fitting control, absolute tolerance, seeded initialization, empty clusters, stopping behavior and all readouts. Its deterministic example supplies all five required controls and checks repeated fitting.

Existing KMeans calls remain serial. The matching development runtime adds exact stored Float64 centroid accumulation and an exact sum of squared computed hypot distances, each rounded once at its final step. It also accepts optional local CPU Float64 execution and a positive max_workspace_bytes cap (64 MiB by default) for fitting and prediction. Published Aner 0.0.5 keeps its earlier serial numerical algorithm; updated results can differ from that baseline. Updated serial and admitted 1/2/4-worker calls agree bitwise in the same binary/floating-point environment.

aner
import aner.ml
import aner.parallel

let execution = parallel.local()
let model = ml.fit_kmeans([[0.0], [2.0], [10.0], [12.0]],
    clusters: 2, max_iterations: 100, tolerance: 0.0, seed: 42,
    execution: execution, max_workspace_bytes: 64 * 1024 * 1024)
let predicted = model.predict([[1.0], [11.0]], execution: execution)

The same native executor session stays reserved across fitting phases; busy/nested submissions fail. Charged workspace includes new fitted output, CSR/center buffers, lane accumulators and bounded controls/temporaries. It excludes input/host caches, existing executor and prediction model storage, ownership/allocator overhead and process RSS. The cap is not a fixed allocation. The complete local example compares fitted properties and predictions. Implementation notes explain exact arithmetic, cancellation and phase lifetimes. This local CPU kernel adds neither cluster/GPU KMeans nor Tensor/model lowering to aner build.

aner
// Inside main(), with dataset/ml/metrics imports:
let flowers = dataset.iris();
let features = dataset.features(flowers);
let scaler = dataset.fit_standardizer(features);
let x = dataset.transform(scaler, features);
let model: KMeansModel = ml.fit_kmeans(x, 3, 100, 0.0001, 42);
let clusters = ml.labels(model);
print(ml.inertia(model));
print(metrics.adjusted_rand_index(clusters, dataset.targets(flowers)));

This pattern clusters the supplied population and compares its resulting partition with known species afterward. Class labels are not fitting inputs. It is not a held out classification experiment. For prediction on a reserved partition, fit scaling and centers using only the fitting partition, then reuse both unchanged.

FunctionResult and contract
ml.fit_kmeans(features: Tensor, clusters: Int64, max_iterations: Int64, tolerance: Float64, seed: Int64)KMeansModel; X is N × D, 1 ≤ k ≤ N, 1 ≤ max_iterations ≤ 1000, finite tolerance ≥ 0
ml.predict(model: KMeansModel, input: Tensor)Q × 1 nearest center IDs for Q × D features
ml.centers(model: KMeansModel)k × D returned centers
ml.labels(model: KMeansModel)N × 1 assignments for the fitted rows, recomputed against the returned centers
ml.inertia(model: KMeansModel)Float64 sum of squared distances of fitted rows to their returned assigned centers; development arithmetic rounds the exact sum of squared computed Float64 distances once
ml.iterations(model: KMeansModel)Int64 completed Lloyd updates
ml.converged(model: KMeansModel)Bool indicating that a stopping criterion was met before or on the final allowed update

Initialization chooses distinct fitted row indices with SplitMix64 and an unbiased partial Fisher and Yates shuffle. The seed is mapped modulo 2^64. Distinct row indices may have identical coordinates. This is one seeded run, without K-means++ initialization or multiple restarts.

Each Lloyd update assigns rows to their nearest center and replaces occupied centers with assigned row means. Distance ties choose the lowest cluster index; an empty cluster keeps its previous center. The run converges when assignments are unchanged or the largest Euclidean center movement is at most the absolute tolerance, measured in the supplied feature units. Otherwise it stops at the iteration cap with converged == false. Final assignments and inertia are recomputed using the returned centers, including when the cap is reached.

Cluster IDs are arbitrary center indices 0 through k−1, not species names or class predictions. Do not report metrics.accuracy(clusters, class_ids) as K-means classification accuracy. Adjusted Rand index compares the two partitions while ignoring label renaming. A requested k does not guarantee k occupied clusters, especially with repeated coordinates. Inertia depends on scale and k and does not by itself select a scientifically suitable model.

Numerical standardization and contextual preprocessing

The Standardizer used in the classical Tensor examples is separate from the schema aware FeatureLedger used with contextual frames. Neither KNN nor K-means automatically fits or applies one. Choose preprocessing before evaluating the final test population and keep the fitted artifact with the experiment.

Entry point and parameterContract and effect
dataset.fit_standardizer(features: Tensor)Required finite N × D feature values; learns column means and population standard deviations from exactly those values. Tensor extraction no longer carries fitting role protection.
dataset.fit_standardizer(features: Dataset)Required authorized fitting Dataset; the native label is also features. Fits the same statistics through Dataset batches and rejects held out fitting roles.
dataset.transform(scaler: Standardizer, features: Tensor)Both arguments required. Apply the fitted column statistics to a finite matrix in the same feature order and width; no refitting occurs.
dataset.center(scaler: Standardizer)Required fitted standardizer; returns the learned 1 × D centers.
dataset.scale(scaler: Standardizer)Required fitted standardizer; returns positive 1 × D scales. Constant columns use scale 1.
ml.fit_standardizer(training: AdaptiveFrame)Required authorized frame; returns a FeatureLedger retaining field meaning, units, population identity and applied preprocessing dependencies. See its separate parameter reference.

For a numerical value x, transformation is (x - center) / scale. There is no exposed ddof, epsilon, clipping, imputation or robust scaling control in these Standardizer signatures. Class/target columns are excluded by selecting the feature matrix or by the declared frame schema, rather than inferred from arbitrary Tensor columns. Keep means/scales and feature order visible when inspecting a distance based model.

Evaluation metrics

The aner.metrics module reference documents the complete evaluation API, named arguments, class mappings, precision, execution, errors and complexity. The summary below places these metrics alongside fitted classical models.

All metric inputs must be finite and have positive dimensions. ID metrics require matching N × 1 columns of nonnegative integral Float64 IDs at most 9,007,199,254,740,991.

FunctionReturn value
metrics.accuracy(predicted: Tensor, actual: Tensor)Float64 fraction of matching IDs, between 0 and 1
metrics.confusion_matrix(predicted: Tensor, actual: Tensor, classes: Int64)classes × classes Tensor of counts, rows = true class, columns = predicted class; classes is 1 through 1000 and every ID must be below it
metrics.mean_squared_error(predicted: Tensor, actual: Tensor)Float64 mean squared difference over every cell of two matching shapes
metrics.adjusted_rand_index(predicted: Tensor, actual: Tensor)Float64 adjusted pair agreement score, independent of numeric ID names; noncontiguous IDs are accepted

Adjusted Rand index is 1 for identical partitions, including a single row and identical trivial partitions; it can be negative. A value near zero corresponds to the adjustment's chance baseline, not a percentage of correct classifications. The implementation uses native sparse contingency counts instead of allocating a table indexed by the largest ID. The metric is invariant under a permutation of cluster labels.

Mean squared error uses scaled accumulation so a finite mean can be computed even when an individual unnormalized squared difference would overflow; an unrepresentable final mean fails.

metrics.accuracy takes predicted IDs. Existing nn.accuracy takes a score/logit matrix and class IDs, performing argmax internally. For score matrices, explicitly call tensor.argmax(scores) before metrics.accuracy. metrics.mean_squared_error is a detached evaluation scalar; use nn.mse for a differentiable training loss. No metric fits a model or creates a data partition.

Dense classifier and training API reference

Ordinary serial fit overloads retain their behavior. Supply execution: nn.execution_context() to select the resolved NN profile through the explicit Dense replica fit path, nn.execution_context(device: "cpu", dtype: "Float64") for strict local placement, or parallel.cluster(config: ...) for enrolled replicas. The receiver form pipeline.fit(training, config, execution: execution) is equivalent. See distributed neural training for precision, protection, admission and timing boundaries. Generic parallel.repeat does not train models or run on those device contexts.

Import aner.nn to create the NeuralNetwork, aner.dataset for the source and partitions, and aner.ml for the plan and fitted values. Topology, losses, initialization, exact warm start behavior, devices and checkpoint versions are defined in neural workflows. The signatures here are the ml API entry points; the receiver form uses the same labels after omitting its first parameter.

Native signatureResult and contract
ml.classifier(network: NeuralNetwork, standardize: Bool, loss: String = "cross_entropy", optimizer: String = "sgd")ClassifierPipeline; explicit scaling policy, loss "cross_entropy"/"mse", optimizer "sgd"/"adam".
ml.on(pipeline: ClassifierPipeline, device: String)New ClassifierPipeline; retain captured precision and policy.
ml.on(pipeline: ClassifierPipeline, device: String, precision: String, policy: String)New ClassifierPipeline; explicit requested profile.
ml.dropout_seed(pipeline: ClassifierPipeline, seed: Int64)New immutable plan; optional control of the replay seed for active Dense dropout in either fit overload. Omit this call for one recorded automatic seed per fresh fit.
ml.training(epochs: Int64, batch: Int64, rate: Float64, seed: Int64)TrainingConfig; 1 to 100,000 epochs, batch 1 to 1,000,000, finite positive rate; shuffled complete epochs.
ml.validation(config: TrainingConfig, data: Dataset)New TrainingConfig; attach validation/unspecified rows, rejecting training/test roles.
ml.select_best(config: TrainingConfig, enabled: Bool)New TrainingConfig; choose lowest post epoch validation loss if true; validation required at fit. Default selection is the final epoch.
ml.fit(pipeline: ClassifierPipeline, training: Dataset, epochs: Int64, rate: Float64, progress: Bool = false)FittedClassifier; legacy fixed horizon full batch fit.
ml.fit(pipeline: ClassifierPipeline, training: Dataset, config: TrainingConfig, progress: Bool = false)FittedClassifier; audited mini batch fit with retained selection history.
ml.fit(pipeline: ClassifierPipeline, training: Dataset, config: TrainingConfig, execution: ParallelContext)FittedClassifier; explicit supported Dense replica fit.
ml.fit(pipeline: ClassifierPipeline, training: Dataset, config: TrainingConfig, execution: ParallelContext, progress: Bool)The same explicit context fit with bounded progress.
ml.warm_start(pipeline: ClassifierPipeline, model: FittedClassifier)New ClassifierPipeline; compatible fitted parameters, scaler and supported optimizer state.
ml.evaluate(model: FittedClassifier, testing: Dataset)EvaluationReport; reuse scaler/schema and measure configured loss and accuracy.
ml.predict(model: FittedClassifier, input: Dataset)Detached N × 1 Tensor of fitted class IDs.
ml.probabilities(model: FittedClassifier, input: Dataset)Detached N × C Tensor; columns follow fitted class order.
ml.save(model: FittedClassifier, path: String)Unit; create a new versioned checkpoint in an existing directory.
ml.load_classifier(path: String)FittedClassifier; bounded validated checkpoint restoration, parameters initially on CPU in saved precision.

The optional defaults describe implemented overloads, rather than user defined default parameters. Network dimensions must match the feature/class schema and the final stage must be Dense raw logits. Ordinary fit starts independently from configured initialization; warm_start is explicit. Standardization fits only training rows and predictions reuse it. Configured fitting rejects overlapping training/validation membership and final testing cannot reuse prior validation selection rows. Legacy evaluation retains its documented overlap reporting. Runtime classifier/configuration failures use R2701; Tensor/device errors can use R2001.

Native readoutResult
ml.summary(value: NeuralNetwork) / ClassifierPipeline / TrainingConfig / FittedClassifier / EvaluationReportString; topology, configuration, metrics and retained provenance appropriate to that value.
ml.initial_loss(model: FittedClassifier), ml.training_loss(model: FittedClassifier), ml.training_accuracy(model: FittedClassifier)Float64 detached training metrics.
ml.training_seconds(model: FittedClassifier)Float64 measured duration of this fit, including preparation/final metrics and callbacks.
ml.weights(model: FittedClassifier, layer: Int64), ml.bias(model: FittedClassifier, layer: Int64)Detached Tensor copies; zero based Dense layer index; shapes inputs × outputs and 1 × outputs.
ml.center(model: FittedClassifier), ml.scale(model: FittedClassifier)Detached CPU Float64 1 × D scaling readouts; disabled scaling reports zero centers/unit scales.
ml.training_row_ids(model: FittedClassifier)Detached CPU Float64 N × 1 original row IDs for this fitted snapshot.
ml.loss(report: EvaluationReport), ml.accuracy(report: EvaluationReport)Float64 configured evaluation loss and fraction correctly classified.
ml.rows(report: EvaluationReport)Int64 evaluated row count.
ml.row_ids(report: EvaluationReport)Detached CPU Float64 N × 1 row identities in evaluation order.

Run an audited Dense workflow

Mini batch Iris imports all three modules, splits training/validation/test before fitting, configures Adam and training only scaling, selects the best validation epoch and evaluates only the final test view:

sh
aner check examples/neural_minibatch.aner
aner run examples/neural_minibatch.aner

It prints 90, 30, 30, true, true: partition counts, a decrease in detached training loss, and a finite accuracy within [0, 1]. Numerical metrics and time can vary across backends; no particular accuracy is promised. Concise Iris prints complete readable summaries. Checkpoint state demonstrates save, validated load and deliberate continuation; it requires new writable output paths.

Contextual preprocessing and linear regression

ml.fit_standardizer(training: AdaptiveFrame) returns a FeatureLedger with an ordered feature schema, training derived population means/scales and exact learned dependencies. ml.transform(self: FeatureLedger, data: AdaptiveFrame) preserves observation identity and role. ml.fit_linear(training: ContextBatch) returns a checked CPU Float64 intercept least squares model; its prediction values retain observation IDs and target units.

The FeatureLedger reference lists all contextual signatures, schema and applied stage validation, aligned RMSE, persistence anchors, resource bounds and errors. The building energy tutorial supplies a complete local CSV workflow and fixtures. This family uses aner.data contextual frames/batches, while dataset.fit_standardizer is the separate catalogue/Tensor standardizer. The two fitted types do not share an implicit conversion.

Tensor interoperability

aner.tensor provides neutral construction and inspection of the same rank two CPU Float64 values used by classical model inputs and outputs. The Tensor reference defines literal construction, shape validation, element access, operation complexity, and the distinction between detached values and differentiation graphs. Sharing this representation does not make KNN or K-means differentiable.

Bounds, errors, and reproducibility

Each input/output Tensor is limited to 1,000,000 cells. KNN query operations allow at most 50,000,000 distance coordinate evaluations, counted as Q × N × D; K-means prediction uses Q × k × D. K-means fitting checks (max_iterations + 1) × N × k × D against the same 50,000,000 limit before running, even if it might converge early. Probability matrices, neighbor outputs, centers, and confusion matrices must separately fit the tensor cell limit. These formulas bound distance coordinate work; neighbor selection, centroid updates, and movement checks add bounded overhead. K-means allows at most 1000 updates. There is no global process memory quota or streaming/incremental fitting yet.

Bad shapes, invalid labels or k, nonfinite inputs, unrepresentable numerical intermediates, and exceeded work limits produce diagnostics. ML, metric, and neutral tensor diagnostics use R2301, R2401, and R2501; Tensor literal construction and other existing neural/storage paths may retain R2001. Imports, fitted model types, and function signatures are checked before execution. Native algorithms also enforce their own work bounds; interpreter step counts are not an elementwise work meter.

Within a pinned software/hardware environment, fixed data order, preprocessing, seed, and settings define a repeatable computation. Seeds alone do not promise identical floating point results across compilers, machines, or future algorithm versions. KNN row order ties and K-means initialization depend on the actual fitted row order; keep source version, row membership, scaling, and settings with results. KNN and K-means fitted models do not yet have serialization or resume support. Neural classifier and contextual artifact persistence are described below and in their linked references.

Current scope

For neural training, aner.nn provides a concise classifier API and explicit forward/backward/update loops. Classical ML uses fitted model values because fitting and later prediction have different inputs and state. aner.viz currently records tensor/NN computation graphs; it does not visualize KNN search or K-means updates. No classical ML visualization is inferred from a shared Tensor type.

KNN and K-means do not yet provide model serialization, automatic preprocessing pipelines, or third party algorithm registration. Keep fitted preprocessing alongside the model in your program and retain the source, data identity, and settings needed to repeat the fit.

See the complete callable index for the native module and method name catalogue.

Continue with A complete clustering experiment for this specialist contract.

Continue with Clustering across hardware for this specialist contract.

Continue with Clustering evaluation and profiling for this specialist contract.

Continue with Clustering on M2, V100 and L40 for this specialist contract.

Continue with External observations with fitted context for this specialist contract.

Continue with How clustering runs natively for this specialist contract.

Continue with KMeans recorded benchmark study for this specialist contract.

Continue with KNN execution and validation for this specialist contract.

Continue with Native clustering benchmarks for this specialist contract.

Continue with Native p-means measurements for this specialist contract.

Guides and references for aner.ml

Aner documentation · Reference and guides