Skip to contents
auto_named_list()
Creates a named list where the names are taken from the input variables
data_container()
Wrapper for creating a C++ DataContainer that parses parameter names
dlog_sigmoid()
derivative of log-sigmoid function
dsigmoid()
derivative of sigmoid function
fast_ols()
OLS solver that falls back to an optimisation if ncol(X) is huge
Also supports LASSO via optimisation
grad_opt_debug()
Print debug statement for how the graduated optimisation is going
graduated_optimisation()
Graduated Optimisation to solve the SLISE problem
limited_logit()
Computes the logits from probabilities
log_approximation_ratio()
Calculate the Logarithm of the approximation ratio
(logarithms are used for numerically stable calculations)
See Theorem 3 from the paper for more details
log_sigmoid()
log-sigmoid function
log_sum()
Computes log(sum(exp(x))) in a numerically robust way.
log_sum_special()
Computes log(sum(exp(x) * y)),
or log(sum(exp(x))) if all(y == 0),
in a numerically robust way.
loss_sharp()
Sharp Loss Function
Exact loss function without gradients
loss_sharp_res()
Sharp Loss Function
Exact loss function without gradients for when the residuals are already calculated
loss_smooth()
Smooth Loss
A loss function for when you want gradients
loss_smooth_grad()
Smooth Loss Gradient
Gradient for the smooth loss function
loss_smooth_res()
Smooth Loss
A loss function for when you want gradients and the residuals are already calculated
matching_epsilon()
Find the matching *epsilon
next_beta()
Find the next beta according to:
¤ approximation_ratio(alpha, beta_old, beta_new) == max_approx
¤ beta_new >= beta_old + min_increase
¤ beta_new <= beta_max
owlqn_c()
OWL-QN for optimising loss_smooth
Cpp implementation
owlqn_r()
OWL-QN for optimising loss_smooth
R implementation
plot(<slise> )
Plot the robust regression or explanation from slise
plot(<slise_2d> )
Plot the robust regression or explanation from slise in 2D
plot(<slise_bar> )
Plot the robust regression or explanation from slise as bar plots
plot(<slise_distribution> )
Plot the robust regression or explanation from slise with distributions
plot(<slise_mnist> )
Plot the robust regression or explanation from slise as an image
plot(<slise_prediction> )
Plot the robust regression or explanation from slise based on predictions
plot(<slise_wordcloud> )
Plot the robust regression or explanation from slise as a wordcloud
predict(<slise> )
Predict with a SLISE
print(<slise> )
Print the robust regression or explanation from slise
scale_identity()
A variant of `scale` that only adds the attributes
scale_robust()
Robust Scale
A variant of 'scale' that is based on median and mad (instead of mean and sd).
It can handle zero variance without producing nan:s.
sigmoid()
sigmoid function
simple_pca()
Calculate the PCA rotation matrix
The implementation is based on stats::prcomp.
Assumes the data has already been centered and scaled (if that is desired).
slise
slise-package
slise: Sparse Linear Subset Explanations
slise.explain()
SLISE for explaining Black box models.
slise.explain_comb()
SLISE Black Box Explainer
Use SLISE for explaining predictions made by a black box.
BUT with sparsity from a combinatorial search rather than Lasso!
slise.explain_find()
SLISE Black Box Explainer
Use SLISE for explaining predictions made by a black box.
BUT with a binary search for sparsity!
slise.fit()
SLISE for robust regression.
slise.formula()
SLISE for robust regression (using a formula).
slise.object()
Create a result object for SLISE that is similar to other regression method results
slise.object_unnormalise()
Turn a `slise.object` result based on normalised data to a `slise.object` result with unnormalised data.
The normalised results are retained, but with a 'normalised_' prefix.
slise.preprocess()
Preprocess the data as necessary before running SLISE
slise_initialisation_candidates()
Initialise the graduated optimisation by sampling candidates
slise_initialisation_candidates2()
Initialise the graduated optimisation by sampling candidates
slise_initialisation_lasso()
Initialise the graduated optimisation with a LASSO solution
slise_initialisation_ols()
Initialise the graduated optimisation with an "Ordinary Least Squares" solution
slise_initialisation_zeros()
Initialise the graduated optimisation with a zero-vector
sparsity()
Sparsity
Count the non-zero coefficients
unscale()
Unscale a scaled matrix / vector
which_min_n()
Which min n
Get the indecies of the n smallest values using partial sort