Expand description
Safe wrappers for AOCL-DA (Data Analytics).
Structs§
- Datastore
- RAII wrapper around
da_datastore— AOCL-DA’s container for tabular data loaded from CSV. Use it to read a file, query its dimensions, label or select columns by name, and extract numeric blocks into caller-provided buffers. - Dbscan
- DBSCAN density-based clustering. Unlike k-means it does not require
the number of clusters in advance and can mark points as noise
(label
-1). - Decision
Forest - A random-forest classifier. Configure forest options such as
"number of trees"or"bootstrap"viaDecisionForest::handle_mutbefore callingDecisionForest::fit. - Decision
Tree - A single decision tree classifier. Configure tree-specific options
such as
"maximum depth"or"minimum samples per split"viaDecisionTree::handle_mutbefore callingDecisionTree::fit. - Handle
- RAII wrapper around
da_handle. Tracks the algorithm and precision chosen at construction time. - KMeans
- k-means clustering wrapper. Holds an
Handlespecialised forda_handle_kmeansand exposes the typical fit/predict interface. - KNearest
Neighbours - k-nearest-neighbours classifier.
- Linmod
- Linear-model wrapper covering least-squares (MSE) regression and
logistic regression. Use
Linmod::fitto fit the model on training data, thenLinmod::coefficientsto inspect the fitted weights orLinmod::predict/Linmod::evaluateto apply the model. - Nlls
- Nonlinear least-squares solver wrapping AOCL’s
RAlfitfamily. - Pca
- Principal Component Analysis. Reduces an
n_samples × n_featuresmatrix to a lower-dimensional representation. - Svm
- Support vector machine wrapper covering both classification (
Svc,NuSvc) and regression (Svr,NuSvr) modes. Configure SVM-specific options (kernel, C, epsilon, gamma, …) viaSvm::handle_mutbefore callingSvm::fit.
Enums§
- Axis
- Reduction axis: per-column, per-row, or global.
- Decision
Shape - Decision-function shape used for multi-class classification.
- Error
- Errors that can be returned by safe AOCL wrappers.
- Handle
Kind - Type of analytics handle. AOCL-DA uses an opaque handle to track the state of an algorithm (data, options, fitted model, predictions).
- Layout
- Storage order of a 2-D matrix.
- Linmod
Kind - Family of linear model handled by
Linmod. - Metric
- Distance metric for
pairwise_distances. - Precision
- Internal precision selector for
Handle: f64 (Double) or f32 (Single). The choice determines which underlyingda_*_d/da_*_sC entry points are used. - Quantile
Type - Method used for quantile computation. Each variant matches one of the nine standard quantile types (Hyndman & Fan 1996); types 6 and 7 are the most commonly used.
- SvmKind
- Family of SVM model. Classification variants train against integer
class labels (passed as
f64); regression variants train against a real-valued response.
Traits§
- Dist
Scalar - Scalar element type usable with
pairwise_distances. - Kernel
Scalar - Scalar element type for kernel-matrix computations.
- Scalar
- Scalar element type usable with the wrapped DA routines.
Functions§
- correlation_
matrix - Compute the
n_cols × n_colscorrelation matrix (rows are observations). - covariance_
matrix - Compute the
n_cols × n_colscovariance matrix (rows are observations).doffollows the same convention asvariance. - five_
point_ summary - Compute Tukey’s five-number summary (min, lower hinge, median,
upper hinge, max) along
axis. - geometric_
mean - Compute the geometric mean along
axisfor a tightly-packed row-major matrix. All entries must be non-negative. - harmonic_
mean - Compute the harmonic mean along
axisfor a tightly-packed row-major matrix. - kurtosis
- Compute means, variances, and excess kurtosis (Fisher convention,
so a normal distribution scores zero) along
axis. - linear_
kernel - Linear kernel
K(x, y) = x · ybetween rows of row-major matricesx(m × k) and optionallyy(n × k). Outputdism × n(orm × mifyisNone). - mean
- Compute the mean of a tightly-packed row-major matrix along
axis. - moment
- Compute the
k-th central moment alongaxis. Ifmean_outalready holds means anduse_precomputed_meanistrue, those are used directly; otherwise means are computed and stored. - pairwise_
distances - Compute the pairwise distance matrix between rows of
x(and optionally rows ofy) under the givenmetric. - polynomial_
kernel - Polynomial kernel
K(x, y) = (γ · x · y + c)^degree(row-major). - quantile
- Compute the
q-th quantile alongaxis(q∈ [0, 1]). Theqtypeselects one of the nine standard quantile formulae;QuantileType::Type7matches numpy and R’s defaults. - rbf_
kernel - RBF kernel
K(x, y) = exp(-γ · ‖x − y‖²)(row-major). - sigmoid_
kernel - Sigmoid kernel
K(x, y) = tanh(γ · x · y + c)(row-major). - skewness
- Compute means, variances, and Fisher–Pearson skewness along
axis. - variance
- Compute mean and variance of a tightly-packed row-major matrix along
axis.
Type Aliases§
- JacFn
- Type-erased Jacobian closure: writes the
n_res × n_coefJacobian of the residuals atxintojac. Layout matches the AOCL"storage scheme"option (defaults to row-major). Return0on success. - ResFn
- Type-erased residual closure: maps coefficients
xof lengthn_coefto residualsresof lengthn_res. Return0on success or non-zero to signal an evaluation failure (the solver will return an error). - Result
- Crate result alias — used by every
aocl-*safe wrapper crate.