示例#1
0
文件: models.cpp 项目: idaohang/mole
void UpdatingFileModel::finishRefill()
{
  UpdatingModel::finishRefill();
  if (dirty) {
    // note: I/O access
    saveModelToFile();
    dirty = false;
  }
}
示例#2
0
bool ThresholdDetection::saveModelToFile(string filename) const{
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
    file.close();
    
    return true;
}
示例#3
0
bool TimeDomainFeatures::saveModelToFile(const string filename) const{
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
    file.close();
    
    return true;
}
示例#4
0
bool PostProcessing::saveModelToFile(std::string filename) const{
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
    file.close();
    
    return true;
}
示例#5
0
bool MovementIndex::saveModelToFile(string filename) const {

    std::fstream file;
    file.open(filename.c_str(), std::ios::out);

    if( !saveModelToFile( file ) ) {
        return false;
    }

    file.close();

    return true;
}
示例#6
0
bool RBMQuantizer::saveModelToFile(const string filename) const{
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
    file.close();
    
    return true;
}
bool TimeseriesBuffer::saveModelToFile(string filename) const {

    std::fstream file;
    file.open(filename.c_str(), std::ios::out);

    if( !saveModelToFile( file ) ) {
        return false;
    }

    file.close();

    return true;
}
示例#8
0
bool GMM::saveModelToFile(string filename){
    
	std::fstream file; 
	file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }
    
	file.close();
    
	return true;
}
示例#9
0
文件: MinDist.cpp 项目: ios4u/grt
bool MinDist::saveModelToFile(string filename) const{

    if( !trained ) return false;
    
	std::fstream file; 
	file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }

	file.close();

	return true;
}
示例#10
0
bool LinearRegression::saveModelToFile(string filename){

    if( !trained ) return false;
    
	std::fstream file; 
	file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        return false;
    }

	file.close();

	return true;
}
示例#11
0
bool DTW::saveModelToFile( string fileName ){

    std::fstream file;

    if(!trained){
       errorLog << "saveDTWModelToFile( string fileName ) - Model not trained yet, can not save to file" << endl;
     return false;
    }

    file.open(fileName.c_str(), std::ios::out);

    if( !saveModelToFile( file ) ){
        return false;
    }

    file.close();
    return true;
}
bool DoubleMovingAverageFilter::saveModelToFile( std::string filename ) const{
    
    if( !initialized ){
        errorLog << "saveModelToFile(string filename) - The DoubleMovingAverageFilter has not been initialized" << std::endl;
        return false;
    }
    
    std::fstream file; 
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        file.close();
        return false;
    }
    
    file.close();
    
    return true;
}
示例#13
0
bool SavitzkyGolayFilter::saveModelToFile( std::string filename ) const{
    
    if( !initialized ){
        errorLog << "saveModelToFile(string filename) - The HighPassFilter has not been initialized" << std::endl;
        return false;
    }
    
    std::fstream file;
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        file.close();
        return false;
    }
    
    file.close();
    
    return true;
}
示例#14
0
bool Derivative::saveModelToFile(string filename) const{
    
    if( !initialized ){
        errorLog << "saveModelToFile(string filename) - The DeadZone has not been initialized" << endl;
        return false;
    }
    
    std::fstream file; 
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        file.close();
        return false;
    }
    
    file.close();
    
    return true;
}
示例#15
0
bool ClassLabelTimeoutFilter::saveModelToFile(string filename) const{
    
    if( !initialized ){
        errorLog << "saveModelToFile(string filename) - The ClassLabelTimeoutFilter has not been initialized" << endl;
        return false;
    }
    
    std::fstream file; 
    file.open(filename.c_str(), std::ios::out);
    
    if( !saveModelToFile( file ) ){
        file.close();
        return false;
    }
    
    file.close();
    
    return true;
}
示例#16
0
bool MLBase::save(const std::string filename) const {
    return saveModelToFile( filename );
}