Create ML Tutorial: Getting Started
In this Create ML tutorial, you’ll learn how to transfer your learning to Turi Create, and gain familiarity with machine learning toolsets and terminology. No math needed! By Audrey Tam.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
Create ML Tutorial: Getting Started
40 mins
- Getting Started
- Create ML Image Classifier
- Apple’s Spectacular Party Trick
- Training & Validation Accuracy
- Evaluation
- Improving Accuracy
- Back to the Playground
- Increase Max Iterations?
- Using the Image Classifier
- Turi Create Image Classifier
- Text Classifier
- Create ML
- Turi Create
- Turi Create Image Similarity
- Anaconda & Notebooks
- Training the Model
- Unsupervised Learning
- Querying the Model
- Shutting Down
- Where To Go From Here?
- Our Tutorials
- ML Community
Querying the Model
When the model is ready, run these lines:
query_results = model.query(reference_data[0:10], k=10)
query_results.head()
You’re passing an array that contains the first 10 reference_data
images, asking for 10 similar images for each, then showing the first 10 rows of query_results
.
Suppose you want to find similar images for the 10th image. First, see what it is:
reference_data[9]['image'].show()
The loading order of images is non-deterministic, so your 10th image is probably something different. What matters is that it should look like the output of the next cell.
So run these lines:
similar_rows = query_results[query_results['query_label'] == 9]['reference_label']
reference_data.filter_by(similar_rows, 'id').explore()
The target image is actually the first image returned. The other images show cats that look similar and/or are positioned in a similar way.
Congratulations! You’ve just built an image similarity model in Python! And your Mac didn’t explode ;]. Hopefully, you’ll try out other Turi Create examples on your own data.
Shutting Down
Log out of the jupyter browser windows.
In the Terminal window where the jupyter server is running, press Control-C-C to stop the server.
If your command line prompt starts with (turienv)
, enter this command to exit:
source deactivate
If you really don’t want to keep Anaconda, enter this command:
rm -rf ~/anaconda3
Where To Go From Here?
The finished Turi Create notebook and iOS project are in the finished folder of this tutorial’s materials. Use the Download Materials button at the top or bottom of this tutorial.
You’re now well-equipped to experiment with datasets in Create ML, and hopefully you’ll continue learning about Turi Create.
Explore Create ML and its documentation, but also spend some time browsing the Turi Create User Guide, even if you don’t want to write Python. The Turi Create How it works documentation is impressively informative and mostly math-free. To find out even more, follow their academic reference links.
And here are some other resources and further reading to deepen your own learning:
Our Tutorials
This tutorial is just the latest in a series of ML tutorials from your favorite how-to site. And yes, there will be more!
- Core ML and Vision: Machine Learning in iOS 11 Tutorial
- Beginning Machine Learning with Keras & Core ML
- Beginning Machine Learning with scikit-learn
- IBM Watson Services for Core ML Tutorial
- Natural Language Processing on iOS with Turi Create
- Caffe (coming soon).
ML Community
- Kaggle is a repository of datasets contributed by members, often supplemented by notebooks that analyze and visualize the data. It runs model prediction competitions, which leads to the next link:
- Machine Learning Zero-to-Hero: Everything you need in order to compete on Kaggle for the first time, step-by-step!
I hope you enjoyed this Create ML tutorial. Please join the discussion below if you have any questions or comments. And especially tell us what you do with Create ML and Turi Create!