Coder Social home page Coder Social logo

kddcup2017's Introduction

A Solution for KDD Cup 2017

Models

The samples are segmented by route with the mean travel time in the time window for the task1, and tollgate/direction with the volume in the time window for the task2. Trained with a blending regression model each task. Besides backward target values(travel time and volume), there are some features related to the sample. See lib/feature.py and task{1,2}/feature.py.

Results

Test1

  • Task1: 0.181~0.183 MAPE
  • Task2: 0.125~0.131 MAPE

Install Dependencies

pip install -r requirements.txt

Segment Data

python -m task1.segment
python -m task2.segment

Extract Features

python -m task1.extract
python -m task2.extract

Train Models

python -m task1.train
python -m task2.train

Predictions for the Tasks

Since there are test1 and test2 phases, the default is prediction for test1. To predict for the test2 phase, the data should be re-segmented to integrate the test1 data into the training data. The KDD_MODE environment variable should be set to predict to do so (and set to train to switch back to test1).

The resulting files are placed at {task1, task2}/submission/.

Test1

python -m task1.predict
python -m task2.predict

Test2

KDD_MODE=predict python -m task1.segment && python -m task1.extract && python -m task1.train && python -m task1.predict
KDD_MODE=predict python -m task2.segment && python -m task2.extract && python -m task2.train && python -m task2.predict

Customize Models

See task{1,2}/train.py.

Customize Features

See lib/feature.py for common features and task{1,2}/feature.py for specific features, and enable new features in task{1,2}/extract.py.

kddcup2017's People

Contributors

floydwch avatar

Watchers

Noon van der Silk avatar James Cloos avatar  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.