Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Machine Learning

Introduction to Machine Learning

Avatar for Pierre Margueritte

Pierre Margueritte

June 22, 2016

More Decks by Pierre Margueritte

Other Decks in Programming

Transcript

  1. function isOrangeOrApple(image) { // detect color ? // detect edges

    ? // detect textures ? // analyze shape ? // compute probabilities } traditional approach
  2. examples = data sets )PSTFQPXFS 4FBUT TQPSUTDBS   TQPSUTDBS

      DBS   DBS   features classes
  3. building a classifier from sklearn import tree features = [[300,

    2], [350, 2], [120, 5], [150, 4]] labels = ["sports-car", "sports-car", "car", "car"] clf = tree.DecisionTreeClassifier() clf = clf.fit(features, labels) print clf.predict([[200, 4]]) [‘car’]
  4. under the hood horsepower <= 225.0 gini = 0.5 samples

    = 4 value = [2, 2] class = car gini = 0.0 samples = 2 value = [2, 0] class = car True gini = 0.0 samples = 2 value = [0, 2] class = sports-car False