Wednesday, 8 June 2016

Machine Learning – a unifying perspective & new paths

Pedro Domingos in his new book, “The Master Algorithm”, has done us a huge favor. As is true of any emerging technology field, Machine Learning (ML) is a “bag of tricks” today; it takes a while for a unifying framework to emerge. Then, one can see various aspects of ML as special cases of a general theory rather than a grab-bag of tools and techniques.
Pedro has taken a great early step to such unification. He has collected all major ML initiatives into a taxonomy that makes sense; five schools of thought: the evolutionaries, connectionists, symbolists, Bayesians, and analogizers. I believe this does not go far enough in the unification of ML thought however . . .
From the early days of “ML”, I see Pattern Recognition and Classification as a better unifying perspective. In particular, the classic textbook of Duda & Hart, “Pattern Classification & Scene Analysis”, published in 1973 is my starting point!
Duda & Hart’s approach in simple terms is as follows. Given labelled samples, obtain a class description consisting of either a distance metric (Euclidean, intra-class, etc.) or a probability density function and then derive a decision rule (Maximum A-posteriori Probability, Bayes, etc.) from the description. The decision rule specifies a decision boundary in feature space among classes.
Alternatively, decision surface can be derived directly from labelled samples which is then called a “Discriminant Function”, perceptron being an example. Then, most if not all current ML techniques can be seen as dueling methods to derive Discriminant Functions!
Discriminant Functions can be linear or nonlinear (neural network with back-propagation, deep learning, support vector machines, kernel PCA, etc.) and outputs can be binary, integer or real valued. Various learning algorithms can be seen as belonging to the family of iterative/ recursive/ adaptive learning algorithms (Least Mean Square being a great old standby!) that update the parameters of the Discriminant Function as new data arrive.
In the discussion above, features were considered as “static” and not context-sensitive (for identifying a word within a sentence as an example). Context-sensitivity or Dynamics can be added to improve classification by incorporating Markov models (or Hidden Markov Models for tractable computations). Markov model is a special case of State Space Models which are well-studied in Systems Theory.
Setting aside Supervised Classification when labelled samples (or “desired signals”) are available, what can we do when there is no supervision? This is the realm of much harder Unsupervised Learning, which is very useful in transforming basic features into more and more meaningful ones. One usually brings in some overall desirable property to guide unsupervised learning. From the domain of “blind processing” (Radar signal processing, for example), Mutual Information among classes can be minimized as a learning process in the belief that the “best” classification happens when the classes have least overlapping information (better “efficiency” in representation).
Instead of entropy-related quantities that are hard to estimate, it is likely that Scale of Fluctuation which is related to “order” and “state space volume” may be a quantity to optimize for a new unsupervised learning process. 
In all of the existing ML bags of tricks, we are still staying at the surface level! We are modeling the attributes or data DIRECTLY. What if we went one level deeper? Model the SYSTEM that generates the data!Syzen Analytics, Inc., takes such an explicit approach in what we call “SYSTEMS” Analytics” which has already demonstrated significant value in business applications.
In Syzen Analytics, Inc.’s retail commerce application, our Systems Analytics approach hypothesizes that there is a system, either explicit or implicit, behind the scenes generating customer purchase behaviors and purchase propensities. This ‘one-level-deeper system model parameters’ can be more effective for pattern recognition and classification purposes instead of the data that the model generates! There is a long history of model parameters providing better estimates (in power spectrum analysis, for example). Scale of Fluctuation mentioned earlier seems to have another desirable property of quantifying “coupling” among deeper-level model parameters.
Context-sensitivity dynamics is a very good avenue to exploit. The dynamics could be over any independent variable (time always comes to mind first but it is only one of the possibilities).
Extensions to Systems Analytics in the future will be inspired by the insight that in reality, data exist in *embedded* forms in preference and influence networks which are distributed in time and space” AND other independent dimensions (shopper preference, for example).
Let me pull all of the notions discussed so far into a diagram.
Screen Shot 2015-12-03 at 9.55.37 AM
Once the patterns have been recognized and classes identified, the resulting classes can be used for all sorts of applications such as Recommendation Engine, Language Translation, Fraud Detection and many others. The approach I outline above allows you to take a unified approach till the application development stage. In doing so, the unified approach also points out new paths ahead for ML!
Some readers would have noticed an undertow of dichotomies while reading this “opinion piece”: Theoretic vs Heuristic; Formal vs Ad hoc; Mathematics vs AI; Electrical Engineering vs Computer Science academic departmental affiliations! I am firmly in the former camps. However, as an engineer, I am personally happy to start with heuristic solutions but quickly put them on firm mathematical foundations before “gotchas” and unintended consequences of ad hoc methods catch up with me. J
The unification of ML proposed here opens up a multilane highway – join the journey and create more breakthroughs with us or on your own!

In this blog, I have not provided many references – web search will get you most; Pedro Domingos’ “The Master Algorithm” book is an excellent source of ML-related literature. For the newer and less familiar work, please contact me directly.

