Git Product home page Git Product logo

kaggle-outbrain's Introduction

Preliminary step

Splitting page_views

In order to conveniently work woth page_views.csv.zip file we need to split it into chunks, so we can process each chunk independently and in memory.

mkdir page_views_chunks
unzip -p page_views.csv.zip | split --line-bytes=300m --filter='gzip --fast > ./page_views_chunks/$FILE.gz'

Configuration and utilities

You can adjust configuration in conf.R file - paths to data, number of cores to use, number of partitions, etc. Need to specify path to initial data files and path to page views chunks from step above

Misc functions are in misc.R file.

Baseline 1

Here we won't use page_views - only data from clicks_train.csv.zip, events.csv.zip. To run baseline you need to run:

  1. Rscript 0-0-prepare-baseline-1.R - prepares data clicks, events, promo files.
  2. Rscript 0-1-prepare-baseline-1.R - creates ans saves model matrix to disk (partition by uuid).
  3. Rscript 0-2-run-baseline-1.R - fit FTRL to model matrix chunks from step above.
  4. Rscript 0-3-predict-baseline-1.R - generate submission file (without leak)

Rough timings provided at the top of each file.

Baseline 2

To run baseline you need to run:

  1. Rscript 1-0-prepare-baseline-2.R - preprocess page_views - filter not relevant page views and partition by uuid.
  2. Rscript 1-1-prepare-baseline-2.R - creates ans saves model matrix to disk (incluing hashed interactions between page views and advertisement and user context).
  3. Rscript 1-1-extract-leak.R - extracts leak
  4. Rscript 1-2-run-baseline-2.R - fit FTRL to model matrix chunks from step above.
  5. Rscript 1-3-predict-baseline-2.R - generate two submission files - with and without leak

Rough timings provided at the top of each file.

kaggle-outbrain's People

Contributors

dselivanov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.