extended binary SVM based on Kernel Matrix

extended binary SVM based on Kernel Matrix,第1张

extended binary SVM based on Kernel Matrix
"""
限制 parzen window 的大小
"""
import xlwt
import math
import numpy as np
import pandas as pd
from pathlib import Path
from sklearn.model_selection import StratifiedKFold
from collections import OrderedDict
from sklearn.svm import SVC
from scipy.special import expit
from copy import deepcopy
from scipy.spatial.distance import pdist, squareform
from sklearn.metrics import accuracy_score, mean_absolute_error, f1_score
from sklearn.preprocessing import StandardScaler
from sklearn.metrics.pairwise import rbf_kernel
from KBS_NEW.PointwiseQuery.ALOR import ALOR
from sklearn.metrics import accuracy_score

class EBSVM_Kernel():
    def __init__(self):
        self.gamma = 0.1
        self.C = 100
    def fit(self,Kernel_matrix, y, nSample, labels, nClass):
        self.KM = Kernel_matrix
        self.y = np.asarray(y, dtype=np.int)
        self.nSample = nSample
        self.Labels = labels
        self.nClass

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5491020.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-12
下一篇2022-12-12

发表评论

登录后才能评论

评论列表(0条)

    保存