| … | … | @@ -35,7 +35,7 @@ |
| 35 | 35 | 'right-dim -- The number of columns |
| 36 | 36 | 'num-pairs -- The number of non-zero entries |
| 37 | 37 | 'total-count -- Total number of observations on all pairs |
| 38 | | (Identical to the 'wild-wild-count on the |
| 38 | (Identical to the 'total-sum-left on the |
| 39 | 39 | support-api object) |
| 40 | 40 | |
| 41 | 41 | 'left-entropy -- The sum H_left = -sum_y P(*,y) log_2 P(*,y) |
| … | … | @@ -220,7 +220,7 @@ |
| 220 | 220 | (cog-value-ref (cog-value wild-atom r-norm-key) 3)) |
| 221 | 221 | |
| 222 | 222 | ; ---------------------------------------------------- |
| 223 | | (define (get-total-count) (supobj 'wild-wild-count)) |
| 223 | (define (get-total-count) (supobj 'total-sum-left)) |
| 224 | 224 | |
| 225 | 225 | ;------------------------------------------- |
| 226 | 226 | |
| … | … | @@ -339,10 +339,7 @@ |
| 339 | 339 | 0.0 |
| 340 | 340 | (wild-obj 'left-basis))) |
| 341 | 341 | |
| 342 | | ; TODO - some future day, use 'total-count-right |
| 343 | | ; For now, too many existing datasets don't store this value. |
| 344 | | ; (define total (len-obj 'total-count-right)) |
| 345 | | (define total (len-obj 'wild-wild-count)) |
| 342 | (define total (len-obj 'total-sum-right)) |
| 346 | 343 | |
| 347 | 344 | (/ weighted-avg total)) |
| 348 | 345 | |
| … | … | @@ -364,10 +361,7 @@ |
| 364 | 361 | 0.0 |
| 365 | 362 | (wild-obj 'right-basis))) |
| 366 | 363 | |
| 367 | | ; TODO - some future day, use 'total-count-left |
| 368 | | ; For now, too many existing datasets don't store this value. |
| 369 | | ; (define total (len-obj 'total-count-left)) |
| 370 | | (define total (len-obj 'wild-wild-count)) |
| 364 | (define total (len-obj 'total-sum-left)) |
| 371 | 365 | |
| 372 | 366 | (/ weighted-avg total)) |
| 373 | 367 | |
| … | … | @@ -659,7 +653,7 @@ |
| 659 | 653 | (format PORT "Error: left and right total pairs not equal! ~A ~A\n" |
| 660 | 654 | lsize rsize)) |
| 661 | 655 | |
| 662 | | ; lobs should equal robs should equal (sup-obj 'wild-wild-count) |
| 656 | ; lobs should equal robs should equal (sup-obj 'total-sum-left) |
| 663 | 657 | (if (not (equal? nlobs nrobs)) |
| 664 | 658 | (format PORT "Error: left and right total counts not equal! ~A ~A\n" |
| 665 | 659 | lobs robs)) |