Your SlideShare is downloading. ×
0
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Intro To Machine Learning in Python
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Intro To Machine Learning in Python

1,483

Published on

Machine Learning Basics, Introduction of Scikit-learn, Web traffic prediction, Cross validation

Machine Learning Basics, Introduction of Scikit-learn, Web traffic prediction, Cross validation

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,483
On Slideshare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
70
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. INTRO TO MACHINE LEARNING IN PYTHON Russel Mahmud @PyCon Dhaka 2014
  • 2. Who am I ? Machine Learning in Bangladesh  Software Engineer @NewsCred  Passionate about Big Data, Analytics and ML https://github.com/livewithpython/sklearn-pycon-2014 #LiveWithPython
  • 3. Agenda  Machine Learning Basics  Introduction to Scikit-learn  A simple example  Conclusion  Q&A
  • 4. Story 1 : PredPol (Predictive Policing)  Predict crime at real time. `
  • 5. Story 2 : YouTube Neuron  Google’s artificial brain learns to find Cat
  • 6. What is Machine Learning? Field of study that gives computers the ability to learn without being explicitly programmed. - Arthur Samuel A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E. - Tom M. Mitchell
  • 7. Algorithm types Supervised Learning Unsupervised Learning
  • 8. Python Tools for Machine Learning  Scikit-learn  Statsmodels  PyMC  Shogun  Orange  ...
  • 9. Scikit-learn  Simple and efficient for data mining and data analysis  Open source, commercially usable  It’s much faster than other libraries  It’s built on numpy, scipy and matplotlib
  • 10. Scikit-learn  Simple and consistent API  Instantiate the model m = Model ()  Fit the model m.fit(train_data, target) or m.fit(train_data)  Predict m.predict(test_data)  Evaluate m.score(train_data, target)
  • 11. Example : Web Traffic Prediction  Current limit : 100,000 hits/hours  Predict the right time to allocate sufficient resources
  • 12. Reading in the data
  • 13. Preparing the data
  • 14. Taking a peek
  • 15. Model Selection
  • 16. Simple Model
  • 17. Playing around Residual Score  Linear 0.4163  RandomForest 0.952  RidgeRegressio n 0.7665
  • 18. Taking a closer look
  • 19. Underfitting and Overfitting  aka high bias  model is very simple  aka high variance  model is excessively complex
  • 20. Evaluation  Measure performance with using cross- validation Cross Validation Score  Linear 0.4450  RandomForest 0.6519  RidgeRegressio n 0.7256
  • 21. Example : Solution
  • 22. Conclusion Python is Awesome Scikit-learn makes it more Awesome
  • 23. References  http://www.predpol.com/  http://en.wikipedia.org/wiki/Machine_learning  http://scikit-learn.org/  http://www.cbinsights.com/blog/python-tools- machine-learning  http://googleblog.blogspot.com/2012/06/using- large-scale-brain-simulations-for.html  http://www.kaggle.com/
  • 24. Q&A

×