16
Predict. ..

Applift datathon- predict bdiing

Embed Size (px)

Citation preview

Page 1: Applift datathon- predict bdiing

Predict...

Page 2: Applift datathon- predict bdiing

• kept:• TrafficType str: site/app• PublisherId str: brand value of publisher• AppSiteId str : brand value of app/site• AppSiteCategory str: arts,travel: genre• Position str: top/bottom• OS str• OSVersion str• DeviceType str• DeviceIP str (perhaps!!)• Country str• CampaignId int• CreativeId int• CreativeType int• CreativeCategory str• ExchangeBid float

Page 3: Applift datathon- predict bdiing

removed

• BidId str unique• BidFloor int same• Timestamp int ignored• Age int not enuf data• Gender str --do--• Carrier str• DeviceIdstr all 0• Latitude str• Longitude str• Zipcode int• GeoTypestr

Page 4: Applift datathon- predict bdiing
Page 5: Applift datathon- predict bdiing
Page 6: Applift datathon- predict bdiing

Filtering…

• Finding sentiment

Page 7: Applift datathon- predict bdiing

•• A popular approach towards solving class imbalance problems is to bias

the classifier so that it pays more attention to the positive instances.• This can be done, for instance, by increasing the penalty associated with

misclassifying the positive class relative to the negative class. • Another approach is to preprocess the data by oversampling the majority

class or undersampling the minority class in order to create a balanced dataset.

Page 8: Applift datathon- predict bdiing
Page 9: Applift datathon- predict bdiing

learn• model=graphlab.logistic_classifier.create(train_data,target='sentiment',fea

tures=['TrafficType','DeviceType','CampaignId','CreativeCategory','ExchangeBid'],validation_set=test_data,max_iterations=500)

Page 10: Applift datathon- predict bdiing
Page 11: Applift datathon- predict bdiing

Evaluate..

• model.evaluate(test_data)

Page 12: Applift datathon- predict bdiing
Page 13: Applift datathon- predict bdiing
Page 14: Applift datathon- predict bdiing
Page 15: Applift datathon- predict bdiing
Page 16: Applift datathon- predict bdiing

evaluate

• import graphlab• model=graphlab.load_model('mymodel/')• eval=graphlab.SFrame('data/eval1.csv')• eval['sentiment']=eval['Outcome']!='0'• model.evaluate(eval)

OR• eval['predict']=model.predict(eval,output_type='probability')