Package parsimony :: Package functions :: Module combinedfunctions :: Class LogisticRegressionL1L2TV
[hide private]
[frames] | no frames]

Class LogisticRegressionL1L2TV

source code

                            object --+            
                                     |            
                   properties.Function --+        
                                         |        
              properties.CompositeFunction --+    
                                             |    
                            object --+       |    
                                     |       |    
                   properties.Gradient --+   |    
                                         |   |    
                            object --+   |   |    
                                     |   |   |    
properties.LipschitzContinuousGradient --+   |    
                                         |   |    
                            object --+   |   |    
                                     |   |   |    
                properties.Eigenvalues --+   |    
                                         |   |    
                            object --+   |   |    
                                     |   |   |    
           properties.ProximalOperator --+   |    
                                         |   |    
               properties.NesterovFunction --+    
                                             |    
                                object --+   |    
                                         |   |    
               properties.ProximalOperator --+    
                                             |    
                                object --+   |    
                                         |   |    
                   properties.Continuation --+    
                                             |    
                                object --+   |    
                                         |   |    
                   properties.DualFunction --+    
                                             |    
                                object --+   |    
                                         |   |    
                 properties.StronglyConvex --+    
                                             |    
                                object --+   |    
                                         |   |    
                       properties.StepSize --+    
                                             |    
                        LinearRegressionL1L2TV --+
                                                 |
                                                LogisticRegressionL1L2TV

Combination (sum) of RidgeLogisticRegression, L1 and TotalVariation.

Instance Methods [hide private]
 
__init__(self, X, y, l1, l2, tv, A=None, mu=0.0, weights=None, penalty_start=0, mean=True)
Parameters ---------- X : Numpy array (n-by-p).
source code
 
gap(self, beta, beta_hat=None, eps=5e-08, max_iter=10000)
Compute the duality gap for the logistic function.
source code

Inherited from LinearRegressionL1L2TV: A, Aa, L, M, betahat, eps_max, eps_opt, estimate_mu, f, fmu, get_mu, grad, mu_max, mu_opt, parameter, phi, project, prox, reset, set_mu, set_params, step

Inherited from properties.Function: get_params

Inherited from properties.NesterovFunction: alpha, lA, lambda_max

Inherited from properties.Gradient: approx_grad

Inherited from properties.LipschitzContinuousGradient: approx_L

Inherited from properties.Eigenvalues: lambda_min

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from LinearRegressionL1L2TV: __abstractmethods__

Inherited from properties.CompositeFunction: __metaclass__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, X, y, l1, l2, tv, A=None, mu=0.0, weights=None, penalty_start=0, mean=True)
(Constructor)

source code 

Parameters
----------
X : Numpy array (n-by-p). The X matrix for the logistic regression.

y : Numpy array (n-by-1). The y vector for the logistic regression.

l1 : Non-negative float. The Lagrange multiplier, or regularisation
        constant, for the L1 penalty.

l2 : Non-negative float. The Lagrange multiplier, or regularisation
        constant, for the ridge (L2) penalty.

tv : Non-negative float. The Lagrange multiplier, or regularisation
        constant, of the smoothed TV function.

A : Numpy array (usually sparse). The linear operator for the Nesterov
        formulation for TV. May not be None!

mu : Non-negative float. The regularisation constant for the smoothing
        of the TV function.

weights: List with n elements. The sample's weights.

penalty_start : Non-negative integer. The number of columns, variables
        etc., to except from penalisation. Equivalently, the first
        index to be penalised. Default is 0, all columns are included.

mean : Boolean. Whether to compute the squared loss or the mean
        squared loss. Default is True, the mean squared loss.

Overrides: object.__init__

gap(self, beta, beta_hat=None, eps=5e-08, max_iter=10000)

source code 

Compute the duality gap for the logistic function.

From the interface "DualFunction".

Overrides: properties.DualFunction.gap