football-tda | The shape of football games

 by   giotto-ai Python Version: Current License: Non-SPDX

kandi X-RAY | football-tda Summary

kandi X-RAY | football-tda Summary

football-tda is a Python library typically used in Telecommunications, Media, Media, Entertainment applications. football-tda has no bugs, it has no vulnerabilities, it has build file available and it has low support. However football-tda has a Non-SPDX License. You can download it from GitHub.

The purpose of this project is to show a possible application of TDA. Our use case is based on football and the goal (pun intended) is to try to forecast the outcome of a match. You can find our blog post at this link.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              football-tda has a low active ecosystem.
              It has 14 star(s) with 8 fork(s). There are no watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 0 have been closed. On average issues are closed in 214 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of football-tda is current.

            kandi-Quality Quality

              football-tda has no bugs reported.

            kandi-Security Security

              football-tda has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              football-tda has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              football-tda releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed football-tda and discovered the below as its top functions. This is intended to give you an instant insight into football-tda implemented functionality, and help decide if they suit your requirements.
            • Cross validation
            • Construct a dictionary of model parameters
            • Validate k - fold model
            • Generate a power set from an iterable
            • Compute final standings
            • Generate a random number of players
            • Calculates the player s averages
            • Print the ranking of the candidates
            • Attempts to hire a league
            • Add stats to a DataFrame
            • Insert players into match table
            • Replace a single player with a new one
            • Switch player by name
            • Switch to player id
            • Extract the features for each prediction
            • Gets the best model for the best model
            Get all kandi verified functions for this library.

            football-tda Key Features

            No Key Features are available at this moment for football-tda.

            football-tda Examples and Code Snippets

            No Code Snippets are available at this moment for football-tda.

            Community Discussions

            QUESTION

            Value Error X has 24 features, but DecisionTreeClassifier is expecting 19 features as input
            Asked 2021-Jan-25 at 00:51

            I'm trying to reproduce this GitHub project on my machine, on Topological Data Analysis (TDA).

            My steps:

            • get best parameters from a cross-validation output
            • load my dataset feature selection
            • extract topological features from the dataset for prediction
            • create a Random Forest Classifier model built on the best parameters
            • calculate probabilities on test data

            Background:

            1. Feature selection

            In order to decide which attributes belong to which group, we created a correlation matrix. From this, we saw that there were two big groups, where player attributes were strongly correlated with each other. Therefore, we decided to split the attributes into two groups, one to summarise the attacking characteristics of a player while the other one the defensiveness. Finally, since the goalkeeper has completely different statistics with respect to the other players, we decided to take into account only the overall rating. Below, is possible to see the 24 features used for each player:

            Attack: "positioning", "crossing", "finishing", "heading_accuracy", "short_passing", "reactions", "volleys", "dribbling", "curve", "free_kick_accuracy", "acceleration", "sprint_speed", "agility", "penalties", "vision", "shot_power", "long_shots" Defense: "interceptions", "aggression", "marking", "standing_tackle", "sliding_tackle", "long_passing" Goalkeeper: "overall_rating"

            From this set of features, the next step we did was to, for each non-goalkeeper player, compute the mean of the attack attributes and the defensive ones.

            Finally, for each team in a given match, we compute the mean and the standard deviation for the attack and the defense from these stats of the team's players, as well as the best attack and best defense.

            In this way a match is described by 14 features (GK overall value, best attack, std attack, mean attack, the best defense, std defense, mean defense), that mapped the match in the space, following the characterizes of the two teams.

            1. Feature extraction

            The aim of TDA is to catch the structure of the space underlying the data. In our project, we assume that the neighborhood of a data point hides meaningful information that is correlated with the outcome of the match. Thus, we explored the data space looking for this kind of correlation.

            Methods:

            ...

            ANSWER

            Answered 2021-Jan-16 at 01:36

            The answer is actually given in the question already.

            You mentioned in your question, # x_test.shape -> (380, 24) and # x_train.shape -> (2565, 19). As it is very clear and can be seen that your test data shape doesn't match with your train data, your train data have 19 features, whereas the test data have got 24 features (they must contain same amount of feature) thus you're getting the error "X has 24 features, but DecisionTreeClassifier is expecting 19 features as input" when you're giving the x_test inside your model in this line - get_probabilities(rf_model, x_test, team_ids).

            So, your test data must have 24 features just like your train data.

            Source https://stackoverflow.com/questions/65743019

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install football-tda

            You can download it from GitHub.
            You can use football-tda like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/giotto-ai/football-tda.git

          • CLI

            gh repo clone giotto-ai/football-tda

          • sshUrl

            git@github.com:giotto-ai/football-tda.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link