Giter Club home page Giter Club logo

spl2_battle_predictor's Introduction

splatoon2 battle result predictor

Splatoon2の戦績データから,バトルの勝敗を学習し,予測します.

Requirements

  • Python3.5+
  • pip
  • numpy
  • pandas
  • scikit-learn
  • Keras, tensorflow (--logreg, --nn使用時)
  • XGBoost (--xgb使用時)

Usage

データを集める

https://stat.inkさんからデータを 迷惑がかからないように 集めてください. API doc: https://github.com/fetus-hina/stat.ink/tree/master/doc/api-2

データの前処理

$ python3 utils/data_preparation.py data_dir [--start START] [--end END] --dst DST
  • data_dir: 前処理を行いたい,stat.ink形式のjsonファイルが入ってるディレクトリを指定します.ここで指定したディレクトリに含まれる*.jsonに対して処理をします.
  • --start, -s: 前処理の対象とする期間の先頭の日付をYYYY-mm-dd-hhで指定します.
  • --end, -e: 前処理の対象とする期間の終端の日付をYYYY-mm-dd-hhで指定します.
  • --dst, -d: 前処理を行った後のCSVファイルの出力先を指定します.

for example (extract battles in v2.1.x)

$ python3 utils/data_preparation.py hoge/ -s 2017-12-13-10 -e 2018-1-17-10 -d csvs/v21x.csv
...
Extracted 24009 battles.
$ ls csvs/
v21x.csv

学習

$ python3 train.py data_dir [--weapon_only] [--logreg | --nn | --svm | --xgb]
  • data_dir: 学習に使う前処理が完了しているデータ(CSVファイル)を指定します.
  • --weapon_onlyまたは-w をつけると,ブキ編成のみのデータから学習を行います.

以下は学習に使う分類器を指定するフラグです.何も指定しないと,--logregをつけるのと同じです.

  • --logreg: ロジスティック回帰で学習を行います.
  • --nn: (単純な)ニューラルネットワークで学習を行います.
  • --svm: SVMで学習を行います.(NOTE: とても時間がかかります.)
  • --xgb: XGBoostで学習を行います.

for example (weapon_only, using SVM)

$ python3 train.py csvs/v21x.csv -w --svm

spl2_battle_predictor's People

Contributors

mak4026 avatar

Watchers

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.