old_scripts/alt_learnme.py
def track_predictions(trainX, trainY, alg1_init, alg2_init, alg3_init, scores, CV, csv_name):
    """
    Saves csv's with predictions of each reactor parameter instance.
    
    Parameters 
    ---------- 
    
    X : dataframe that includes all training data
    Y : series with labels for training data
    alg1_init : optimized learner 1
    alg2_init : optimized learner 2
    alg3_init : optimized learner 3
    scores : list of scoring types (from sckikit-learn)
    CV : cross-validation generator
    csv_name : string containing the train set, nuc subset, and parameter being 
               predicted for naming purposes

    Returns
    -------
    *predictions.csv : csv file with prediction results 

    """
    alg1 = cross_val_predict(alg1_init, trainX, y=trainY, cv=CV)
    alg2 = cross_val_predict(alg2_init, trainX, y=trainY, cv=CV)
    alg3 = cross_val_predict(alg3_init, trainX, y=trainY, cv=CV)

    preds_by_alg = pd.DataFrame({'TrueY': trainY, 'DecTree': alg1, 
                                 'ExTree': alg2, 'Bayes': alg3}, 
                                 index=trainY.index)
    preds_by_alg.to_csv(csv_name + '_predictions.csv')
    return

    Saves csv's with predictions of each reactor parameter instance.
    
    Parameters 
    ---------- 
    
    X : dataframe that includes all training data
    Y : series with labels for training data
    alg1_init : optimized learner 1
    alg2_init : optimized learner 2
    alg3_init : optimized learner 3
    scores : list of scoring types (from sckikit-learn)
    CV : cross-validation generator
    csv_name : string containing the train set, nuc subset, and parameter being 
               predicted for naming purposes

    Returns
    -------
    *predictions.csv : csv file with prediction results 

    
Saves csv's with predictions of each reactor parameter instance.
Saves csv ' s with predictions of each reactor parameter instance .
def track_predictions(trainX, trainY, alg1_init, alg2_init, alg3_init, scores, CV, csv_name):
    alg1 = cross_val_predict(alg1_init, trainX, y=trainY, cv=CV)
    alg2 = cross_val_predict(alg2_init, trainX, y=trainY, cv=CV)
    alg3 = cross_val_predict(alg3_init, trainX, y=trainY, cv=CV)
    preds_by_alg = pd.DataFrame({'TrueY': trainY, 'DecTree': alg1, 
                                 'ExTree': alg2, 'Bayes': alg3}, 
                                 index=trainY.index)
    preds_by_alg.to_csv(csv_name + '_predictions.csv')
    return
def track_predictions ( trainX , trainY , alg1_init , alg2_init , alg3_init , scores , CV , csv_name ) : alg1 = cross_val_predict ( alg1_init , trainX , y = trainY , cv = CV ) alg2 = cross_val_predict ( alg2_init , trainX , y = trainY , cv = CV ) alg3 = cross_val_predict ( alg3_init , trainX , y = trainY , cv = CV ) preds_by_alg = pd . DataFrame ( { 'TrueY' : trainY , 'DecTree' : alg1 , 'ExTree' : alg2 , 'Bayes' : alg3 } , index = trainY . index ) preds_by_alg . to_csv ( csv_name + '_predictions.csv' ) return
Saves csv's with predictions of each reactor parameter instance.
Saves csv ' s with predictions of each reactor parameter instance .
"""
    Saves csv's with predictions of each reactor parameter instance.
    
    Parameters 
    ---------- 
    
    X : dataframe that includes all training data
    Y : series with labels for training data
    alg1_init : optimized learner 1
    alg2_init : optimized learner 2
    alg3_init : optimized learner 3
    scores : list of scoring types (from sckikit-learn)
    CV : cross-validation generator
    csv_name : string containing the train set, nuc subset, and parameter being 
               predicted for naming purposes

    Returns
    -------
    *predictions.csv : csv file with prediction results 

    """
trainX
trainY
alg1_init
None
alg2_init
None
alg3_init
None
scores
None
CV
None
csv_name
predicted for naming purposes
predicted for naming purposes
X
None
Y
None
Returns
None
*predictions.csv
None