def test_LinearRegressionModel_get_obj_equals_get_obj_jac_l2_penalty(): _check_get_obj_equals_get_obj_jac(lambda a, o: LinearRegressionModel( a, o, penalty_func=error.L2Penalty(penalty_weight=random.uniform(0.0, 2.0))))
def test_L2Penalty_jacobian(): penalty_func = error.L2Penalty(penalty_weight=random.uniform(0.0, 2.0)) helpers.check_gradient(penalty_func, penalty_func.derivative)
def test_LinearRegressionModel_jacobian_l2_penalty(): _check_jacobian(lambda a, o: LinearRegressionModel( a, o, penalty_func=error.L2Penalty(penalty_weight=random.uniform(0.0, 2.0))))