コード例 #1
0
ファイル: SkewGenerator.cpp プロジェクト: biocyberman/TS
void BasicSkewGenerator::UpdateSkewGenerator(ShortStack &total_theory) {
  // put everything to null
  ResetUpdate();

  //for (unsigned int i_read=0; i_read<total_theory.my_hypotheses.size(); i_read++){
  for (unsigned int i_ndx = 0; i_ndx < total_theory.valid_indexes.size(); i_ndx++) {
    unsigned int i_read = total_theory.valid_indexes[i_ndx];
    AddCrossUpdate(total_theory.my_hypotheses[i_read]);
  }
  DoLatentUpdate();  // new latent predictors for sigma
}
コード例 #2
0
ファイル: BiasGenerator.cpp プロジェクト: Rashesh7/TS
// important: residuals need to be reset before this operation
void BasicBiasGenerator::UpdateBiasGenerator(ShortStack &my_theory) {
  ResetUpdate();

  //for (unsigned int i_read=0; i_read<total_theory.my_hypotheses.size(); i_read++){
  for (unsigned int i_ndx = 0; i_ndx < my_theory.valid_indexes.size(); i_ndx++) {
    unsigned int i_read = my_theory.valid_indexes[i_ndx];
    AddCrossUpdate(my_theory.my_hypotheses[i_read]);
  }
  DoUpdate();  // new bias estimated
  //cout << "Bias " << bias_generator.latent_bias[0] << "\t" << bias_generator.latent_bias[1] << endl;
}
コード例 #3
0
// important: residuals do not need to be reset before this operation (predictions have been corrected for bias already)
void BasicSigmaGenerator::UpdateSigmaGenerator(ShortStack &total_theory) {
// put everything to null
  ResetUpdate();

//  float k_zero = 1.0f;

  for (unsigned int i_ndx = 0; i_ndx < total_theory.valid_indexes.size(); i_ndx++) {
    unsigned int i_read = total_theory.valid_indexes[i_ndx];
    AddCrossUpdate(total_theory.my_hypotheses[i_read]);
   }
  // now that I've established basic weight, I can update
  for (unsigned int i_ndx = 0; i_ndx < total_theory.valid_indexes.size(); i_ndx++) {
    unsigned int i_read = total_theory.valid_indexes[i_ndx];
    // additional variability from cluster shifting
      // bayesian multidimensional normal
      AddShiftCrossUpdate(total_theory.my_hypotheses[i_read], k_zero);
  }

  DoLatentUpdate();  // new latent predictors for sigma
}