Lines Matching refs:fs
161 void CvForestTree::read( CvFileStorage* fs, CvFileNode* fnode, CvRTrees* _forest, CvDTreeTrainData* _data )
163 CvDTree::read( fs, fnode, _data );
578 void CvRTrees::write( CvFileStorage* fs, const char* name )
589 cvStartWriteStruct( fs, name, CV_NODE_MAP, CV_TYPE_NAME_ML_RTREES );
591 cvWriteInt( fs, "nclasses", nclasses );
592 cvWriteInt( fs, "nsamples", nsamples );
593 cvWriteInt( fs, "nactive_vars", (int)cvSum(active_var_mask).val[0] );
594 cvWriteReal( fs, "oob_error", oob_error );
597 cvWrite( fs, "var_importance", var_importance );
599 cvWriteInt( fs, "ntrees", ntrees );
601 CV_CALL(data->write_params( fs ));
603 cvStartWriteStruct( fs, "trees", CV_NODE_SEQ );
607 cvStartWriteStruct( fs, 0, CV_NODE_MAP );
608 CV_CALL( trees[k]->write( fs ));
609 cvEndWriteStruct( fs );
612 cvEndWriteStruct( fs ); //trees
613 cvEndWriteStruct( fs ); //CV_TYPE_NAME_ML_RTREES
619 void CvRTrees::read( CvFileStorage* fs, CvFileNode* fnode )
631 nclasses = cvReadIntByName( fs, fnode, "nclasses", -1 );
632 nsamples = cvReadIntByName( fs, fnode, "nsamples" );
633 nactive_vars = cvReadIntByName( fs, fnode, "nactive_vars", -1 );
634 oob_error = cvReadRealByName(fs, fnode, "oob_error", -1 );
635 ntrees = cvReadIntByName( fs, fnode, "ntrees", -1 );
637 var_importance = (CvMat*)cvReadByName( fs, fnode, "var_importance" );
649 data->read_params( fs, fnode );
652 trees_fnode = cvGetFileNodeByName( fs, fnode, "trees" );
664 CV_CALL(trees[k]->read( fs, (CvFileNode*)reader.ptr, this, data ));