old_scripts/auto_preds.py
def auto_train_and_predict(train):
    """
    Given training and testing data, this script runs some ML algorithms
    to predict burnup

    Parameters 
    ---------- 
    
    train : group of dataframes that include training data and the three
            labels 
    
    Returns
    -------
    burnup : tuples of error metrics for training, testing, and cross validation 
             errors for all three algorithms

    """

    # some params
    k = 1
    a = 1
    g = 0.001
    c = 1000
    k_list = np.linspace(1, 39, 20)
    alpha_list = np.logspace(-7, 3, 20)
    gamma_list = np.linspace(0.0005, 0.09, 20)
    c_list = np.linspace(0.01, 100000, 20)

    trainX = scale(train.nuc_concs)
    trainY = train.burnup
    
    for alg_type in ('svr_c',):#('nn', 'rr', 'svr_c', 'svr_g'):
        if alg_type == 'nn':
            alg1 = KNeighborsRegressor(n_neighbors=k)
            alg2 = KNeighborsRegressor()
            param_string = 'n_neighbors'
            param_list = k_list
        elif alg_type == 'svr_c':
            alg1 = SVR(gamma=g, C=c)
            alg2 = SVR(gamma=g)
            param_string = 'C'
            param_list = c_list
        elif alg_type == 'svr_g':
            alg1 = SVR(gamma=g, C=c)
            alg2 = SVR(C=c)
            param_string = 'gamma'
            param_list = gamma_list
        else:
            alg1 = Ridge(alpha=a)
            alg2 = Ridge()
            param_string = 'alpha'
            param_list = alpha_list            
        diagnostic_curves(trainX, trainY, alg1, alg2, param_string, param_list, alg_type)
    
    return

    Given training and testing data, this script runs some ML algorithms
    to predict burnup

    Parameters 
    ---------- 
    
    train : group of dataframes that include training data and the three
            labels 
    
    Returns
    -------
    burnup : tuples of error metrics for training, testing, and cross validation 
             errors for all three algorithms

    
Given training and testing data, this script runs some ML algorithms
to predict burnup
Given training and testing data this script runs some ML algorithms to predict burnup
def auto_train_and_predict(train):
    k = 1
    a = 1
    g = 0.001
    c = 1000
    k_list = np.linspace(1, 39, 20)
    alpha_list = np.logspace(-7, 3, 20)
    gamma_list = np.linspace(0.0005, 0.09, 20)
    c_list = np.linspace(0.01, 100000, 20)
    trainX = scale(train.nuc_concs)
    trainY = train.burnup
    for alg_type in ('svr_c',):
        if alg_type == 'nn':
            alg1 = KNeighborsRegressor(n_neighbors=k)
            alg2 = KNeighborsRegressor()
            param_string = 'n_neighbors'
            param_list = k_list
        elif alg_type == 'svr_c':
            alg1 = SVR(gamma=g, C=c)
            alg2 = SVR(gamma=g)
            param_string = 'C'
            param_list = c_list
        elif alg_type == 'svr_g':
            alg1 = SVR(gamma=g, C=c)
            alg2 = SVR(C=c)
            param_string = 'gamma'
            param_list = gamma_list
        else:
            alg1 = Ridge(alpha=a)
            alg2 = Ridge()
            param_string = 'alpha'
            param_list = alpha_list            
        diagnostic_curves(trainX, trainY, alg1, alg2, param_string, param_list, alg_type)
    return
def auto_train_and_predict ( train ) : k = 1 a = 1 g = 0.001 c = 1000 k_list = np . linspace ( 1 , 39 , 20 ) alpha_list = np . logspace ( - 7 , 3 , 20 ) gamma_list = np . linspace ( 0.0005 , 0.09 , 20 ) c_list = np . linspace ( 0.01 , 100000 , 20 ) trainX = scale ( train . nuc_concs ) trainY = train . burnup for alg_type in ( 'svr_c' , ) : if alg_type == 'nn' : alg1 = KNeighborsRegressor ( n_neighbors = k ) alg2 = KNeighborsRegressor ( ) param_string = 'n_neighbors' param_list = k_list elif alg_type == 'svr_c' : alg1 = SVR ( gamma = g , C = c ) alg2 = SVR ( gamma = g ) param_string = 'C' param_list = c_list elif alg_type == 'svr_g' : alg1 = SVR ( gamma = g , C = c ) alg2 = SVR ( C = c ) param_string = 'gamma' param_list = gamma_list else : alg1 = Ridge ( alpha = a ) alg2 = Ridge ( ) param_string = 'alpha' param_list = alpha_list diagnostic_curves ( trainX , trainY , alg1 , alg2 , param_string , param_list , alg_type ) return
Given training and testing data, this script runs some ML algorithms
to predict burnup
Given training and testing data this script runs some ML algorithms to predict burnup
"""
    Given training and testing data, this script runs some ML algorithms
    to predict burnup

    Parameters 
    ---------- 
    
    train : group of dataframes that include training data and the three
            labels 
    
    Returns
    -------
    burnup : tuples of error metrics for training, testing, and cross validation 
             errors for all three algorithms

    """ # some params #('nn', 'rr', 'svr_c', 'svr_g'):
train
None
Returns
None
burnup
errors for all three algorithms
errors for all three algorithms