@Override public void endOfStream() throws AdeException {
  for (  MsgData data : m_msgData.values()) {
    if (data.m_totalLogCounts > 0) {
      data.m_lambda=data.m_totalLogCounts / data.m_intervalCount;
      m_minLambda=Math.min(data.m_lambda,m_minLambda);
      if (locateMismatchingDistributions(data)) {
        data.m_badFit=true;
      }
    }
  }
  m_trained=true;
}

@ Override public void endOfStream ( ) throws AdeException { for ( MsgData data : m_msgData . values ( ) ) { if ( data . m_totalLogCounts > 0 ) { data . m_lambda = data . m_totalLogCounts / data . m_intervalCount ; m_minLambda = Math . min ( data . m_lambda , m_minLambda ) ; if ( locateMismatchingDistributions ( data ) ) { data . m_badFit = true ; } } } m_trained = true ; }
at the end of the stream , for all the message data we ' ve collected , we calculate the lamba value and determine if the message data is a " bad fit " i . e . the log probability is greater than or equal to some threshold .
