A rough outline to whet your appetite:
- Get a non-mathematical beginners introduction to machine learning
- See examples of where ML is being used today
- Find out how to identify where ML might be useful in your app
- Find out about selecting “features” for a ML problem
- Prediction.io: why it’s a good solution for developers and how to use it with Ruby
- See results of a recent A/B test using prediction.io on a production application.
6. helicopter.rb
while helicopter.flying
if helicopter.pitch < 0
helicopter.pitchBy(0.1)
else
helicopter.pitchBy(-0.1)
end
if helicopter.yaw < 0
helicopter.yawBy(0.1)
else
helicopter.yawBy(-0.1)
end
end
7. helicopter.rb
while helicopter.flying
if helicopter.pitch < 0
helicopter.pitchBy(0.1)
else
helicopter.pitchBy(-0.1)
end
if helicopter.yaw < 0
helicopter.yawBy(0.1)
else
helicopter.yawBy(-0.1)
end
if helicopter.roll < 0
helicopter.rollBy(0.1)
else
helicopter.rollBy(-0.1)
end
end
8. OK, but what if…
• it’s about to hit a tree?
• one of the main rotor blades is broken?
• power is running low?
• there is wind?
10. helicopter.rb
while helicopter.flying
if helicopter.pitch < 0
helicopter.pitchBy(0.1)
else
helicopter.pitchBy(-0.1)
end
if helicopter.yaw < 0
helicopter.yawBy(0.1)
else
helicopter.yawBy(-0.1)
end
if helicopter.roll < 0
helicopter.rollBy(0.1)
else
helicopter.rollBy(-0.1)
end
end
Fail
19. All 15 match outcomes predicted correctly
No “luck” here.
20. Google Search
Netflix
Sentiment Analysis
Autonomous Cars
Spam Detection
Face Detection
Siri
Priority Inbox
Medical Diagnosis Advertising
Fraud Detection
Product Recommendations
OCR
Dictation
Video Games
Finance
27. estimate_sales_price.rb
def estimate_house_sales_price(num_of_bedrooms, sqft, neighborhood)
price = 0
# In my area, the average house costs $200 per sqft
price_per_sqft = 200
if neighborhood == "hipsterton":
# but some areas cost a bit more
price_per_sqft = 400
elsif neighborhood == "skid row":
# and some areas cost less
price_per_sqft = 100
end
# start with a base price estimate based on how big the place is
price = price_per_sqft * sqft
# now adjust our estimate based on the number of bedrooms
if num_of_bedrooms == 0
# Studio apartments are cheap
price = price - 20000
else
# places with more bedrooms are usually
# more valuable
price = price + (num_of_bedrooms * 1000)
end
price
end
29. estimate_sales_price_ml.rb
def estimate_house_sales_price(num_of_bedrooms, sqft, neighborhood)
price = 0
# a little pinch of this
price += num_of_bedrooms * .841231951398213
# and a big pinch of that
price += sqft * 1231.1231231
# maybe a handful of this
price += neighborhood * 2.3242341421
# and finally, just a little extra salt for good measure
price += 201.23432095
end
30. estimate_sales_price_ml.rb
def estimate_house_sales_price(num_of_bedrooms, sqft, neighborhood)
price = 0
# a little pinch of this
price += num_of_bedrooms * 1.0
# and a big pinch of that
price += sqft * 1.0
# maybe a handful of this
price += neighborhood * 1.0
# and finally, just a little extra salt for good measure
price += 1.0
end
33. estimate_sales_price_ml.rb
def estimate_house_sales_price(num_of_bedrooms, sqft, neighborhood)
price = 0
# a little pinch of this
price += num_of_bedrooms * .841231951398213
# and a big pinch of that
price += sqft * 1231.1231231
# maybe a handful of this
price += neighborhood * 2.3242341421
# and finally, just a little extra salt for good measure
price += 201.23432095
end
50. Prediction.IO
• Open Source
• Deploy on your own servers or instantly on
Amazon’s Cloud
• Cheap to run
• Developer friendly API
• Easy to use admin UI
51. Prediction.IO
• Ignore the maths
• Helps you find the best algorithm for your problem
• Easily hosted and performant
• Uses scalable services such as MapReduce
and Hadoop.
• You don’t need to know how to work this stuff
though.
60. A/B Test Results
• 45% longer average session
• 22% increase in conversion rate
• 37% increase in average order value
• 71% increase in revenue
61. Machine Learning
• Extremely powerful at solving complex
problems
• Increasingly important for developers to
know about it
• Don’t need to know the maths to get the
benefit
62. More Information
Stanford Machine Learning
https://www.coursera.org/course/ml
Bootstrapping Machine Learning
http://www.louisdorard.com/machine-learning-book/
Machine Learning is Fun
https://medium.com/@ageitgey/machine-learning-is-fun-
80ea3ec3c471
Building The Smart Shop
http://info.resolvedigital.com/building-the-smart-spree-shop