# Path: src/obsolete/read_labels.py
# def features(mode, category, split, problem_type='C', feature_scale=False, count="all", select = "select"):
#     normalize = 'normalize' if feature_scale else 'regular'
#     if problem_type == "C":
#         directory = "classify"
#     else:
#         directory = "estimate"
#     if select == "select":
#         sel = "selected_features"
#     else:
#         sel = "all_features"
#     if mode == "visual":
#         file_ = "data/"+sel+"/"+normalize+"/"+directory+"/"+split+"/"+category+"_visual_"+split+".csv"
#     elif mode == "acoustic":
#         file_ = "data/"+sel+"/"+normalize+"/"+directory+"/"+split+"/"+category+"_acoustic_"+split+".csv"
#     elif mode == "linguistic":
#         file_ = "data/"+sel+"/"+normalize+"/"+directory+"/"+split+"/"+category+"_linguistic_"+split+".csv"
#     data = pd.read_csv(file_)
#     if split == "train" and count != "all":
#         split_file = config.TRAIN_SPLIT_FILE
#         split_df = pd.read_csv(split_file,usecols=['Participant_ID'])
#         split_df = split_df.loc[:int(count)-1]
#         data = data[data['video'].isin(split_df['Participant_ID'])]
#     return get_features(data, split, problem_type)


import numpy as np
import pandas as pd
from src.obsolete.read_labels import features



def oversample(X,y):
    X = np.vstack(X)
    y = np.hstack(y)
    df = pd.DataFrame(X)
    df['labels'] = y
    grouped_df = df.groupby('labels')
    for key, dframe in grouped_df:

# Path: src/obsolete/read_labels.py
# def features(mode, category, split, problem_type='C', feature_scale=False, count="all", select = "select"):
#     normalize = 'normalize' if feature_scale else 'regular'
#     if problem_type == "C":
#         directory = "classify"
#     else:
#         directory = "estimate"
#     if select == "select":
#         sel = "selected_features"
#     else:
#         sel = "all_features"
#     if mode == "visual":
#         file_ = "data/"+sel+"/"+normalize+"/"+directory+"/"+split+"/"+category+"_visual_"+split+".csv"
#     elif mode == "acoustic":
#         file_ = "data/"+sel+"/"+normalize+"/"+directory+"/"+split+"/"+category+"_acoustic_"+split+".csv"
#     elif mode == "linguistic":
#         file_ = "data/"+sel+"/"+normalize+"/"+directory+"/"+split+"/"+category+"_linguistic_"+split+".csv"
#     data = pd.read_csv(file_)
#     if split == "train" and count != "all":
#         split_file = config.TRAIN_SPLIT_FILE
#         split_df = pd.read_csv(split_file,usecols=['Participant_ID'])
#         split_df = split_df.loc[:int(count)-1]
#         data = data[data['video'].isin(split_df['Participant_ID'])]
#     return get_features(data, split, problem_type)


# Path: src/obsolete/utils.py
import numpy as np
import pandas as pd
from src.obsolete.read_labels import features




def oversample(X,y):
    X = np.vstack(X)
    y = np.hstack(y)
    df = pd.DataFrame(X)
    df['labels'] = y
    grouped_df = df.groupby('labels')
    for key, dframe in grouped_df:

        if key == 1: