Example #1
0
void UpdatingFileModel::finishRefill()
{
  UpdatingModel::finishRefill();
  if (dirty) {
    // note: I/O access
    saveModelToFile();
    dirty = false;
  }
}
Example #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;
}
Example #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;
}
Example #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;
}
Example #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;
}
Example #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;
}
Example #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;
}
Example #9
0
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;
}
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;
}
Example #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;
}
Example #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;
}
Example #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;
}
Example #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;
}
Example #16
0
bool MLBase::save(const std::string filename) const {
    return saveModelToFile( filename );
}