def test_LinearRegressionModel_get_obj_equals_get_obj_jac_l1_penalty(): _check_get_obj_equals_get_obj_jac(lambda a, o: LinearRegressionModel( a, o, penalty_func=error.L1Penalty(penalty_weight=random.uniform(0.0, 2.0))))
def test_L1Penalty_jacobian(): penalty_func = error.L1Penalty(penalty_weight=random.uniform(0.0, 2.0)) helpers.check_gradient(penalty_func, penalty_func.derivative)
def test_LinearRegressionModel_jacobian_l1_penalty(): _check_jacobian(lambda a, o: LinearRegressionModel( a, o, penalty_func=error.L1Penalty(penalty_weight=random.uniform(0.0, 2.0))))