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
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
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
def copy(self, data=None): new_obj = cls_feature(self.ifeature) new_obj.title = self.title new_obj.kernel_params = cls_kernel_params() new_obj.kernel_params.kernel_type = self.kernel_params.kernel_type new_obj.kernel_params.ipar1 = self.kernel_params.ipar1 new_obj.kernel_params.ipar2 = self.kernel_params.ipar2 if self.prekernel_params is not None: new_obj.prekernel_params = self.prekernel_params new_obj.crossval = self.crossval new_obj.norm = self.norm new_obj.xbias = self.xbias return (new_obj)
def copy(self,data=None): new_obj=cls_feature(self.ifeature) new_obj.title=self.title new_obj.kernel_params=cls_kernel_params() new_obj.kernel_params.kernel_type=self.kernel_params.kernel_type new_obj.kernel_params.ipar1=self.kernel_params.ipar1 new_obj.kernel_params.ipar2=self.kernel_params.ipar2 if self.prekernel_params is not None: new_obj.prekernel_params=self.prekernel_params new_obj.crossval=self.crossval new_obj.norm=self.norm new_obj.xbias=self.xbias return(new_obj)
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)))
def copy(self,data=None): new_obj=cls_feature(self.ifeature) new_obj.title=self.title new_obj.kernel_params=cls_kernel_params() new_obj.kernel_params.kernel_type=self.kernel_params.kernel_type new_obj.kernel_params.ipar1=self.kernel_params.ipar1 new_obj.kernel_params.ipar2=self.kernel_params.ipar2 if self.prekernel_params is not None: new_obj.prekernel_params=self.prekernel_params new_obj.crossval=self.crossval new_obj.norm=self.norm new_obj.ndim=self.ndim new_obj.valrange=self.valrange new_obj.classweight=self.classweight new_obj.ymax=self.ymax new_obj.ymin=self.ymin new_obj.ystep=self.ystep new_obj.yrange=self.yrange return(new_obj)