Machine learning

Basic problem setting

  • Given: N samples of data
  • Goal: predict properties of unseen data

adaboost

What is scikit-learn?

  • Simple and efficient tools for data mining and data analysis
  • Built on NumPy, SciPy, and matplotlib
  • Open source, BSD license
  • Under active development

CPI predicted vs actual

Example - Support Vector Machine

from sklearn import svm

train_X = ...  # load sample inputs
train_y = ...  # load sample outputs
to_predict = ...  # we want to predict the output of this value

clf = svm.SVC()  # create a classifier

clf.fit(train_X, train_y)  # train the classifier

prediction = clf.predict(to_predict)  # predict our unknown output


scikit-learn.org/stable/documentation.html

Example - Decision Tree

from sklearn import tree

train_X = ...  # load sample inputs
train_y = ...  # load sample outputs
to_predict = ...  # we want to predict the output of this value

clf = tree.DecisionTreeClassifier()  # create a classifier

clf.fit(train_X, train_y)  # train the classifier

prediction = clf.predict(to_predict)  # predict our unknown output


scikit-learn.org/stable/documentation.html

scikit-learn @ Gallop Labs

  • Optimization of Facebook campaigns
  • Regression to predict certain outputs of a campaign

Goals dashboard Audience breakdown

CPI predictions

CPI predicted vs actual

print('Thank You!')

christian, gaelan, azhar, logan @galloplabs.com