turicreate.sound_classifier.create

turicreate.sound_classifier.create(dataset, target, feature, max_iterations=10, custom_layer_sizes=[100, 100], verbose=True, validation_set='auto', batch_size=64)

Creates a SoundClassifier model.

Parameters:
dataset : SFrame

Input data. The column named by the ‘feature’ parameter will be extracted for modeling.

target : string or int

Name of the column containing the target variable. The values in this column must be of string or integer type.

feature : string

Name of the column containing the feature column. This column must contain audio data or deep audio features. Audio data is represented as dicts with key ‘data’ and ‘sample_rate’, see turicreate.load_audio(…). Deep audio features are represented as a list of numpy arrays, each of size 12288, see turicreate.sound_classifier.get_deep_features(…).

max_iterations : int, optional

The maximum number of allowed passes through the data. More passes over the data can result in a more accurately trained model. Consider increasing this (the default value is 10) if the training accuracy is low.

custom_layer_sizes : list of ints

Specifies the architecture of the custom neural network. This neural network is made up of a series of dense layers. This parameter allows you to specify how many layers and the number of units in each layer. The custom neural network will always have one more layer than the length of this list. The last layer is always a soft max with units equal to the number of classes.

verbose : bool, optional

If True, prints progress updates and model details.

validation_set : SFrame, optional

A dataset for monitoring the model’s generalization performance. The format of this SFrame must be the same as the training dataset. By default, a validation set is automatically sampled. If validation_set is set to None, no validation is used. You can also pass a validation set you have constructed yourself.

batch_size : int, optional

If you are getting memory errors, try decreasing this value. If you have a powerful computer, increasing this value may improve performance.