function constescript(MM,SEP) % fileter MM -- only test the ones we're unsure of MM1 = []; SEP1 = []; for i=1:length(MM) s = SEP(i); if length(s.U) >= 9 MM1 = [MM1;MM(i)]; SEP1 = [SEP1;s]; end end MM=MM1; SEP=SEP1; MMU = {}; for i=1:length(MM) MMU{i} = getmu(SEP(i).U,MM(i).ALF); end while 1 for i=1:length(MM) fprintf('sparse testing %d of %d \n',i,length(MM)); M = MM(i); S = SEP(i); MU = MMU{i}; test_mw(M,S.U,MU,S.w,1000,.1); end end return function test_mw(M,U,MU,w,TT,lam) X0 = simple_paths(M); RR = {}; for i=1:length(X0) RR{i} = spath2cell(M,X0{i}); end PROGstart(TT); for t=1:TT for i=1:length(X0) x = sample_from_sp(RR{i},lam); y = b2y(run_dfsa(M,x)); %fprintf('x = %s\n',x); %fprintf('x = %s; y = %d\n',x,y); %y_hat = compute_yhat_c(Xii,{x},aa,b0,@ptkermx); y_hat = eval_muw(MU,w,x); if y~=y_hat %fprintf('got x = [%s] wrong\n',x); 'COUNTEREXAMPLE!!!!!!!' save COUNTERX M U MU w x keyboard end end PROGupdate(t); end PROGend; return