add accuracy

This commit is contained in:
tqchen
2014-03-11 13:06:22 -07:00
parent 19b28b978d
commit 6e48a938c6
3 changed files with 19 additions and 6 deletions

View File

@@ -159,7 +159,7 @@ namespace xgboost{
int buffer_offset = static_cast<int>( train_->Size() );
for( size_t i = 0; i < evals_.size(); ++i ){
std::vector<float> &preds = this->eval_preds_[ i ];
std::vector<float> &preds = this->eval_preds_[ i ];
this->PredictBuffer( preds, *evals_[i], buffer_offset);
evaluator_.Eval( fo, evname_[i].c_str(), preds, (*evals_[i]).labels );
buffer_offset += static_cast<int>( evals_[i]->Size() );

View File

@@ -40,12 +40,13 @@ namespace xgboost{
return 0;
}
if( task == "interact" ){
this->TaskInteractive();
return 0;
this->TaskInteractive(); return 0;
}
if( task == "dumppath" ){
this->TaskDumpPath();
return 0;
this->TaskDumpPath(); return 0;
}
if( task == "eval" ){
this->TaskEval(); return 0;
}
if( task == "pred" ){
this->TaskPred();
@@ -160,7 +161,9 @@ namespace xgboost{
printf("\nupdating end, %lu sec in all\n", elapsed );
}
}
inline void TaskEval( void ){
learner.EvalOneIter( 0 );
}
inline void TaskInteractive( void ){
const time_t start = time( NULL );
unsigned long elapsed = 0;