from copy import deepcopy
from sklearn.metrics import accuracy_score
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from numpy.linalg import inv
from sklearn.utils.validation import check_X_y
from sklearn import preprocessing
from sklearn.base import ClassifierMixin, BaseEstimator
from sklearn.metrics.pairwise import pairwise_kernels, pairwise_distances
class KELMOR(ClassifierMixin, BaseEstimator):
def __init__(self,C=10, method="full", S=None, eps=1e-5, kernel="linear", gamma=0.1, degree=3, coef0=1, kernel_params=None):
self.kernel_params = kernel_params
self.le_ = preprocessing.LabelEncoder()
y = self.le_.transform(y)