Wikidata:Property proposal/rules for classification

Rules for classification edit

Originally proposed at Wikidata:Property proposal/Sports

DescriptionThe rules for classification of a sports league
Data typeItem
Domaininstance or subclass of sports season of a sports club (Q1539532)
Allowed valuesmost points, most goals scored, most goals conceded, bigger goal difference, more points in individual games between the competitors with the same number of points, bigger goal difference in individual games between the competitors with the same number of points, most away goals scored in individual games between the competitors with the same number of points, bigger goal average or goal ratio etc
Example2015–16 Cypriot First Division (Q19906304) → rules of classification → most points → series ordinal (P1545) → 1
2015–16 Cypriot First Division (Q19906304) → rules of classification → most goals scored → series ordinal (P1545) → 2
Planned useAdding to many football leagues
Motivation

We need to have a property to show the rules of classification in each sports leagues. The idea is to have items like points, goals scored, goals conceded with series ordinal (P1545) as a qualifier. Xaris333 (talk) 11:50, 15 October 2016 (UTC)[reply]

Discussion
@Thryduulf: Do you think that we should also have a qualifier that shows how each rules works. I mean, for example, that bigger goal difference outbalance the smaller one. In some rules may the smaller amount outbalance the big one. Xaris333 (talk) 17:16, 16 October 2016 (UTC)[reply]
Do you mean e.g. if person A has 10 points and person B 20 points, which one wins depends on the sorting order - if they points for wins then person B wins, but if they are penalty points then person A wins? If that is what you mean, then I think that is a very important thing to model but I don't know how to model it, or what to call it (ranking order?). It's likely going to be more generic than just this property, so I suggest asking at project chat. I'll keep thinking though. Thryduulf (talk) 23:52, 16 October 2016 (UTC)[reply]
Yes, that what I mean. Sorry about my English. Should I wait for this discussion to close because I ask at project chat? Having this property approved would be more easy to explain. Xaris333 (talk) 00:56, 17 October 2016 (UTC)[reply]
I don't think there is a need to wait. Thryduulf (talk) 08:45, 17 October 2016 (UTC)[reply]
Well, why not replace "points" with "most points" above? Same thing with "most goals scored" and/or "least goal conceded". Things that could be useful is also "highest quotient between scored and conceded goals". "best results in individual games between the competitors with the same number of points", "most goals scored as away team", "lottery" etc. -- Innocent bystander (talk) 10:41, 17 October 2016 (UTC)[reply]
Great idea. Thanks. Xaris333 (talk) 16:55, 17 October 2016 (UTC)[reply]
  •   Comment A lot of implicit stuffs here. We currently can't express a rule to affect a number of points to an event for example ...
    for example in soccer the rules usually looks like:
    • ⟨ subject ⟩ event allow to score Search ⟨ match winning ⟩
      scored points Search ⟨ 3 ⟩
      classification table type Search ⟨ main point number ⟩
    • ⟨ subject ⟩ event allow to score Search ⟨ match draw ⟩
      scored points Search ⟨ 1 ⟩
      classification table type Search ⟨ main point number ⟩
    • ⟨ subject ⟩ event allow to score Search ⟨ goal in the adverse team in a match ⟩
      scored points Search ⟨ 1 ⟩
      classification table type Search ⟨ best attack ⟩
    • ⟨ subject ⟩ event allow to score Search ⟨ goal taken in a match ⟩
      scored points Search ⟨ -1 ⟩
      classification table type Search ⟨ best defense ⟩
    A league could have as many classification table as needed :
    • ⟨ subject ⟩ classification table type Search ⟨ league main point number ⟩
    • ⟨ subject ⟩ classification table type Search ⟨ league best attack ⟩
    • ⟨ subject ⟩ classification table type Search ⟨ league best defense ⟩
    and a main classification table
    • ⟨ league ⟩ main classification table Search ⟨ league main classification ⟩
    A league has a number of type of subcompetitions that allows to score :
    • ⟨ league ⟩ type of plays Search ⟨ association football match ⟩
    The tricky part would be to express that the "main classification rule" depends on the place in other classification table, and I'd propose to put this in the league main classification item. Usually the main classification depends of the classification on base classifications like "main point number" in some lexicographical order (Q1144915)     . I'd proposed to modify the current proposal to express this:
    • rename the proposal "lexically ordered by" and put the statements:
    • ⟨ league main classification ⟩ lexically ordered by Search ⟨  league main point number ⟩
      series ordinal (P1545)   ⟨  1  ⟩
    • ⟨ league main classification ⟩ lexically ordered by Search ⟨  league best attack  ⟩
      series ordinal (P1545)   ⟨  2  ⟩
    • ⟨ league main classification ⟩ lexically ordered by Search ⟨  league best defense  ⟩
      series ordinal (P1545)   ⟨  3  ⟩
    This is way more precise and we have an explicit link beetween events occuring in events on the league and the scores they allows. author  TomT0m / talk page 18:14, 17 October 2016 (UTC)[reply]

