<filename>data-analysis/source-python/data_utils.py<gh_stars>0
"""
This module is responsible for retrieving X and y
for deep component training.
"""
import pandas as pd
from os import path

DATA_DIR = path.abspath('data-analysis/source-python/data')


def get_deep_data(filename):
    """
    Reads drug features, returns a `panda`'s `DataFrame`:
    - X - A DataFrame of shape (#drugs, #features).
    """
    print("Reading {} from {}...".format(filename, path.basename(DATA_DIR)))
    # shape (#drugs, #categories)
    X_df = pd.read_csv(path.join(DATA_DIR, filename))

    print('Retrieved data:')
    print('X: {} drugs, {} features per drug'.format(*X_df.shape))

    return X_df.astype('float32', errors='ignore')

def get_deep_y(X_deep, R, drugs_order):
    pass
<filename>data-analysis/source-python/data_utils.py<gh_stars>0
"""
This module is responsible for retrieving X and y
for deep component training.
"""
import pandas as pd
from os import path

DATA_DIR = path.abspath('data-analysis/source-python/data')


def get_deep_data(filename):
    """
    Reads drug features, returns a `panda`'s `DataFrame`:
    - X - A DataFrame of shape (#drugs, #features).
    """
    print("Reading {} from {}...".format(filename, path.basename(DATA_DIR)))
    # shape (#drugs, #categories)
    X_df = pd.read_csv(path.join(DATA_DIR, filename))

    print('Retrieved data:')
    print('X: {} drugs, {} features per drug'.format(*X_df.shape))

    return X_df.astype('float32', errors='ignore')

def get_deep_y(X_deep, R, drugs_order):
    pass
This module is responsible for retrieving X and y for deep component training. Reads drug features, returns a `panda`'s `DataFrame`:     - X - A DataFrame of shape (#drugs, #features). # shape (#drugs, #categories)