learn.js
function() {
    this.links.forEach(link => {
      link.labelCount.forEach((count, label) => {
        link.labelWeight.set(label, count / this.numExamples.get(label))
      })
    })
    this.weightsNeedBuilding = false
  }
function() {
    this.links.forEach(link => {
      link.labelCount.forEach((count, label) => {
        link.labelWeight.set(label, count / this.numExamples.get(label))
      })
    })
    this.weightsNeedBuilding = false
  }
function ( ) { this . links . forEach ( link => { link . labelCount . forEach ( ( count , label ) => { link . labelWeight . set ( label , count / this . numExamples . get ( label ) ) } ) } ) this . weightsNeedBuilding = false }
Build link.labelWeight.
Build link . labelWeight .