# Path: src/obsolete/read_labels.py
# def get_features(data, split, classifier_type="C"):
# def features(mode, category, split, problem_type='C', feature_scale=False, count="all", select = "select"):
#     X = []


import os
import numpy as np
import src.main.config
import src.obsolete.utils
from sklearn.externals import joblib
from src.obsolete import read_labels
    if category == "PN":
        cat_1 = "positive"
        cat_2 = "negative"
    if mode == "late_fusion":
        X_test = [    [   map(np.asarray, read_labels.features("acoustic", cat_1, "test", problem_type, normalize)),
                      map(np.asarray, read_labels.features("acoustic", cat_2, "test", problem_type, normalize))
                  ],
                  [   map(np.asarray, read_labels.features("visual", cat_1, "test", problem_type, normalize)),
                      map(np.asarray, read_labels.features("visual", cat_2, "test", problem_type, normalize))
                  ],
                  [   map(np.asarray, read_labels.features("linguistic", cat_1, "test", problem_type, normalize)),
                      map(np.asarray, read_labels.features("linguistic", cat_2, "test", problem_type, normalize))
                  ]
              ]
    else:

        X_test = [map(np.asarray, read_labels.features(mode, cat_1, "test", problem_type, normalize)),
                  map(np.asarray, read_labels.features(mode, cat_2, "test", problem_type, normalize))]

    clf = joblib.load(os.path.join(src.main.config.GRID_SEARCH_CLF_DIR, mode + '_pickle' + category + '.pkl'))
    preds_label = clf.predict(X_test)
    return preds_label

def main():
    print "acoustic"
    print final_classifier("acoustic")
    print "visual"
    print final_classifier("visual")
    print "linguistic"
    print final_classifier("linguistic")

# Path: src/obsolete/read_labels.py
# def get_features(data, split, classifier_type="C"):
# def features(mode, category, split, problem_type='C', feature_scale=False, count="all", select = "select"):
#     X = []


# Path: src/obsolete/get_prediction_labels.py
import os
import numpy as np
import src.main.config
import src.obsolete.utils
from sklearn.externals import joblib
from src.obsolete import read_labels

    if category == "PN":
        cat_1 = "positive"
        cat_2 = "negative"
    if mode == "late_fusion":
        X_test = [    [   map(np.asarray, read_labels.features("acoustic", cat_1, "test", problem_type, normalize)),
                      map(np.asarray, read_labels.features("acoustic", cat_2, "test", problem_type, normalize))
                  ],
                  [   map(np.asarray, read_labels.features("visual", cat_1, "test", problem_type, normalize)),
                      map(np.asarray, read_labels.features("visual", cat_2, "test", problem_type, normalize))
                  ],
                  [   map(np.asarray, read_labels.features("linguistic", cat_1, "test", problem_type, normalize)),
                      map(np.asarray, read_labels.features("linguistic", cat_2, "test", problem_type, normalize))
                  ]
              ]
    else:

        X_test = [map(np.asarray, read_labels.features(mode, cat_1, "test", problem_type, normalize)),
                  map(np.asarray, read_labels.features(mode, cat_2, "test", problem_type, normalize))]

    clf = joblib.load(os.path.join(src.main.config.GRID_SEARCH_CLF_DIR, mode + '_pickle' + category + '.pkl'))
    preds_label = clf.predict(X_test)
    return preds_label

def main():
    print "acoustic"
    print final_classifier("acoustic")
    print "visual"
    print final_classifier("visual")
    print "linguistic"
    print final_classifier("linguistic")

    print "late_fusion"