Giter Club home page Giter Club logo

kddcup's Introduction

训练模型

需要文件beijing_aq.json和london_aq.json, 建立文件夹files,执行如下命令

python process.py
python model.py

处理过的文件和训练的模型参数存储在files文件夹下面

提交模型答案

在files文件夹下新建文件夹test 首先需要运行getdata.py获取某一时间段的数据,为了避免报错,我们获取4月30日0时开始到当前时间的数据

python getdata.py 2018-04-30-0 [current time]
python process_test.py [beijing json file name] [london json file name]
python test.py
python submit.py beijing_output.json london_output.json
  • process_test.py的参数[beijing json file name]和[london json file name]是getdata.py存储数据的文件名
  • process_test.py处理的数据存在./files/test文件夹下
  • test.py生成文件beijing_output.json和london_output.json
  • submit.py 生成result文件进行提交

测试模型

运行示例在test.py的main函数注释部分

for station in beijing_station:
        test_dataset, max_values = make_test_data('./files/test/bj_aq_test_'+station+'.npy', use_length)
        test(station, test_dataset, max_values, 0)

for station in london_station:
        test_dataset, max_values = make_test_data('./files/test/ld_aq_test_'+station+'.npy', use_length)
        test(station, test_dataset, max_values, 1)

需要注意这里test_dataset的长度要大于48

kddcup's People

Stargazers

 avatar

Watchers

 avatar

Forkers

nagizeroiw

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.