Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Functions§

accuracy_from_cm
Compute overall accuracy from a confusion matrix.
auc_trapezoid
Compute AUC using the trapezoidal rule.
average_path_length
Expected path length of a random BST with n nodes.
backward_substitution_t
Backward substitution against Láµ€: solve Láµ€ x = b.
best_split
Find the best split for a set of samples.
build_isolation_tree
Build one isolation tree from a subsample.
build_tree
cholesky
Cholesky decomposition (lower triangular factor).
compute_pairwise_affinities
Compute pairwise affinities p_{ij} (symmetric, normalised) for t-SNE.
confusion_matrix
Compute the confusion matrix for binary or multi-class classification.
cross_val_linear_regression
Run k-fold cross-validation for a linear regression model (R² metric).
dot
feature_bagging
Select a random subset of k feature indices from 0..d.
forward_substitution
Forward substitution: solve L x = b where L is lower-triangular.
gini_impurity
Compute Gini impurity of a label set.
kernel_matrix
Compute the kernel matrix K[i, j] = k(X[i], X[j]).
kmeans
Run k-means clustering with k-means++ initialisation.
lof_scores
Compute LOF scores for all points in x.
macro_f1
Macro-averaged F1 across all classes.
mae
Mean absolute error.
majority_vote
mean_vec
mse
Mean squared error.
multiclass_prf
Per-class precision, recall, and F1 for multi-class problems (one-vs-rest).
pca_fit
Fit PCA using the covariance matrix and power iteration.
power_iteration
Power iteration to find the dominant eigenpair of a symmetric matrix.
precision_recall_f1
Compute precision, recall, and F1 score from a binary confusion matrix.
r2
R² (coefficient of determination).
random_forest_oob
Compute the out-of-bag error for a random forest.
rbf_kernel
RBF (squared-exponential) kernel.
reach_dist
Compute the reachability distance: max(k-dist(o), dist(p, o)).
rmse
Root mean squared error.
roc_auc
Compute the ROC AUC (Area Under the Curve) for binary classification.
roc_curve
Compute the full ROC curve: returns (fpr, tpr) sorted by threshold.
sigmoid
sigmoid_vec
solve_linear_system
Solve Ax = b via Gaussian elimination with partial pivoting.
standardize
tsne
Run a simplified t-SNE reduction to 2 dimensions.
variance_vec
vec_add
vec_norm
vec_scale
vec_sub
weighted_f1
Weighted-averaged F1 (weighted by class support).