# Path: src/models/classifier.py
# class MetaClassifier(BaseEstimator, ClassifierMixin):
# class LateFusionClassifier(BaseEstimator, ClassifierMixin):
#     def __init__(self, classifiers, vote='probability',
#                 weights=None, method='majority_voting'):
#     def fit(self, X_list, y_list, nested=True):
#     def predict(self, X_list):
#     def predict_proba(self, X_list, get_all=False):
#     def score(self, Xs, y_true, scoring='f1'):
#     def __init__(self,classifiers,vote='classlabel',weights=None):
#     def fit(self,Xs,ys):
#     def predict(self,Xs):
#     def predict_proba(self, Xs, get_all=False):
#     def score(self,Xs,y_true,scoring='f1'):


import numpy as np
import src.main.config
import src.obsolete.utils
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeClassifier
from src.models import classifier


X_train, y_train, X_val, y_val = src.obsolete.utils.get_single_mode_data(mode="acoustic", normalize='normalize')
y_true = map(int, map(np.mean, y_val[0]))
clf1 = DecisionTreeClassifier(class_weight={1:3},max_features = 13,min_samples_leaf=5, max_depth=5)
clf2 = LogisticRegression(C=1.0, class_weight={1: 3}, penalty='l1')
meta_clf = classifier.MetaClassifier(classifiers=[clf1,clf2], weights=[0.7,0.3])
meta_clf.fit(X_train, y_train)

# Path: src/models/classifier.py
# class MetaClassifier(BaseEstimator, ClassifierMixin):
# class LateFusionClassifier(BaseEstimator, ClassifierMixin):
#     def __init__(self, classifiers, vote='probability',
#                 weights=None, method='majority_voting'):
#     def fit(self, X_list, y_list, nested=True):
#     def predict(self, X_list):
#     def predict_proba(self, X_list, get_all=False):
#     def score(self, Xs, y_true, scoring='f1'):
#     def __init__(self,classifiers,vote='classlabel',weights=None):
#     def fit(self,Xs,ys):
#     def predict(self,Xs):
#     def predict_proba(self, Xs, get_all=False):
#     def score(self,Xs,y_true,scoring='f1'):


# Path: src/obsolete/test.py
import numpy as np
import src.main.config
import src.obsolete.utils
from sklearn.linear_model import LogisticRegression
from sklearn.tree import DecisionTreeClassifier
from src.models import classifier



X_train, y_train, X_val, y_val = src.obsolete.utils.get_single_mode_data(mode="acoustic", normalize='normalize')
y_true = map(int, map(np.mean, y_val[0]))
clf1 = DecisionTreeClassifier(class_weight={1:3},max_features = 13,min_samples_leaf=5, max_depth=5)
clf2 = LogisticRegression(C=1.0, class_weight={1: 3}, penalty='l1')
meta_clf = classifier.MetaClassifier(classifiers=[clf1,clf2], weights=[0.7,0.3])
meta_clf.fit(X_train, y_train)

f1_score = meta_clf.score(X_val, y_true)