# Path: antispoofing/spectralcubes/utils/constants.py
# N_JOBS = (cpu_count()/2) if ((cpu_count()) > 2) else 1


import os
import sys
import cPickle
import numpy as np
from sklearn.cluster import KMeans
from sklearn.cluster.k_means_ import _init_centroids
from sklearn.metrics.pairwise import chi2_kernel
from sklearn.metrics.pairwise import pairwise_distances
from antispoofing.spectralcubes.utils import N_JOBS
# -*- coding: utf-8 -*-





class MidLevelFeatures(object):
    cs_dict = {"random": 0, "kmeans": 1}
    cp_dict = ["hardsum", "hardmax", "softmax"]
    sdd_dict = {"unified": 0, "class_based": 1}
    seed = 42
    debug = True

    def __init__(self, meta, input_path, output_path,
                 codebook_path=None,
                 codebook_selection="random",
                 codebook_build="unified",
                 codebook_size=80,
                 coding_poling="hardsum",
                 file_type="npy",

# Path: antispoofing/spectralcubes/utils/constants.py
# N_JOBS = (cpu_count()/2) if ((cpu_count()) > 2) else 1


# Path: antispoofing/spectralcubes/midlevelfeatures/midlevelfeatures.py
import os
import sys
import cPickle
import numpy as np
from sklearn.cluster import KMeans
from sklearn.cluster.k_means_ import _init_centroids
from sklearn.metrics.pairwise import chi2_kernel
from sklearn.metrics.pairwise import pairwise_distances
from antispoofing.spectralcubes.utils import N_JOBS

# -*- coding: utf-8 -*-





class MidLevelFeatures(object):
    cs_dict = {"random": 0, "kmeans": 1}
    cp_dict = ["hardsum", "hardmax", "softmax"]
    sdd_dict = {"unified": 0, "class_based": 1}
    seed = 42
    debug = True

    def __init__(self, meta, input_path, output_path,
                 codebook_path=None,
                 codebook_selection="random",
                 codebook_build="unified",
                 codebook_size=80,
                 coding_poling="hardsum",
                 file_type="npy",

                 n_jobs=N_JOBS):