paths

Module: paths

Inheritance diagram for regreg.paths:

digraph inheritanceb2000cc0b2 { rankdir=LR; size="8.0, 12.0"; "regreg.paths.lasso" [URL="#regreg.paths.lasso",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "regreg.paths.logistic_factory" [URL="#regreg.paths.logistic_factory",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "regreg.paths.loss_factory" -> "regreg.paths.logistic_factory" [arrowsize=0.5,style="setlinewidth(0.5)"]; "regreg.paths.loss_factory" [URL="#regreg.paths.loss_factory",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "regreg.paths.nesta" [URL="#regreg.paths.nesta",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "regreg.paths.lasso" -> "regreg.paths.nesta" [arrowsize=0.5,style="setlinewidth(0.5)"]; "regreg.paths.squared_error_factory" [URL="#regreg.paths.squared_error_factory",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "regreg.paths.loss_factory" -> "regreg.paths.squared_error_factory" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

Classes

lasso

class regreg.paths.lasso(loss_factory, X, penalty_structure=None, group_weights={}, elastic_net=identity_quadratic(0.000000, 0.0, 0.0, 0.000000), alpha=0.0, intercept=True, positive_part=None, unpenalized=None, lagrange_proportion=0.05, nstep=100, scale=True, center=True)

Bases: object

__init__(loss_factory, X, penalty_structure=None, group_weights={}, elastic_net=identity_quadratic(0.000000, 0.0, 0.0, 0.000000), alpha=0.0, intercept=True, positive_part=None, unpenalized=None, lagrange_proportion=0.05, nstep=100, scale=True, center=True)

Initialize self. See help(type(self)) for accurate signature.

property Xn
property active
construct_loss(candidate_set, lagrange)
property elastic_net
get_lagrange()
get_lagrange_sequence()
grad(loss=None)

Gradient at current value. This includes the gradient of the smooth loss as well as the gradient of the elastic net part. This is used for determining whether the KKT conditions are met and which coefficients are in the strong set.

property lagrange
property lagrange_max
property lagrange_sequence
property lipschitz
classmethod logistic(X, Y, *args, **keyword_args)
property loss
main(inner_tol=1e-05, verbose=False)
property nonzero
property null_solution
property problem
restricted_problem(candidate_set, lagrange)

Assumes the candidate set includes intercept as first column.

set_lagrange(lagrange)
set_lagrange_sequence(lagrange_sequence)
property shape
slice_columns(columns)
property solution
solve_subproblem(candidate_set, lagrange_new, **solve_args)
classmethod squared_error(X, Y, *args, **keyword_args)
strong_set(lagrange_cur, lagrange_new, grad=None, slope_estimate=1)

logistic_factory

class regreg.paths.logistic_factory(response)

Bases: regreg.paths.loss_factory

__init__(response)

Initialize self. See help(type(self)) for accurate signature.

get_response()
property response
set_response(response)

loss_factory

class regreg.paths.loss_factory(response)

Bases: object

__init__(response)

Initialize self. See help(type(self)) for accurate signature.

get_response()
property response
set_response(response)

nesta

class regreg.paths.nesta(loss_factory, X, atom_factory, epsilon=None, **lasso_keywords)

Bases: regreg.paths.lasso

__init__(loss_factory, X, atom_factory, epsilon=None, **lasso_keywords)

Initialize self. See help(type(self)) for accurate signature.

property Xn
property active
construct_loss(candidate_set, lagrange)
property elastic_net
property epsilon
property final_step
get_dual_term(lagrange)
get_epsilon()
get_final_step()
get_lagrange()
get_lagrange_sequence()
grad(loss=None)

Gradient at current value. This includes the gradient of the smooth loss as well as the gradient of the elastic net part. This is used for determining whether the KKT conditions are met and which coefficients are in the strong set.

property lagrange
property lagrange_max
property lagrange_sequence
property lipschitz
classmethod logistic(X, Y, *args, **keyword_args)
property loss
main(inner_tol=1e-05, verbose=False)
property nonzero
property null_solution
property problem
restricted_problem(candidate_set, lagrange)

Assumes the candidate set includes intercept as first column.

set_dual_term(lagrange, dual_term)
set_epsilon(epsilon)
set_final_step(value)
set_lagrange(lagrange)
set_lagrange_sequence(lagrange_sequence)
property shape
slice_columns(columns)
property solution
solve_subproblem(candidate_set, lagrange_new, **solve_args)
classmethod squared_error(X, Y, *args, **keyword_args)
strong_set(lagrange_cur, lagrange_new, grad=None, slope_estimate=1)

squared_error_factory

class regreg.paths.squared_error_factory(response)

Bases: regreg.paths.loss_factory

__init__(response)

Initialize self. See help(type(self)) for accurate signature.

get_response()
property response
set_response(response)

Function

regreg.paths.newsgroup()