Пример #1
0
    def __init__(self, ifeature=1):

        self.ifeature = ifeature  ## =0 explicit feature, =1 kernel
        self.icategory = 0  ## =0 vector =number of categories
        self.ncategory = 0  ## idf icategory=1 it is the number of categories
        self.cat2vector = 0  ## =0 indicator =1 mean 2 =median 3 =tetrahedron
        self.mdata = 0
        self.itrain = None
        self.itest = None
        self.dataraw = None
        self.data = None  ## raw input
        self.XTrain = None  ## training features
        self.XTrainNorm = None  ## normalized features
        self.XTest = None  ## test features
        self.XTestNorm = None  ## normalized features

        self.K = None  ## external training kernel
        self.Kcross = None  ## externel test kernel
        self.d1 = None  ## norm of left factor of the kernel
        self.d2 = None  ## norm of right factor of the kernel

        self.norm = cls_norm()
        self.crossval = cls_crossval()
        self.kernel_params = cls_kernel_params()
        self.prekernel_params = cls_kernel_params()

        self.ioperator_valued = 0
        self.title = None
        self.kernel_computed = 0
Пример #2
0
  def __init__(self,ifeature=0):

    self.ifeature=ifeature       ## =0 explicit feature, =1 kernel 
    self.icategory=0      ## =0 vector =number of categories
    self.ncategory=0      ## idf icategory=1 it is the number of categories
    self.cat2vector=0     ## =0 indicator =1 mean 2 =median 3 =tetrahedron
    self.mdata=0
    self.itrain=None
    self.itest=None
    self.dataraw=None
    self.data=None       ## raw input
    self.XTrain=None      ## training features 
    self.XTrainNorm=None  ## normalized features
    self.XTest=None       ## test features 
    self.XTestNorm=None   ## normalized features
    self.Y0=None          ## set of distinc feature vectors     
    self.Y0Norm=None      ## set of distinc normalizedfeature vectors     

    self.K=None           ## external training kernel
    self.Kcross=None      ## externel test kernel
    self.Kraw=None
    self.Krawcross=None
    self.d1=None       ## norm of left factor of the kernel
    self.d2=None      ## norm of right factor of the kernel

    ## self.ilocal=2
    ## self.iscale=0

    self.norm=cls_norm()
    self.crossval=cls_crossval()
    self.kernel_params=cls_kernel_params()
    self.prekernel_params=cls_kernel_params()

    self.title=None
Пример #3
0
    def __init__(self, ifeature=0):

        self.ifeature = ifeature  ## =0 explicit feature, =1 kernel
        self.icategory = 0  ## =0 vector =number of categories
        self.ncategory = 0  ## idf icategory=1 it is the number of categories
        self.cat2vector = 0  ## =0 indicator =1 mean 2 =median 3 =tetrahedron
        self.mdata = 0
        self.itrain = None
        self.itest = None
        self.dataraw = None
        self.data = None  ## raw input
        self.XTrain = None  ## training features
        self.XTrainNorm = None  ## normalized features
        self.XTest = None  ## test features
        self.XTestNorm = None  ## normalized features
        ## self.Y0=None          ## set of distinc feature vectors
        ## self.Y0Norm=None      ## set of distinc normalizedfeature vectors

        self.K = None  ## external training kernel
        self.Kcross = None  ## externel test kernel
        self.d1 = None  ## norm of left factor of the kernel
        self.d2 = None  ## norm of right factor of the kernel

        ## self.ilocal=2
        ## self.iscale=0

        self.norm = cls_norm()
        self.crossval = cls_crossval()
        self.kernel_params = cls_kernel_params()
        self.prekernel_params = None

        self.title = 'mvm_x'
        self.xbias = 0.0

        return
Пример #4
0
  def __init__(self,ifeature=0):

    self.ifeature=ifeature       ## =0 explicit feature, =1 kernel 
    self.icategory=0      ## =0 vector =number of categories
    self.ncategory=0      ## idf icategory=1 it is the number of categories
    self.cat2vector=0     ## =0 indicator =1 mean 2 =median 3 =tetrahedron
    self.mdata=0
    self.itrain=None
    self.itest=None
    self.dataraw=None
    self.data=None       ## raw input
    self.XTrain=None      ## training features 
    self.XTrainNorm=None  ## normalized features
    self.XTest=None       ## test features 
    self.XTestNorm=None   ## normalized features
    ## self.Y0=None          ## set of distinc feature vectors     
    ## self.Y0Norm=None      ## set of distinc normalizedfeature vectors     

    self.K=None           ## external training kernel
    self.Kcross=None      ## externel test kernel
    self.Kpre=None        ## prekernel can be used to build input and output
    self.d1=None       ## norm of left factor of the kernel
    self.d2=None      ## norm of right factor of the kernel

    ## self.ilocal=2
    ## self.iscale=0

    self.norm=cls_norm()
    self.crossval=cls_crossval()
    self.kernel_params=cls_kernel_params()
    self.prekernel_params=None

    self.title='mvm_y'

    self.ymax=10.0
    self.ymin=-10.0
    self.yrange=20
    self.ystep=(self.ymax-self.ymin)/self.yrange

    self.Y0Tetra=None

    self.ndim=4
    self.valrange=(0,1,2,3)
    self.classweight=np.ones((self.ndim,len(self.valrange)))