old_scripts/basicML.py
def dataframeXY(all_files, rxtr_label):
    """"
    Takes the glob of files in a directory as well as the dict of labels and 
    produces a dataframe that has both the data features (X) and labeled data (Y).

    Parameters
    ----------
    all_files : list of str holding all simulation file names in a directory
    rxtr_label : dict holding all parameters for all simulations in a directory

    Returns
    -------
    dfXY : dataframe that has all features and labels for all simulations in a 
           directory

    """

    all_data = []
    for f in all_files:
        data = format_df(f)
        labels = get_labels(f, rxtr_label)
        labeled = label_data(labels, data)
        all_data.append(labeled)
    dfXY = pd.concat(all_data)
    ##FILTERING STUFFS##
    # Delete sim columns
    # Need better way to know when the nuclide columns start (6 for now)
    # Prob will just search for column idx that starts with str(1)?
    cols = len(dfXY.columns)
    dfXY = dfXY.iloc[:, 6:cols]
    # Filter out 0 burnups so MAPE can be calc'd
    dfXY = dfXY.loc[dfXY.Burnup > 0, :]
    return dfXY

    Takes the glob of files in a directory as well as the dict of labels and 
    produces a dataframe that has both the data features (X) and labeled data (Y).

    Parameters
    ----------
    all_files : list of str holding all simulation file names in a directory
    rxtr_label : dict holding all parameters for all simulations in a directory

    Returns
    -------
    dfXY : dataframe that has all features and labels for all simulations in a 
           directory

    
Takes the glob of files in a directory as well as the dict of labels and
produces a dataframe that has both the data features (X) and labeled data (Y).

Parameters

all_files : list of str holding all simulation file names in a directory
rxtr_label : dict holding all parameters for all simulations in a directory

Returns

dfXY : dataframe that has all features and labels for all simulations in a
directory
Takes the glob of files in a directory as well as the dict of labels and produces a dataframe that has both the data features ( X ) and labeled data ( Y ) . Parameters all_files : list of str holding all simulation file names in a directory rxtr_label : dict holding all parameters for all simulations in a directory Returns dfXY : dataframe that has all features and labels for all simulations in a directory
def dataframeXY(all_files, rxtr_label):
    all_data = []
    for f in all_files:
        data = format_df(f)
        labels = get_labels(f, rxtr_label)
        labeled = label_data(labels, data)
        all_data.append(labeled)
    dfXY = pd.concat(all_data)
    cols = len(dfXY.columns)
    dfXY = dfXY.iloc[:, 6:cols]
    dfXY = dfXY.loc[dfXY.Burnup > 0, :]
    return dfXY
def dataframeXY ( all_files , rxtr_label ) : all_data = [ ] for f in all_files : data = format_df ( f ) labels = get_labels ( f , rxtr_label ) labeled = label_data ( labels , data ) all_data . append ( labeled ) dfXY = pd . concat ( all_data ) cols = len ( dfXY . columns ) dfXY = dfXY . iloc [ : , 6 : cols ] dfXY = dfXY . loc [ dfXY . Burnup > 0 , : ] return dfXY
Takes the glob of files in a directory as well as the dict of labels and
produces a dataframe that has both the data features (X) and labeled data (Y).
Takes the glob of files in a directory as well as the dict of labels and produces a dataframe that has both the data features ( X ) and labeled data ( Y ) .
""""
    Takes the glob of files in a directory as well as the dict of labels and 
    produces a dataframe that has both the data features (X) and labeled data (Y).

    Parameters
    ----------
    all_files : list of str holding all simulation file names in a directory
    rxtr_label : dict holding all parameters for all simulations in a directory

    Returns
    -------
    dfXY : dataframe that has all features and labels for all simulations in a 
           directory

    """ ##FILTERING STUFFS## # Delete sim columns # Need better way to know when the nuclide columns start (6 for now) # Prob will just search for column idx that starts with str(1)? # Filter out 0 burnups so MAPE can be calc'd
all_files
rxtr_label