chg fmap format
This commit is contained in:
parent
ea354683b4
commit
7a79c009ce
@ -166,6 +166,7 @@ namespace xgboost{
|
|||||||
buffer_offset += static_cast<int>(evals_[i]->Size());
|
buffer_offset += static_cast<int>(evals_[i]->Size());
|
||||||
}
|
}
|
||||||
fprintf(fo, "\n");
|
fprintf(fo, "\n");
|
||||||
|
fflush(fo);
|
||||||
}
|
}
|
||||||
/*! \brief get prediction, without buffering */
|
/*! \brief get prediction, without buffering */
|
||||||
inline void Predict(std::vector<float> &preds, const DMatrix &data){
|
inline void Predict(std::vector<float> &preds, const DMatrix &data){
|
||||||
|
|||||||
@ -156,7 +156,7 @@ namespace xgboost{
|
|||||||
elapsed = (unsigned long)(time(NULL) - start);
|
elapsed = (unsigned long)(time(NULL) - start);
|
||||||
}
|
}
|
||||||
// always save final round
|
// always save final round
|
||||||
if (save_period == 0 || num_round % save_period != 0){
|
if ((save_period == 0 || num_round % save_period != 0) && model_out != "NONE"){
|
||||||
if (model_out == "NULL"){
|
if (model_out == "NULL"){
|
||||||
this->SaveModel(num_round - 1);
|
this->SaveModel(num_round - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ namespace xgboost{
|
|||||||
inline void LoadText(FILE *fi){
|
inline void LoadText(FILE *fi){
|
||||||
int fid;
|
int fid;
|
||||||
char fname[256], ftype[256];
|
char fname[256], ftype[256];
|
||||||
while (fscanf(fi, "%d%s%s", &fid, fname, ftype) == 3){
|
while (fscanf(fi, "%d\t%[^\t]\t%s\n", &fid, fname, ftype) == 3){
|
||||||
utils::Assert(fid == (int)names_.size(), "invalid fmap format");
|
utils::Assert(fid == (int)names_.size(), "invalid fmap format");
|
||||||
names_.push_back(std::string(fname));
|
names_.push_back(std::string(fname));
|
||||||
types_.push_back(GetType(ftype));
|
types_.push_back(GetType(ftype));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user