old_scripts/learnme_linear.py
def lc_regression(X, y, a, cv_fold):
    """ 
    Learning curve for regression: predicts models using two regularization 
    parameters, returning the training and cross validation accuracies for each 
    with respect to a given training set size

    """
    
    l1 = ElasticNet(alpha=a, l1_ratio=1, selection='random')
    l2 = ElasticNet(alpha=a, l1_ratio=0, selection='random')
    _, trl1, cvl1 = learning_curve(l1, X, y, train_sizes=TRAINSET_SIZES, 
                                   cv=cv_fold, scoring='neg_mean_squared_error'
                                   )
    m, trl2, cvl2 = learning_curve(l2, X, y, train_sizes=TRAINSET_SIZES, 
                                   cv=cv_fold, scoring='neg_mean_squared_error'
                                   )
    mse = format(m, cvl1, trl1, cvl2, trl2)
    return mse
 
    Learning curve for regression: predicts models using two regularization 
    parameters, returning the training and cross validation accuracies for each 
    with respect to a given training set size

    
Learning curve for regression: predicts models using two regularization
parameters, returning the training and cross validation accuracies for each
with respect to a given training set size
Learning curve for regression : predicts models using two regularization parameters returning the training and cross validation accuracies for each with respect to a given training set size
def lc_regression(X, y, a, cv_fold):
    l1 = ElasticNet(alpha=a, l1_ratio=1, selection='random')
    l2 = ElasticNet(alpha=a, l1_ratio=0, selection='random')
    _, trl1, cvl1 = learning_curve(l1, X, y, train_sizes=TRAINSET_SIZES, 
                                   cv=cv_fold, scoring='neg_mean_squared_error'
                                   )
    m, trl2, cvl2 = learning_curve(l2, X, y, train_sizes=TRAINSET_SIZES, 
                                   cv=cv_fold, scoring='neg_mean_squared_error'
                                   )
    mse = format(m, cvl1, trl1, cvl2, trl2)
    return mse
def lc_regression ( X , y , a , cv_fold ) : l1 = ElasticNet ( alpha = a , l1_ratio = 1 , selection = 'random' ) l2 = ElasticNet ( alpha = a , l1_ratio = 0 , selection = 'random' ) _ , trl1 , cvl1 = learning_curve ( l1 , X , y , train_sizes = TRAINSET_SIZES , cv = cv_fold , scoring = 'neg_mean_squared_error' ) m , trl2 , cvl2 = learning_curve ( l2 , X , y , train_sizes = TRAINSET_SIZES , cv = cv_fold , scoring = 'neg_mean_squared_error' ) mse = format ( m , cvl1 , trl1 , cvl2 , trl2 ) return mse
Learning curve for regression: predicts models using two regularization
parameters, returning the training and cross validation accuracies for each
with respect to a given training set size
Learning curve for regression : predicts models using two regularization parameters returning the training and cross validation accuracies for each with respect to a given training set size
""" 
    Learning curve for regression: predicts models using two regularization 
    parameters, returning the training and cross validation accuracies for each 
    with respect to a given training set size

    """
X
y
a
cv_fold