Tuesday, 7 June 2016

Data Mining for Strategy development in Football

The application of data mining and analysis techniques is not new to football. However, it has not been exploited to its potential by football clubs in India.
A team of Industrial Engineering students from College of Engineering Trivandrum, completed a project on Football Analytics. The football analytics system developed includes methods for data collection from matches, algorithms to extract meaningful results and patterns of play from the data and methods of visualization of the findings. The patterns in passing and movement of players can be used as a tool for building the right strategy against the opposition. This vital information about the team and players makes the difference between winning and losing.
Attached below is the report of the match between Atletico Paranaense and Shamrock Rovers which was analysed using this system.

MATCH REPORT (FIRST HALF)

ATLETICO PARANAENSE vs SHAMROCK ROVERS

Match             : 1st Semi-final
Time                : 19:00 hrs
Date                : 18 February, 2016
Venue              : EMS Corporation Stadium, Kozhikode, Kerala
Tournament    : Sait Nagjee International Club Football 2016
The algorithms when implemented on the datasets collected gave the following results:
  1. GENERAL STATISTICS
Total Passes in first half         : 335
Atletico Paranaense:
  • Total Passes             : 338 (63.2%)
  • Successful passes : 273 (80.77%)
  • Failed passes : 65 (19.23%)
  • Very short passes : 44 (13%)
  • Short passes : 164 (49%)
  • Long passes : 102 (30%)
  • Long overhead pass : 28 (8%)
Shamrock Rovers:
  • Total Passes             : 197 (36.8%)
  • Successful passes : 134 (68.1%)
  • Failed passes : 63 (31.9%)
  • Very short passes : 20 (10%)
  • Short passes             : 90 (46%)
  • Long passes             : 55 (28%)
  • Long overhead pass : 32 (16%)

PASSES VISUALISATION OF ATLETICO PARANAENSE

All the passes made in a match can be visualised, helping teams and players know their strengths and weaknesses in passing. Different passes visualisation have been done by classifying passes on the basis of outcome of the pass, the player that makes the pass, the type of pass based on distance of the pass namely very short pass, short pass, long pass and long overhead pass.
Fig 1: Visualization of passes based on position
Fig 1: Visualization of passes based on position
Fig 2: Visualization of passes of each player
Fig 2: Visualization of passes of each player
GIF 03
Fig 3: Visualization of passes based on length of passes
  • Center defenders : Players 3 and 13
  • Wing defenders : Players 2 and 6
  • Midfielders : Players 5 and 17
  • Forwards : Players 8, 10 and 16
  • Striker : Player 11
  • Successful Passes : Blue colour
  • Failed Passes : Red colour
Base on length of passes:
  • Very short passes : less than 7 meters
  • Short passes : 7 to 21 meters
  • Long passes : greater than 21 meters

PASSING COMBINATION

Passing combination identifies the number of passes made between different players of the same team and can reveal the passing patterns of a player, who he passes to and from whom he receives passes frequently. The rows represent the player at the ‘from’ end of the pass and columns represent the player at the ‘to’ end of the pass.
Table 1: Passing combination of Atletico Paranaense
123567810111316Total
101203030011130
23230609581147
36561414102140
5204725721333
62084415362145
7091342610228
8013630760127
10030135150422
11050131230116
138102004102229
16081211211118
Total2141332637243537282527335

DISTANCE AND SPEED OF PLAYERS

The distance run by and speed of the players were calculated using algorithms from the tracking data of a few minutes.
Table 2: Distance run and average speed of players of Atletico Paranaense
Player Jersey numberDistance in metersSpeed in meters/second
1202.94331.514502
2664.78074.96105
3640.41984.779252
5745.55035.563808
6917.05956.843727
7809.54596.041387
8698.23025.210673
10829.26946.188578
11691.86645.163182
13546.43144.077846
16674.62285.034499
Speed profile of a player shows the sprints made by the player during the game. Gradual dip in the average speed values towards the end of the game for ageing players can be used to substitute them.
footballFig 4: Speed profile of Player 11 of Atletico Paranaense

AVERAGE TEAM FORMATION

Team formation is the arrangement of players of a team on the field. The formation varies depending on the strategy of the team. The team formation of Atletico Paranaense for this match was 4-2-3-1.
Even though the players have an assigned region to play, it was found they move significantly from their positions. The average team formation can plot their mean position of play.
footballFig 5: Average team formation of Atletico Paranaense
The statistics generated reveals areas of strength and weaknesses of the team. The visualisation of passes show patterns of play of the team and the players. The distance run by players and their speed profile can be used to substitute the players that show a below average performance. The passing combination reveals the sync between different players around whom the game revolves.
AUTHOR INFO:
Sushant T. Eapen I did this project on Football Analytics out of my passion for football, analytics, coding and sports photography. Quite a crazy combination!The other members of my team that did this project are:
  1. Cyriac Pius
  2. Harikrishnan Menoth
  3. Navaneeth K S