SPIDER The Spider Objects
TRANS_MARG template object A=TRANS_MARG(H) returns a trans_marg object initializedwith hyperparameters H.This algorithm iteratively trains a (possible conditional probabilityestimating, or at least real-valued output giving) algorithm I,adding examples from an unlabeled set if they have asufficiently large threshold.Hyperparameters, and their defaultstpos=0.9 -- positive threshold, i.e unlabeled pts with outputgreater than this will become positive examplestneg=0.1 -- negative threshold, i.e unlabeled pts with outputless than this will become negative examplestboth=0; -- if nonzero, uses this instead oftneg,tpos to define tneg=tboth; tpos=1-tboth;tmarg=0; -- if nonzero, uses this instead oftneg,tpos to define tneg=-1+tmarg; tpos=1-tmarg;max_iter=100 -- maximum iterations (stops anyway ifthere is no unlabeled points added).Modelchild=platt -- child algorithm, default is an svm withconditional probability estimation (platt)class_alg=[] -- algorithm for final classification, if class_alg=[]then use same as the base/child algorithmdat -- training dataMethods:train, testExample:get_mean(train(cv({trans_marg('tboth=0.1') svm}),gen(toy('seed=1'))))get_mean(train(cv({trans_marg(svm,'tmarg=0.1'),svm}),gen(toy('seed=1'))))a1=trans_marg(svm); a2=param(a1,'tmarg',[0 0.05 0.1 0.2 0.3]);a3=gridsel(a2); get_mean(train(cv({a2 a3 svm}),gen(toy('seed=1'))))