modules/utils/notebook_utils/dataframe_helper.py
def create_gen_marginal_df(L_data, models, lfs_columns, model_names, candidate_ids):
    """
    This function is designed to create a dataframe that will hold
    the marginals outputted from the generative model

    L_data - the sparse matrix generated fromt eh label functions
    models - the list of generative models
    lfs_columns - a listing of column indexes that correspond to desired label fucntions
    model_names - a label for each model
    candidate_ids - a list of candidate ids so the marginals can be mapped back to the candidate
    """
    marginals = [
        model.marginals(L_data[:, columns])
        for model, columns in zip(models, lfs_columns)
    ]
    marginals_df = pd.DataFrame(
           np.array(marginals).T, columns=model_names
    )
    marginals_df['candidate_id'] = candidate_ids
    return marginals_df

    This function is designed to create a dataframe that will hold
    the marginals outputted from the generative model

    L_data - the sparse matrix generated fromt eh label functions
    models - the list of generative models
    lfs_columns - a listing of column indexes that correspond to desired label fucntions
    model_names - a label for each model
    candidate_ids - a list of candidate ids so the marginals can be mapped back to the candidate
    
This function is designed to create a dataframe that will hold
the marginals outputted from the generative model

the sparse matrix generated fromt eh label functions
models - the list of generative models
lfs_columns - a listing of column indexes that correspond to desired label fucntions
model_names - a label for each model
candidate_ids - a list of candidate ids so the marginals can be mapped back to the candidate
This function is designed to create a dataframe that will hold the marginals outputted from the generative model the sparse matrix generated fromt eh label functions models - the list of generative models lfs_columns - a listing of column indexes that correspond to desired label fucntions model_names - a label for each model candidate_ids - a list of candidate ids so the marginals can be mapped back to the candidate
def create_gen_marginal_df(L_data, models, lfs_columns, model_names, candidate_ids):
    marginals = [
        model.marginals(L_data[:, columns])
        for model, columns in zip(models, lfs_columns)
    ]
    marginals_df = pd.DataFrame(
           np.array(marginals).T, columns=model_names
    )
    marginals_df['candidate_id'] = candidate_ids
    return marginals_df
def create_gen_marginal_df ( L_data , models , lfs_columns , model_names , candidate_ids ) : marginals = [ model . marginals ( L_data [ : , columns ] ) for model , columns in zip ( models , lfs_columns ) ] marginals_df = pd . DataFrame ( np . array ( marginals ) . T , columns = model_names ) marginals_df [ 'candidate_id' ] = candidate_ids return marginals_df
This function is designed to create a dataframe that will hold
the marginals outputted from the generative model
This function is designed to create a dataframe that will hold the marginals outputted from the generative model
"""
    This function is designed to create a dataframe that will hold
    the marginals outputted from the generative model

    L_data - the sparse matrix generated fromt eh label functions
    models - the list of generative models
    lfs_columns - a listing of column indexes that correspond to desired label fucntions
    model_names - a label for each model
    candidate_ids - a list of candidate ids so the marginals can be mapped back to the candidate
    """
L_data
models
lfs_columns
model_names
candidate_ids