Regularization Functions¶
The regularization functions are used to prevent overfitting by modifying the models objective function by adding additional terms that penalize large weights. This helps prevents the network from using weights that are redundant.
Featured Regularizers¶
L1Regularization (_lambda, **kwargs) 
Lasso Regression (L1Regularization) 
L2Regularization (_lambda, **kwargs) 
Lasso Regression (L2Regularization) 
ElasticNetRegularization (_lambda, l1_ratio) 
Elastic Net Regularization (ElasticNetRegularization) 
Function Descriptions¶

class
ztlearn.regularizers.
ElasticNetRegularization
(_lambda, l1_ratio)[source]¶ Bases:
object
Elastic Net Regularization (ElasticNetRegularization)
ElasticNetRegularization adds both absolute value of magnitude and squared magnitude of coefficient as penalty term to the loss function
References
 [1] Regularization (mathematics)
 [Wikipedia Article] https://en.wikipedia.org/wiki/Regularization_(mathematics)
Parameters:  _lambda (float32) – controls the weight of the penalty term
 l1_ratio (float32) – controls the value l1 penalty as a ratio of total penalty added to the loss function

regulation_name
¶

class
ztlearn.regularizers.
L1Regularization
(_lambda, **kwargs)[source]¶ Bases:
object
Lasso Regression (L1Regularization)
L1Regularization adds sum of the absolute value magnitudes of parameters as penalty term to the loss function
References
 [1] Regularization (mathematics)
 [Wikipedia Article] https://en.wikipedia.org/wiki/Regularization_(mathematics)
 [2] Regression shrinkage and selection via the lasso
 [R Tibshirani, 1996] https://goo.gl/Yh9bBU
 [PDF] https://goo.gl/mQP5mA
 [3] Feature selection, L1 vs. L2 regularization, and rotational invariance
 [Andrew Y. Ng, ] [PDF] https://goo.gl/rbwNCt
Parameters: _lambda (float32) – controls the weight of the penalty term 
regulation_name
¶

class
ztlearn.regularizers.
L2Regularization
(_lambda, **kwargs)[source]¶ Bases:
object
Lasso Regression (L2Regularization)
L1Regularization adds sum of the squared magnitudes of parameters as penalty term to the loss function
References
 [1] Regularization (mathematics)
 [Wikipedia Article] https://en.wikipedia.org/wiki/Regularization_(mathematics)
 [2] Regression shrinkage and selection via the lasso
 [R Tibshirani, 1996] https://goo.gl/Yh9bBU
 [PDF] https://goo.gl/mQP5mA
 [3] Feature selection, L1 vs. L2 regularization, and rotational invariance
 [Andrew Y. Ng, ] [PDF] https://goo.gl/rbwNCt
Parameters: _lambda (float32) – controls the weight of the penalty term 
regulation_name
¶