Giter Club home page Giter Club logo

cartola-machine-learning-and-linear-programming's Introduction

Cartola machine learning and linear programming

Using machine learning to predict the score of the soccer players of Campeonato Brasileiro de Futebol and decide the best squad with linear programming

About The Project

This is a project to try to build the best team in Cartola FC. To do that, I did first a regression of the score of the soccer players, second I predicted the winner teams and losers of each round using classification with the program that I made in the repository Machine-learning-soccer-classification to prevend the linear model to choose players from teams that are playing against each other which is bad most of the time and for last I used linear programming to decid the best squad maximizing the score predictions multiplied by some weights like, if the team is playing home or outside, if the teams are playing a classic and the position of the team in the Brasileirão table.

Data

I used the data from the repository caRtola: https://github.com/henriquepgomide/caRtola

Built With

Python in Jupyter Notebook

I decided to try different machine learning approaches to compare the results, so i used XGBoost, Extra Trees, Random Forest and MLP.

Features and scores

image

The meaning of each feature and its weight can be found in the site: https://www.cartolafcbrasil.com.br/scouts

Data for training and testing

train = 70% of data and test = 30%

The weight of playing home

image

The graph show us that playing home is very important for the Campeonato Brasileiro, because the teams win more often home than outside and that's why i added a weight of playing home in the linear programming part.

Results

image

Using data from round 14 of 2021, the classification predictions are:

image

Using 108 cartoletas, the best squad chosen was:

image

Total price = 107.84

Pontuation prediction = 104.13

cartola-machine-learning-and-linear-programming's People

Contributors

marcosptproenca 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.