GithubHelp home page GithubHelp logo

shukkkur / tennis-match-prediction Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 0.0 1.01 MB

Predicting the winner of the Tennis match

License: The Unlicense

Python 100.00%
scikit-learn machine-learning prediction python tennis

tennis-match-prediction's Introduction

Tennis-Match-Prediction

Forks Stars Watchers Last Commit

Using different linear models I tried to predict the winner of a tennis matches based on 2 features.

Sample data:

sample

Since the only feautres available for predicting are the personal scores of the players (lk1 & lk2),
plotting them reveals a linear relationship

sns.lineplot(x = 'lk1', y = 'lk2', data = dfs, hue = 'match_outcome')
plt.show()

sample

I build and trained the following linear model classifiers:

  • Ridge
  • Lasso
  • KNN
  • Logistic Regression
  • Decision Tree

Then, tested them on the new datasets


and the results I've got:
date_of_match player1_id player1_name player2_id player2_name lk1 lk2 final_outcome Ridge - L2 SVC KNN LogReg DecisionTree
0 27.09.2020 20754594 Fischer 29753705 Pfau 15.1 15.1 lose win lose lose win lose
1 27.09.2020 20754594 Fischer 20355195 Kösters 15.1 20.1 win win win win win win
2 13.09.2020 20754594 Fischer 28803686 Opalka 15.1 22.1 win win win win win win
3 05.09.2020 20754594 Fischer 20457747 Goedecke 15.1 15.1 lose win lose lose win lose
4 23.08.2020 20754594 Fischer 20357314 van Raay 15.1 23.1 win win win win win win
5 16.08.2020 20754594 Fischer 20263300 Verheyen 15.1 23.1 win win win win win win
6 09.08.2020 20754594 Fischer 29050113 Siebert 15.1 22.1 win win win win win win
7 12.07.2020 20754594 Fischer 20651971 Menze 15.1 11.7 lose lose lose lose lose win
8 09.07.2020 20754594 Fischer 20551904 Bodem 15.1 15.1 lose win lose lose win lose
9 09.07.2020 20754594 Fischer 20653485 Rajapreyar 15.1 8.0 lose lose lose lose lose lose
10 29.06.2020 20754594 Fischer 20556878 Grigorieva 15.1 9.7 lose lose lose lose lose lose
11 25.06.2020 20754594 Fischer 20652120 Götz 15.1 19.1 win win win win win win
12 25.06.2020 20754594 Fischer 20651858 Kriegbaum 15.1 21.8 win win win win win win
13 25.06.2020 20754594 Fischer 20653608 Hein 15.1 13.1 lose lose lose lose win lose
14 21.06.2020 20754594 Fischer 20652121 Pohl 15.1 16.8 win win win win win win
15 19.06.2020 20754594 Fischer 20651901 Schaefer 15.1 6.1 lose lose lose lose lose lose
16 12.06.2020 20754594 Fischer 20652120 Götz 15.1 19.1 win win win win win win
17 11.06.2020 20754594 Fischer 20352348 Kroll 15.1 8.1 lose lose lose lose lose lose
18 24.02.2020 20754594 Fischer 20651370 Wolter 15.1 12.1 lose lose lose win lose win
19 24.02.2020 20754594 Fischer 20655872 Bongardt 15.1 19.0 win win win win win win
20 11.02.2020 20754594 Fischer 20652388 Buß 15.1 4.1 lose lose lose lose lose lose
21 11.02.2020 20754594 Fischer 20650020 Kuhlwein von Rathenow 15.1 13.6 lose lose lose lose win lose

tennis-match-prediction's People

Contributors

shukkkur avatar

Stargazers

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