VisualRecognitionTrainClassifier Method (VisualRecognitionSuccessCallbackClassifierVerbose, VisualRecognitionFailCallback, String, DictionaryString, String, String, String, DictionaryString, Object) |
Trains a classifier. Training requires a total of at least two zip files: Two positive example zips with
at least 10 positive examples each or one zip file of 10 positive examples and a zip file of 10 negative examples.
The total size of all files must be below 256mb. Additional training can be done by using UpdateClassifier.
Namespace:
IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3
Assembly:
unity-documentation (in unity-documentation.exe) Version: 1.0.0.0 (1.0.0.0)
Syntax public bool TrainClassifier(
VisualRecognitionSuccessCallback<ClassifierVerbose> successCallback,
VisualRecognitionFailCallback failCallback,
string classifierName,
Dictionary<string, string> positiveExamples,
string negativeExamplesPath = null,
string mimeType = "application/zip",
Dictionary<string, Object> customData = null
)
Parameters
- successCallback
- Type: IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3VisualRecognitionSuccessCallbackClassifierVerbose
The success callback. - failCallback
- Type: IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3VisualRecognitionFailCallback
The fail callback. - classifierName
- Type: SystemString
Classifier name. - positiveExamples
- Type: System.Collections.GenericDictionaryString, String
Dictionary of class name and positive example paths. - negativeExamplesPath (Optional)
- Type: SystemString
Negative example file path. - mimeType (Optional)
- Type: SystemString
Mime type of the positive examples and negative examples data. Use GetMimeType to get Mimetype from filename. - customData (Optional)
- Type: System.Collections.GenericDictionaryString, Object
[Missing <param name="customData"/> documentation for "M:IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.TrainClassifier(IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.SuccessCallback{IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.ClassifierVerbose},IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.FailCallback,System.String,System.Collections.Generic.Dictionary{System.String,System.String},System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.Object})"]
Return Value
Type:
Booleantrue, if classifier was trained,
false otherwise.
See Also