Neural Network archetype in C++[6]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

   
//    if (FormattedOutput(yt[data_idx]) !=FormattedOutput(youtputpre)  )
//        cout <<" (mismatch)" ;
//    else
//        cout <<" (match)" ;
//        cout << endl;
   
    if (FormattedOutput(yt[data_idx])==FormattedOutput(youtputpre)) num+=1;
     
    } 
   
    cout <<" Done!  ( Rate of Correction : " << 100.0 * (float)num / (float)NUM_DATA << "% )\n" << endl;
   
}   
           
};    // end of class

//////////////////////////////////////////////////////////////

     
 
//////////////////////////////////////////////////////////////// 
 
 

int main( int argc, char * argv[] ){
 
  for( int number_of_patterns_4_training=0;number_of_patterns_4_training<=200 ; number_of_patterns_4_training+=20)
  {
      NeuralNet *ass2net = new NeuralNet();  
      ass2net->CreateTrainingPatterns();
      ass2net->CreateTestData();
      ass2net->Train(number_of_patterns_4_training);
//    ass2net->PrintWeights();
      ass2net->Test();
  }
}

/*-------------------------------------------------------------------------------------------

Development Notes:

This is deliberately designed to be close to the form (identifier setc) that Russell& Norvig use.  See their perceptron pseudo-code,
Neural Networks section.

本文关键:Neural Network archetype in C++
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top