Machine Learning, Python, Julia, Algorithms, R.
and sum these differences. Finally, we calculate the between-class scatter matrix, which measures the separation between two classes. To do this, we take the difference between the mean vectors for the two classes and then multiply this difference by the inverse of the within-class scatter matrix.