MCPcopy
hub / github.com/jindongwang/transferlearning / fit_predict

Method fit_predict

code/traditional/sot/SOT.py:191–202  ·  view source on GitHub ↗
(self, Sx, Sy, Tx, Ty,sfilepath,sourcename,tfilepath,tmodelpath,targetname)

Source from the content-addressed store, hash-verified

189 return Cls2[index]
190
191 def fit_predict(self, Sx, Sy, Tx, Ty,sfilepath,sourcename,tfilepath,tmodelpath,targetname):
192 gmm_source(Sx,Sy,sfilepath,sourcename)
193 self.get_source(sfilepath,sourcename)
194 gmm_target(Tx,1,self.d,self.root_dir,tfilepath,tmodelpath,targetname)
195 self.get_target(tfilepath,tmodelpath,targetname)
196 ss1 = self.diag_s
197 tt1 = self.diag_t
198 xns,yns=ss1['xn1'],ss1['yns']
199 xntmu,xnt=tt1['xntmu'],tt1['xnt1']
200 pred= self.partot_DA(xns,yns,xnt,xntmu,Tx,ttt=2)
201 acc= np.mean(Ty==pred)
202 return pred,acc
203

Callers 1

main.pyFile · 0.45

Calls 6

get_sourceMethod · 0.95
get_targetMethod · 0.95
partot_DAMethod · 0.95
gmm_sourceFunction · 0.85
gmm_targetFunction · 0.85
meanMethod · 0.45

Tested by

no test coverage detected