labeledSensorData(featureColumns:labelColumn:recordingFileColumn:)
Generates a data table from the contents of the data source.
Declaration
func labeledSensorData(featureColumns: [String], labelColumn: String? = nil, recordingFileColumn: String? = nil) throws -> MLDataTableParameters
- featureColumns:
The names of the feature columns the method includes in the Mldatatable it generates.
- labelColumn:
The name of the label column. This parameter must not be
nilif the data source uses Directorywithdataandannotation(at:annotationfilename:timestampcolumn:labelstarttimecolumn:labelendtimecolumn:). - recordingFileColumn:
The name of the column with the recording file names. This parameter must not be
nilif the data source uses Directorywithdataandannotation(at:annotationfilename:timestampcolumn:labelstarttimecolumn:labelendtimecolumn:).
Return Value
A new MLDataTable instance.
Discussion
The labelColumn and recordingFileColumn parameters are optional if the data source is MLActivityClassifier.DataSource.labeledDirectories(at:). If nil, the method names the data table’s label column and data file column “label” and “recordingFile”, respectively.