public double transProb(){
  double transProb, distance;
  if (m_Cache.containsKey(m_Test.value(m_AttrIndex))) {
    KStarCache.TableEntry te=m_Cache.getCacheValues(m_Test.value(m_AttrIndex));
    m_Scale=te.value;
    m_MissingProb=te.pmiss;
  }
 else {
    if (m_BlendMethod == B_ENTROPY) {
      m_Scale=scaleFactorUsingEntropy();
    }
 else {
      m_Scale=scaleFactorUsingBlend();
    }
    m_Cache.store(m_Test.value(m_AttrIndex),m_Scale,m_MissingProb);
  }
  if (m_Train.isMissing(m_AttrIndex)) {
    transProb=m_MissingProb;
  }
 else {
    distance=Math.abs(m_Test.value(m_AttrIndex) - m_Train.value(m_AttrIndex));
    transProb=PStar(distance,m_Scale);
  }
  return transProb;
}

public double transProb ( ) { double transProb , distance ; if ( m_Cache . containsKey ( m_Test . value ( m_AttrIndex ) ) ) { KStarCache . TableEntry te = m_Cache . getCacheValues ( m_Test . value ( m_AttrIndex ) ) ; m_Scale = te . value ; m_MissingProb = te . pmiss ; } else { if ( m_BlendMethod == B_ENTROPY ) { m_Scale = scaleFactorUsingEntropy ( ) ; } else { m_Scale = scaleFactorUsingBlend ( ) ; } m_Cache . store ( m_Test . value ( m_AttrIndex ) , m_Scale , m_MissingProb ) ; } if ( m_Train . isMissing ( m_AttrIndex ) ) { transProb = m_MissingProb ; } else { distance = Math . abs ( m_Test . value ( m_AttrIndex ) - m_Train . value ( m_AttrIndex ) ) ; transProb = PStar ( distance , m_Scale ) ; } return transProb ; }
calculates the transformation probability of the attribute indexed " m_attrindex " in test instance " m_test " to the same attribute in the train instance " m_train " .
