old_scripts/learnme_linear.py
def lc_classification(X, Y, c, cv_fold):
    """
    Learning curve for classification: predicts models using two regularization 
    parameters, returning the training and cross validation accuracies for each 
    with respect to a given training set size
    
    """
    l1 = LogisticRegression(C=c, penalty='l1')
    l2 = LogisticRegression(C=c, penalty='l2')
    strat_cv = StratifiedKFold(n_splits=cv_fold, shuffle=True)
    # for logR bug:
    Xs, Ys = shuffle(X, Y)
    _, trl1, cvl1 = learning_curve(l1, Xs, Ys, train_sizes=TRAINSET_SIZES, 
                                   cv=strat_cv
                                   )
    m, trl2, cvl2 = learning_curve(l2, X, Ys, train_sizes=TRAINSET_SIZES, 
                                   cv=strat_cv
                                   )
    accuracy = format(m, cvl1, trl1, cvl2, trl2)
    return accuracy

    Learning curve for classification: 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 classification: 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 classification : 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_classification(X, Y, c, cv_fold):
    l1 = LogisticRegression(C=c, penalty='l1')
    l2 = LogisticRegression(C=c, penalty='l2')
    strat_cv = StratifiedKFold(n_splits=cv_fold, shuffle=True)
    Xs, Ys = shuffle(X, Y)
    _, trl1, cvl1 = learning_curve(l1, Xs, Ys, train_sizes=TRAINSET_SIZES, 
                                   cv=strat_cv
                                   )
    m, trl2, cvl2 = learning_curve(l2, X, Ys, train_sizes=TRAINSET_SIZES, 
                                   cv=strat_cv
                                   )
    accuracy = format(m, cvl1, trl1, cvl2, trl2)
    return accuracy
def lc_classification ( X , Y , c , cv_fold ) : l1 = LogisticRegression ( C = c , penalty = 'l1' ) l2 = LogisticRegression ( C = c , penalty = 'l2' ) strat_cv = StratifiedKFold ( n_splits = cv_fold , shuffle = True ) Xs , Ys = shuffle ( X , Y ) _ , trl1 , cvl1 = learning_curve ( l1 , Xs , Ys , train_sizes = TRAINSET_SIZES , cv = strat_cv ) m , trl2 , cvl2 = learning_curve ( l2 , X , Ys , train_sizes = TRAINSET_SIZES , cv = strat_cv ) accuracy = format ( m , cvl1 , trl1 , cvl2 , trl2 ) return accuracy
Learning curve for classification: 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 classification : 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 classification: predicts models using two regularization 
    parameters, returning the training and cross validation accuracies for each 
    with respect to a given training set size
    
    """ # for logR bug:
X
Y
c
cv_fold