TomT0m I am not sure what you are saying. Can you give me an example with 2015–16 Cypriot First Division (Q19906304)? The rules are

  • 1) Points
  • 2) Head-to-head points
  • 3) Head-to-head goal difference
  • 4) Head-to-head goals scored
  • 5) Head-to-head away goals scored (only if two teams)
  • 6) Goal difference
  • 7) Goals scored
  • 8) Play-off (only if deciding championship round, relegation round or relegation).

Xaris333 (talk) 11:23, 22 October 2016 (UTC)[reply]

@Xaris333: The "head to head" case is interesting, it would imply in my model that there is a score board for every pair of team - but its a common case in some international tournament that the winner is decided after two events between the team so it's not useless to figure this out. If there is three team that have the exact same number of points it's a little bit more complicated however ... could you give an example of Head-to-head points If I figure this out correctly if team A, B and C have the same number of points, you rebuild a score board considering only the matches A-B, B-A, A-C, C-A and B-C, C-B ? author  TomT0m / talk page 13:19, 22 October 2016 (UTC)[reply]
@TomT0m: Yes. Like en:2007–08 Cypriot First Division#League table. Alki, Aris, AEL have the same number of points. So the next rule is the head-to-head points. Alki-Aris, Aris-Alki, Alki-AEL, AEL-Alki, Aris-AEL, AEL-Aris. Alki won 7 points for these games, Aris 4 and AEL 3. Xaris333 (talk) 13:39, 22 October 2016 (UTC)[reply]
@Xaris333: Mmm can't find an easy way to model this. The best idea I can think of is to specify that the Head-to-head goals scored is a restriction of Goals scored cosinsidering only some types of events, those who where scored during a match between two of the teams involved in a tight. As it is understood that a set of events allows to build the score, maybe this could simply be modelled by :
*:*
⟨ league main classification ⟩ lexically ordered by Search ⟨  league main point number ⟩
restricted to Search ⟨ events where all participants are in the tie set ⟩
series ordinal (P1545)   ⟨  2  ⟩
Here we know that a winning match allows to score three point in the "league main point number" classification thanks to the statement
⟨ league ⟩ event allow to score Search ⟨ match winning ⟩
scored points Search ⟨ 3 ⟩
classification table type Search ⟨ main point number ⟩
. Say we want to compute who is first of a tie and we only know the classification table type (main point number) and the team in the tie, we would have to query the events that allows to score into main point number - the match winning where all the participants are in the tie. This seem to be enough to build a quite generic algorithm after all ... Assuming all the matches are described using some property like key events Search thanks to these rules and this algorithm we could generate the table on the fly for a number of sports for championship. The tournament / play-off case is to be solved however :) author  TomT0m / talk page 15:34, 22 October 2016 (UTC)[reply]
@TomT0m: I think is better to keep the original idea: use items like most points, most goals/set/points scored, most goals/set/goals conceded, bigger goal difference, more points in individual games between the competitors with the same number of points, bigger goal difference in individual games between the competitors with the same number of points, most away goals scored in individual games between the competitors with the same number of points, bigger goal average or goal ratio etc. Most of them are using in most leagues. Xaris333 (talk) 16:03, 22 October 2016 (UTC)[reply]
@Xaris333: I don't think so - note that my proposal is very close. My proposal allow to describe also stuffs like the number of points that a victory can gives, for example, in the rules of the league. So it allows also to store in a structured way the rules themselves, which is good. It also allows to reflect the fact that different events can score points - say in cyclism there is several classifications in races like the Tour de France (Q33881)      (@Jérémy-Günther-Heinz Jähnick: by the way) so it's also useful in race sports for example. Just using arbitrary item don't tell anything in Wikidata about them - you have to know what they mean to use them in you code, the information is not made explicit by structuring. author  TomT0m / talk page 16:22, 22 October 2016 (UTC)[reply]
@TomT0m: We have league points system (P3195) for the number of points that a victory can gives. Maybe I didn't understand your proposal correctly. I will wait for other users to say their opinion. I just want to say that the rules for classification property is something we need. You can change the proposal the way you are saying. I can't do it by my self. Xaris333 (talk) 16:31, 22 October 2016 (UTC)[reply]
@Xaris333: I was not aware of this property - stuffs are so easy to miss on Wikidata ... is there a project or so for sports I have missed ? That's good and addresses the number of points for an event, but ... What about the different classification boards ? author  TomT0m / talk page 16:38, 22 October 2016 (UTC)[reply]
@TomT0m: I think all the properties are in Template:Sports properties. Do we really need a different classification boards? See 2015–16 Cypriot First Division (Q19906304) (participating team (P1923)). All teams have ranking, points for, number of points/goals conceded, number of points/goals/set scored, losses, matches/games drawn/tied, wins, number of matches played. Does that helps? Xaris333 (talk) 17:08, 22 October 2016 (UTC)[reply]
@Xaris333: Mmm the template is already bloated ... you're really actually using this ? ask @Jérémy-Günther-Heinz Jähnick: for cycle races : best sprinter, best climber, most combative ... Different classification boards are definitely useful for different sports. There is also different classification for players sometimes : by scored goals for example ... http://www.lfp.fr/ligue1/classementButeurs I think the notion of classification is definitely used A LOT in sport. author  TomT0m / talk page 17:28, 22 October 2016 (UTC)[reply]
@TomT0m: OK. Its difficult for me to change the proposal. You can change it or you can propose a new one. Xaris333 (talk) 17:39, 22 October 2016 (UTC)[reply]
Oui, je prévois de faire une demande groupée pour toutes les propriétés de classements annexes, mais ça fait quatre mois que je dis toujours que je vais faire ça demain. Ce n'est pas tant un problème, puisqu'on travaille en ce moment sur une fonction permettant d'afficher une infobox pour les étapes dans une vingtaine de langues potentiellement. Jérémy-Günther-Heinz Jähnick (talk) 17:42, 22 October 2016 (UTC)[reply]
@Jérémy-Günther-Heinz Jähnick: Ce sera ptete pas nécessaire, tu as lu ma proposition ci-dessus ? C'est possible de faire un truc ou on a des éléments pour les tableaux, et d'avoir une propriété générique "a pour classement" à la place. L'idée serait de spécifier dans quel classement les points sont marqués lors d'un événement (genre "tour de france" : "victoire dans un col de première catégorie" => "10 point dans le classement du meilleur grimpeur")
⟨ tour de france ⟩ classement Search ⟨ grand prix de la montagne ⟩
ou un truc dans ce gout là. Tu en penserai quoi ? Ça éviterai d'avoir à créer des propriétés spécifiques pour toutes les compet' du monde. author  TomT0m / talk page 17:49, 22 October 2016 (UTC)[reply]
Théoriquement, on a un système mixte (car pour que des données soient entrées, il faut qu'elles soient lisibles dans les différentes Wikipédias, ce n'est pas encore le temps parce que nous prenons le temps pour développer les fonctions, en moyenne un mois). Sur un article tel que fr:1re étape du Tour de France 2016, qui reste l'exception puisque nous n'en avons que 63 par an, les points attribués seront des classements qui auront leur propre élément grâce au duo results (P2501) et classification of race (P2502). Pour les classements traditionnels comme les équipes au temps, les équipes aux points, les sprints, le meilleur aux points, le meilleur jeune... Ce sera des propriétés particulières. C'est des raisons pratiques, de cette manière on se répartit le travail à la publication des résultats, on évite les conflits d'édition, chacun fait sa part et on progresse plus vite pour que les résultat soient mis en ligne plus vite. Question programmation c'est aussi plus simple puisque par exemple des couleurs sont associées aux différents classements en fonction du maillot que revêt le coureur, pas seulement au niveau de sa couleur mais aussi de sa fonction. C'est déjà planifié et je sais depuis quelques semaines que ça va marcher, il y a eu un véritable boom dans les contributions sur Wikidata (ce qui me rend presque inutile, et me libère pour IRL). En revanche, ce qui nous intéresserait, ce serait de se débarrasser de cette fameuse limite à 500 fonctions IF, parce que c'est la seule chose qui nous pose encore problème. Jérémy-Günther-Heinz Jähnick (talk) 18:56, 22 October 2016 (UTC)[reply]
@Jérémy-Günther-Heinz Jähnick: J'ai pas tout compris. C'est quoi des fonctions IF ? les fonctions "expensive" ? Je comprend pas trop comment des propriétés particulières sont plus efficaces qu'un élément distinct dans lequel on utilise des propriétés génériques non plus - tu veux dire que ce sera des propriétés particulières dans les éléments des coureurs ? Question programmation c'est aussi plus simple Moui, si je comprend bien il s'agit potentiellement de juste connaitre le type du classement (un élément donné genre Q42 pour "classement de la meilleure serviette" au lieux de tester une propriété donnée, c'est aussi simple. Par exemple si on a une seule propriété "classement" (plus une pour "classement général") on aurait genre
⟨ tour de france 2017 ⟩ classement Search ⟨ classement du meilleur jeune 2017 ⟩
et
⟨ classement du meilleur jeune 2017 ⟩ instance of (P31)   ⟨ classement du meilleur jeune 2017 ⟩
. Je comprend pas trop ce que ça changerait en terme de confit d'édition. Sinon pour anticiper la suite, avec la génération automatique de liste il y a moyen qu'on arrive à un truc genre on a un élément "course du col du Tourmalet" en partie d'une étape et qu'en entrant juste le vainqueur la liste se mette à jour automatiquement. Si on a aussi rentré au préalable que c'est un col de hors catégorie et qu'être le premier sur ce type de col rapporte X points au classement de la montagne. Ce vers quoi j'essaye de faire tendre les choses. author  TomT0m / talk page 19:30, 22 October 2016 (UTC)[reply]
Ce que tu décris, c'est ce qui va être utilisé pour les points attribués au passage d'un col par exemple, voir dans le cas donné plus haut le classement du Sprint intermédiaire de La Haye (km 118,5). Ce sont les classements spécifiques à une course. Pour des classements plus habituels au monde du cyclisme, nous avons déjà stage classification (P2417) et general classification of race participants (P2321), ça permet de tout mettre dans l'élément de la course en elle-même et c'est plutôt pratique. Jérémy-Günther-Heinz Jähnick (talk) 08:45, 23 October 2016 (UTC)[reply]
  1.   Support Interested property. For a given sport, we need to know how works the classification, I think at golf. Jérémy-Günther-Heinz Jähnick (talk) 16:33, 22 October 2016