Visual and Data Analysis - FIFA 19 Players

5. Analysis of Similarity

Loading main libraries and data

Apply PCA with Standardization

Apply Similarity Functions

Similarity function used

$$ cosine(X, Y) = cos(\theta) = \frac{\vec{X}.\vec{Y}}{\|\vec{X}\|.\|\vec{Y}\|} = \frac{\sum_{i=1}^n X_i.Y_i}{\sqrt{\sum_{i=1}^n X_i^2}.\sqrt{\sum_{i=1}^n Y_i^2}} $$

Correlation matrix between Players

Step 1 - Transpose the matrix by Players

Step 2 - Calculate Pearson correlation matrix

$$ pearson(X, Y) = \frac{cov(X, Y)}{\sigma_X . \sigma_Y} = \frac{\sum_{i=1}^n (X_i - \bar{X}).(Y_i - \bar{Y})}{\sqrt{\sum_{i=1}^n (X_i - \bar{X})^2 . (Y_i - \bar{Y})^2}} $$

Step 3 - Plot the correlation matrix

Insights


« Home