2014-01-05 70 views

回答

1

調查Stringtowordvector代碼,方法convertInstancewoDocNorm我認爲矩陣不存儲。

//Doing IDFTransform 
    if(m_IDFTransform==true) { 
     Iterator it = contained.keySet().iterator(); 
     for(int i=0; it.hasNext(); i++) { 
     Integer index = (Integer)it.next(); 
     if(index.intValue() >= firstCopy) { 
      double val = ((Double)contained.get(index)).doubleValue(); 
      val = val*Math.log(m_NumInstances/
      (double) m_DocsCounts[index.intValue()]); 
      contained.put(index, new Double(val)); 
     } 
     }   
    }