alf = 'abc' %M = null_dfsa(alf); good = 1; %[X1,Y] = reglang_posneg_sparse(M,40,1000); %[X2,Y] = reglang_posneg_dense(0,10,M); %[X2,Y] = reglang_posneg_dense(0,9,M); while good if 0 %M = randpt('ab',0,5,1,6); M = randpt('ab',0,3,1,4); [X1,Y] = reglang_posneg_sparse(M,30,1000); Xt = [X1(:);X2(:)]; bb = run_dfsa_cell(M,Xt); Yt = 2*bb-1; [X,Y,alpha] = pt_scratch(M); y_hat = compute_yhat_c(X,Xt,alpha,0,@ptker2); good = (totdif(y_hat,Yt)==0) end if 0 [Xt,Yt] = reglang_posneg_sparse(M,6,15); %[Xt,Yt] = reglang_posneg_dense(0,3,M); %good = shattersample(Xt) good = shattersample_crude(Xt) end if 1 [Xt,Yt] = reglang_posneg_sparse(M,30,1); fprintf(' x = %s\n',Xt{1}); y_hat = compute_yhat_c(Xii,Xt,aa,b0,@ptkermx); good = (y_hat==Yt); if ~good save PTFAIL Xt keyboard end end end