bucky.util.spline_smooth
Method of smoothing data w/ splines. Based of a GAM from mgcv with a cr() basis.
identity_link
class for idenity link functions
log_link
class for log link functions
PIRLS(x, y, alp, pen, tol=1e-07, dist='g', max_it=10000, w=None, gamma=1.0, tqdm_label='PIRLS')
PIRLS
Penalized iterativly reweighted least squares
_absorb_constraints(design_matrix, constraints, pen=None)
_absorb_constraints
Apply constraints to the design matrix.
_compute_base_functions(x, knots)
_compute_base_functions
Return base functions for the spline basis.
_cr(x, df, center=True)
_cr
Python version of the R lib mgcv function cr().
_find_knots_lower_bounds(x, knots)
_find_knots_lower_bounds
Find the lower bound for the knots.
_get_free_crs_dmatrix(x, knots)
_get_free_crs_dmatrix
Builds an unconstrained cubic regression spline design matrix.
_get_natural_f(knots)
_get_natural_f
Returns mapping of natural cubic spline values to 2nd derivatives.
fit(y, x=None, df=10, alp=0.6, dist='g', pirls=False, standardize=True, w=None, gamma=1.0, tol=1e-07, label='fit')
fit
Perform fit of natural cubic splines to the vector y, return the smoothed y.
nunique(arr, axis=-1)
nunique
Return the number of uniq values along a given axis.
opt_lam(x, y, alp=0.6, w=None, pen=None, min_lam=0.1, step_size=None, tol=0.001, max_it=100, gamma=1.0)
opt_lam
Calculate the exact soln to the ridge regression of the weights for basis x that fit data y.
ridge(x, y, alp=0.0)
ridge
bucky.util.spline_smooth.
dtype
memory
g
g - id link
g_prime
g’ - id link
mu
mu - id link
g - log link
g’ - log link
mu - log link
bucky.util.scoring
bucky.util.update_data_repos