fix text
This commit is contained in:
parent
ae5c26daf6
commit
1479adba58
@ -48,6 +48,7 @@ namespace xgboost{
|
|||||||
* \brief move to next position
|
* \brief move to next position
|
||||||
* \return whether there is element in next position
|
* \return whether there is element in next position
|
||||||
*/
|
*/
|
||||||
|
|
||||||
inline bool Next( void );
|
inline bool Next( void );
|
||||||
/*! \return feature index in current position */
|
/*! \return feature index in current position */
|
||||||
inline bst_uint findex( void ) const;
|
inline bst_uint findex( void ) const;
|
||||||
@ -315,16 +316,15 @@ namespace xgboost{
|
|||||||
while( fscanf( fi, "%d", &ninst ) == 1 ){
|
while( fscanf( fi, "%d", &ninst ) == 1 ){
|
||||||
std::vector<booster::bst_uint> findex;
|
std::vector<booster::bst_uint> findex;
|
||||||
std::vector<booster::bst_float> fvalue;
|
std::vector<booster::bst_float> fvalue;
|
||||||
while( -- ninst ){
|
while( ninst -- ){
|
||||||
unsigned index; float value;
|
unsigned index; float value;
|
||||||
utils::Assert( fscanf( fi, "%u:%f", &index, &value ) == 2 );
|
utils::Assert( fscanf( fi, "%u:%f", &index, &value ) == 2, "load Text" );
|
||||||
findex.push_back( index ); fvalue.push_back( value );
|
findex.push_back( index ); fvalue.push_back( value );
|
||||||
}
|
}
|
||||||
this->AddRow( findex, fvalue );
|
this->AddRow( findex, fvalue );
|
||||||
}
|
}
|
||||||
// initialize column support as well
|
// initialize column support as well
|
||||||
this->InitData();
|
this->InitData();
|
||||||
fclose(fi);
|
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user