I在运行程序时遇到以下问题,我觉得应该是函数的收敛上有问题,但我确实不知道具体哪里出了错误。大家有遇到过这种类似的情况吗?应该怎样解决呢?谢谢大家!
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS statement to restrict the feasible region.
NOTE: FCONV convergence criterion satisfied.
NOTE: At least one element of the (projected) gradient is greater than 1e-3.
Do you know why and how to debug the program?
The whole log file showed as below:
554 proc iml;
NOTE: IML Ready
555 use dataset3;
556 read all into data;
557 show names;
558 print data;
559 start maxFunc(W) global(data) ;
560 sum=0;
561 Vh=J(1,2,0);
562 do i=1 to 100;
563 Vh[1]=W[1]*data[i,1]+W[2]*data[i,3]+W[3]*data[i,5];
564 Vh[2]=W[1]*data[i,2]+W[2]*data[i,4]+W[3]*data[i,6];
565 /*prob1no=1-prob1tvb-prob1atv;
566 prob2no=1-prob2tvb-prob2atv;
567 prob3no=1-prob31tvb-prob3atv;*/
568 sum=sum+(log(1-data[i,10]*data[i,11]*data[i,12])-Vh[1]-Vh[2])*(data[i,7]+data[i,8])
569 +Vh[1]*data[i,7]+Vh[2]*data[i,8]+(log(data[i,10])+log(data[i,11])+log(data[i,12]))*data[i,9];
570 end;
571 return(sum);
572 finish maxFunc;
NOTE: Module MAXFUNC defined.
573
574 optn={1 2};
575 X=J(1,3,1);
576 call nlpcg(rc,xres,"maxFunc",X,optn);
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: The function f(x) seems to be increasing without limit in direction x + alfa s. You can use the BOUNDS
statement to restrict the feasible region.
NOTE: FCONV convergence criterion satisfied.
NOTE: At least one element of the (projected) gradient is greater than 1e-3.
577
578 run;
NOTE: Module MAIN is undefined in IML; cannot be RUN.
579 quit;
NOTE: Exiting IML.
NOTE: 187 workspace compresses.
NOTE: “PROCEDURE IML”所用时间(总处理时间):
实际时间 1.06 秒
CPU 时间 1.04 秒