Changeset 1013 for trunk/yat/classifier
- Timestamp:
- Feb 1, 2008, 4:34:30 PM (16 years ago)
- Location:
- trunk/yat/classifier
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/NCC.h
r1007 r1013 215 215 } 216 216 } 217 trained_=true; 218 return trained_; 217 return true; 219 218 } 220 219 … … 223 222 utility::matrix& prediction) const 224 223 { 225 utility::yat_assert<std::runtime_error>(data_.rows()==test.rows()); 226 utility::yat_assert<std::runtime_error>(test.rows()==centroids_->rows()); 224 utility::yat_assert<std::runtime_error> 225 (centroids_,"NCC::predict called for untrained classifier"); 226 utility::yat_assert<std::runtime_error> 227 (data_.rows()==test.rows(), 228 "NCC::predict test data with incorrect number of rows"); 227 229 228 230 prediction.clone(utility::matrix(centroids_->columns(), test.columns())); -
trunk/yat/classifier/SVM.cc
r1009 r1013 126 126 sc->max_epochs(max_epochs()); 127 127 } 128 catch (std::bad_cast & e) {128 catch (std::bad_cast) { 129 129 std::string str = 130 130 "Error in SVM::make_classifier: DataLookup2D of unexpected class."; … … 169 169 prediction(1,i) = -prediction(0,i); 170 170 } 171 catch (std::bad_cast & e) {171 catch (std::bad_cast) { 172 172 std::string str = 173 173 "Error in SVM::predict: DataLookup2D of unexpected class.";
Note: See TracChangeset
for help on using the changeset viewer.