ESP  0.1
The Example-based Sensor Predictions (ESP) system tries to bring machine learning to the maker community.
TrainingSampleCheckerResult Class Reference

TrainingSampleCheckerResult indicates the result of a check of a training sample. More...

#include <training.h>

Public Types

enum  Result { SUCCESS, WARNING, FAILURE }
 

Public Member Functions

 TrainingSampleCheckerResult (Result result)
 
 TrainingSampleCheckerResult (Result result, string message)
 
Result getResult () const
 
string getMessage () const
 

Detailed Description

TrainingSampleCheckerResult indicates the result of a check of a training sample.

There are three supported result: SUCCESS, WARNING, FAILURE. An optional string description can be supplied to better assist user figuring out why the training sample fails. This class is used as the return value for the functions passed to useTrainingSampleChecker().

You can create a TrainingSampleCheckerResult like this:

return TrainingSampleCheckerResult(TrainingSampleCheckerResult::FAILURE, "Error: Something went wrong.");

Or just use the Result directly if you don't want to supply a custom message:

return TrainingSampleCheckerResult::SUCCESS; // use default message
Examples:
user_accelerometer_gestures.cpp.

Member Enumeration Documentation

Enumerator
SUCCESS 
WARNING 
FAILURE 

Constructor & Destructor Documentation

TrainingSampleCheckerResult::TrainingSampleCheckerResult ( Result  result)
TrainingSampleCheckerResult::TrainingSampleCheckerResult ( Result  result,
string  message 
)

Member Function Documentation

string TrainingSampleCheckerResult::getMessage ( ) const
inline
Result TrainingSampleCheckerResult::getResult ( ) const
inline

The documentation for this class was generated from the following files: