change input data structure
This commit is contained in:
@@ -117,8 +117,7 @@ namespace xgboost{
|
||||
this->GetGradient( preds, train_->labels, grad, hess );
|
||||
|
||||
std::vector<unsigned> root_index;
|
||||
booster::FMatrixS::Image train_image( train_->data );
|
||||
base_model.DoBoost(grad,hess,train_image,root_index);
|
||||
base_model.DoBoost(grad,hess,train_->data,root_index);
|
||||
}
|
||||
/*!
|
||||
* \brief evaluate the model for specific iteration
|
||||
|
||||
@@ -132,8 +132,8 @@ namespace xgboost{
|
||||
for( size_t i = 0; i < data.NumRow(); i ++ ){
|
||||
booster::FMatrixS::Line sp = data[i];
|
||||
for( unsigned j = 0; j < sp.len; j ++ ){
|
||||
if( num_feature <= sp.findex[j] ){
|
||||
num_feature = sp.findex[j] + 1;
|
||||
if( num_feature <= sp[j].findex ){
|
||||
num_feature = sp[j].findex + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user