Git Product home page Git Product logo

tensor-mlb-batting's Introduction

TensorFlow MLB Batting

TensorFlow NN for classifying batters.

Example

Method

Players need at least 1000 at bats and are divided among 4 levels.

  • 4: HoF
  • 3: Not in HoF but had received at least 20 percent
  • 2: Was on HoF ballot
  • 1: None of the above

Observation and notes

This is just an experiment for fun and not a serious attempt to train a machine to classify MLB players. The ranking levels are somewhat arbitrarily chosen, as are the features used in the training. Also known data issues are not dealt with - for example: I ignored the fact that pitchers can have batting stats, and some HoF pitchers are horrible batters, this can create unpleasant outliers in training data. Inherent politics like banned players, and yet to be eligible players also create noises in the data.

Overall accuracy is around 80%. Level 3 turned out to be a bad category, as only around 40 out of over 3000 players fit into the classification, and subjectively, there is not a huge difference between those in level 2 and level 3.

Dependencies

Requires tensorflow, numpy, and flask.

Training and running

  • In data folder, run download-data.sh to fetch data
  • In root folder run python mlb.py, then go to http://localhost:5000

Data

Data source is https://github.com/chadwickbureau/baseballdatabank/

tensor-mlb-batting's People

Contributors

mwdchang avatar

Stargazers

 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.