Get to know Create ML Components

RSS for tag

Discuss the WWDC22 Session Get to know Create ML Components

Posts under wwdc2022-10019 tag

1 result found
Sort by:
Post not yet marked as solved
1 Replies
695 Views
I am working on a project that involves tabular classification using Create ML Components and I'm having trouble getting my model to work correctly. I've been following the official documentation here: https://developer.apple.com/documentation/createmlcomponents/ and also i have followed the wwdc talks. This one seems to be the most relevant one: https://developer.apple.com/wwdc22/10019 In that talk the construction of a tabular regressor is explained(20:23 Tabular regressor) . I tried using BoostedTreeClassifier similar to that. I am having trouble getting it to work though. While training with 5 featureColumns and one annotation columns appears to have worked. i am unsure how to get the label (the categorical value that the model is supposed to return) after calling .predict . This is the last bit of the example from apple (tabular regression) static func predict( type: String, region: String, volume: Double ) async throws -> Double { let model = try task.read(from: parametersURL) let dataFrame: DataFrame = [ "type": [type], "region": [region], "volume": [volume] ] let result = try await model(dataFrame) return result[priceColumnID][0]! } The last line is what i am wondering how to write for a Tabular classifier. It should return a category in my case. Is there a tutorial or example for a tabular classifier code somewhere?
Posted
by Rob42.
Last updated
.