API Reference#

adelie.bcd#

objective(beta, *, quad, linear, l1, l2)

Computes the BCD objective.

root(*, quad, linear, l1[, tol, max_iters, ...])

Solves the non-negative root of the BCD root function.

root_function(h, *, quad, linear, l1)

Computes the BCD root function.

root_lower_bound(*, quad, linear, l1)

Computes a lower bound on the root of BCD root function.

root_upper_bound(*, quad, linear, l1[, zero_tol])

Computes an upper bound on the root of BCD root function.

solve(*, quad, linear, l1, l2[, tol, ...])

Solves the BCD update.

adelie.configs#

set_configs(name[, value])

Sets global configurations.

adelie.constraint#

box(lower, upper, *[, method, configs, dtype])

Creates a box constraint.

linear(A, lower, upper, *[, svd, vars, ...])

Creates a linear constraint.

lower(b, **kwargs)

Creates a lower bound constraint.

one_sided(D, b, *[, method, configs, dtype])

Creates a one-sided bound constraint.

upper(b, **kwargs)

Creates an upper bound constraint.

adelie.cv#

CVGrpnetResult(lmdas, losses, avg_losses, ...)

Result of K-fold CV group elastic net.

cv_grpnet(X, glm, *[, n_threads, ...])

Solves cross-validated group elastic net via naive method.

adelie.data#

dense(n, p, G, *[, K, glm, equal_groups, ...])

Creates a dense dataset.

snp_phased_ancestry(n, s, A, *[, K, glm, ...])

Creates a SNP phased, ancestry dataset.

snp_unphased(n, p, *[, K, glm, sparsity, ...])

Creates a SNP unphased dataset.

adelie.diagnostic#

DiagnosticCov(state)

Diagnostic class for covariance states.

DiagnosticNaive(state)

Diagnostic class for naive states.

coefficient(lmda, betas, intercepts, lmdas)

Computes the coefficient at \(\lambda\) using linear interpolation of solutions.

diagnostic(state)

Creates a diagnostic class object appropriate for the state.

gradients(X, resids, *[, n_threads])

Computes the gradients.

gradient_norms(grads, betas, duals, lmdas, *)

Computes the group-wise gradient norms.

gradient_scores(grad_norms, lmdas, *[, ...])

Computes the gradient scores.

objective(X, glm, betas, intercepts, lmdas, *)

Computes the group elastic net objective.

plot_benchmark(total_time, benchmark_screen, ...)

Plots benchmark times.

plot_coefficients(betas, lmdas, groups, ...)

Plots the coefficient profile.

plot_devs(lmdas, devs)

Plots the deviance profile.

plot_kkt(lmdas, scores, *[, idx, relative])

Plots KKT failures.

plot_set_sizes(groups, screen_sizes, ...[, ...])

Plots the set sizes.

predict(X, betas, intercepts, *[, offsets, ...])

Computes the linear predictions.

residuals(glm, etas)

Computes the residuals.

adelie.glm#

binomial(y, *[, weights, link, dtype])

Creates a Binomial GLM family object.

cox(start, stop, status, *[, weights, ...])

Creates a Cox GLM family object.

gaussian(y, *[, weights, dtype, opt])

Creates a Gaussian GLM family object.

multigaussian(y, *[, weights, dtype, opt])

Creates a MultiGaussian GLM family object.

multinomial(y, *[, weights, dtype])

Creates a Multinomial GLM family object.

poisson(y, *[, weights, dtype])

Creates a Poisson GLM family object.

adelie.io#

snp_phased_ancestry(filename[, read_mode])

IO handler for SNP phased, ancestry matrix.

snp_unphased(filename[, read_mode])

IO handler for SNP unphased matrix.

adelie.matrix#

block_diag(mats, *[, n_threads])

Creates a block-diagonal matrix given by the list of matrices.

concatenate(mats, *[, axis, n_threads])

Creates a concatenation of the matrices.

dense(mat, *[, method, copy, n_threads])

Creates a viewer of a dense matrix.

eager_cov(mat[, n_threads])

Creates an eager covariance matrix.

interaction(mat, intr_map[, levels, copy, ...])

Creates a matrix with pairwise interactions.

kronecker_eye(mat, K, *[, copy, n_threads])

Creates a Kronecker product with identity matrix.

lazy_cov(mat, *[, copy, n_threads])

Creates a lazy covariance matrix.

one_hot(mat[, levels, copy, n_threads])

Creates a one-hot encoded matrix.

snp_phased_ancestry(io, *[, n_threads, dtype])

Creates a SNP phased, ancestry matrix.

snp_unphased(io, *[, n_threads, dtype])

Creates a SNP unphased matrix.

sparse(mat, *[, method, copy, n_threads])

Creates a viewer of a sparse matrix.

standardize(mat[, centers, scales, ddof, ...])

Creates a standardized matrix.

subset(mat, indices, *[, axis, n_threads])

Creates a subset of the matrix along an axis.

adelie.solver#

gaussian_cov(A, v, *[, constraints, groups, ...])

Solves Gaussian group elastic net via covariance method.

grpnet(X, glm, *[, constraints, groups, ...])

Solves group elastic net via naive method.

adelie.state#

gaussian_cov(*, A, v, constraints, groups, ...)

Creates a Gaussian, covariance method state object.

gaussian_naive(*, X, y, X_means, y_mean, ...)

Creates a Gaussian, naive method state object.

gaussian_pin_cov(*, A, constraints, groups, ...)

Creates a Gaussian, pin, covariance method state object.

gaussian_pin_naive(*, X, y_mean, y_var, ...)

Creates a Gaussian, pin, naive method state object.

glm_naive(*, X, glm, constraints, groups, ...)

Creates a GLM, naive method state object.

multigaussian_naive(*, X, y, X_means, y_var, ...)

Creates a MultiGaussian, naive method state object.

multiglm_naive(*, X, glm, constraints, ...)

Creates a multi-response GLM, naive method state object.