C Kazutoshi Ichikawa, University of Cambridge
C 22 April 1996
C
C Program for getting values of Log likelyfood; G(w).
C
C ***********************************************************************
C
      implicit real*8(a-h,k-z), integer(i,j)
      double precision TARGET(200),MO(200),GI(200)     

C IROWTS is the row number where the test data set begins.
C IROWTE is the total number of the row.
C MODELMAX is a maxium number of the models for the committee.
C
C OUT(MODEL No., Row No.)
C MO(MODEL No., Row No.)
C


     

      OPEN(12,FILE='moef2/mo1',STATUS='OLD')
      DO 1001 I=1,154


       READ(12,*) MO(I) 
1001    CONTINUE
     

      OPEN(10,FILE='hc5.t',STATUS='OLD')
      DO 1000 I=1,154
       READ(10,*) TARGET(I)
1000  CONTINUE


       SUM=0
        DO 1 I=78,154
       IF (TARGET(I) .EQ. 0) THEN
        GI(I)=DLOG(1.000000-MO(I))
       ELSE

      
        GI(I)=DLOG(MO(I))
       ENDIF

       SUM=SUM+GI(I)
1      CONTINUE

       WRITE(*,*) SUM

      STOP
      END
