a correct version
This commit is contained in:
@@ -57,7 +57,7 @@ namespace xgboost{
|
||||
DMatrix(void){}
|
||||
/*! \brief get the number of instances */
|
||||
inline size_t Size() const{
|
||||
return info.labels.size();
|
||||
return data.NumRow();
|
||||
}
|
||||
/*!
|
||||
* \brief load from text file
|
||||
|
||||
@@ -110,6 +110,7 @@ namespace xgboost{
|
||||
virtual float Eval(const std::vector<float> &preds,
|
||||
const DMatrix::Info &info) const {
|
||||
const unsigned ndata = static_cast<unsigned>(preds.size());
|
||||
utils::Assert( info.weights.size() == ndata, "we need weight to evaluate ams");
|
||||
std::vector< std::pair<float, unsigned> > rec(ndata);
|
||||
|
||||
#pragma omp parallel for schedule( static )
|
||||
|
||||
Reference in New Issue
Block a user