GithubHelp home page GithubHelp logo

matheusccouto / palpiteiro Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 4.91 MB

Fantasy soccer tips with machine learning and genetic algorithm.

License: MIT License

Makefile 3.63% Python 96.37%
aws cartola fantasy gcp machine-learning serverless

palpiteiro's Introduction

Matheus Couto

Linkedin Gmail GitHub

python aws gcp dbt snowflake streamlit serverless airflow actions codecov mlflow docker timescale postgres linux vscode jira cockroach pytest sklearn pandas numpy scipy pytorch opencv plotly

Activity

card

Portfolio

palpiteiro

bluff

scikit-dict

scikit-tune

college-football-rankings

poker-coach

analise-de-educacao-de-base-brasileira

humble-bundle-organizer

palpiteiro's People

Contributors

matheusccouto avatar

Watchers

 avatar  avatar

palpiteiro's Issues

Cartola Express on webapp

As a Cartola Express user
I want to request a lineup using the web app
So that I can use it on Cartola Express

Cartola FC WebApp

User story:
As a Cartola player
I want to access a website and request a line up
So that I can print it and draft my team in Cartola app

Acceptance criteria:
Be able to access a website and request a line up for the current round
Accept at least 433 schema
Accept any budget

Data quality on training set

The query above produced outliers that should be checked:

  • total_points_repr_last_5
  • total_points_last_5
  • total_points_club_last_5
  • total_points
  • total_allowed_points_opponent_last_5
  • prob_tie
  • offensive_points_repr_last_5
  • offensive_points_last_5
  • offensive_points_club_last_5
  • offensive_allowed_points_opponent_last_5
  • defensive_points_repr_last_5

The query above produced excess zeros that should be checked:

  • total_points_repr_last_5
  • offensive_points_repr_last_5
  • importance_opponent
  • importance_club
  • defensive_points_repr_last_5
  • defensive_points_last_5
  • avg_odds_opponent
  • avg_odds_draw
  • avg_odds_club
SELECT
    datetime(timestamp) AS timestamp,
    position,
    total_points_last_5,
    offensive_points_last_5,
    defensive_points_last_5,
    total_points_repr_last_5,
    offensive_points_repr_last_5,
    defensive_points_repr_last_5,
    spi_club,
    spi_opponent,
    prob_club,
    prob_opponent,
    prob_tie,
    importance_club,
    importance_opponent,
    proj_score_club,
    proj_score_opponent,
    total_points_club_last_5,
    offensive_points_club_last_5,
    defensive_points_club_last_5,
    total_allowed_points_opponent_last_5,
    offensive_allowed_points_opponent_last_5,
    defensive_allowed_points_opponent_last_5,
    penalties_club_last_5,
    penalties_opponent_last_5,
    received_penalties_club_last_5,
    received_penalties_opponent_last_5,
    played_last_5,
    avg_odds_club,
    avg_odds_opponent,
    avg_odds_draw,
    IF(total_points <= 0.01, 0.01, total_points) AS total_points
FROM
    palpiteiro.fct_player
WHERE
    played IS TRUE
    AND played_last_5_at > 0
    AND position != 'coach'

Participation predictions

As a user
I want to have higher confidence if the player is expected to play
So I do not lose points because a player did not participate

Cartola FC scraper

  • Create tables
  • Develop extract players function
  • Develop extract matches function
  • Develop transform players function
  • Develop transform matches function
  • Develop load function
  • Define pipeline
  • Set alarms

Telegram Bot

As a Cartola user,
I want to request my lineup via Telegram
So I do not have to open the browser and type an address

Cartola Express scraper

Scrape data from Cartola Express

  • Create tables
  • Develop extract function
  • Develop transform function
  • Define pipeline
  • Set alarms

Cartola Bot

As a Cartola user,
I want a bot to submit the lineup for myself,
So that I do not have to do it myself

Features associations

Those features are highly associated and maybe some should be dropped.

"avg_odds_club" & "avg_odds_opponent" +0.701
"penalties_opponent_last_5" & "received_penalties_club_last_5" +0.658
"prob_club" & "prob_opponent" +0.652
"penalties_club_last_5" &
"received_penalties_opponent_last_5" +0.635 "prob_opponent" &
"proj_score_opponent" +0.411
"prob_club" & "proj_score_club"+0.407
"offensive_points_last_5" & "offensive_points_repr_last_5"+0.346
"avg_odds_opponent" & "prob_opponent" +0.334
"avg_odds_club" & "prob_club" +0.333
"avg_odds_opponent" & "prob_club"+0.331

Missing values on training set

The query above produced 88 missing values on:

  • total_points_club_last_5
  • offensive_points_club_last_5
  • defensive_points_club_last_5
  • total_allowed_points_opponent_last_5
  • offensive_allowed...s_opponent_last_5
  • defensive_allowed...s_opponent_last_5
SELECT
    datetime(timestamp) AS timestamp,
    position,
    total_points_last_5,
    offensive_points_last_5,
    defensive_points_last_5,
    total_points_repr_last_5,
    offensive_points_repr_last_5,
    defensive_points_repr_last_5,
    spi_club,
    spi_opponent,
    prob_club,
    prob_opponent,
    prob_tie,
    importance_club,
    importance_opponent,
    proj_score_club,
    proj_score_opponent,
    total_points_club_last_5,
    offensive_points_club_last_5,
    defensive_points_club_last_5,
    total_allowed_points_opponent_last_5,
    offensive_allowed_points_opponent_last_5,
    defensive_allowed_points_opponent_last_5,
    penalties_club_last_5,
    penalties_opponent_last_5,
    received_penalties_club_last_5,
    received_penalties_opponent_last_5,
    played_last_5,
    avg_odds_club,
    avg_odds_opponent,
    avg_odds_draw,
    IF(total_points <= 0.01, 0.01, total_points) AS total_points
FROM
    palpiteiro.fct_player
WHERE
    played IS TRUE
    AND played_last_5_at > 0
    AND position != 'coach'

Update docs

Documentation is outdated and should be updated

Rei do Pitaco scraper

Scrape Rei do Pitaco data

  • Create tables
  • Create extract function
  • Create transform function
  • Define pipeline
  • Set alarms

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.