array - one-dim container for elements of same data type.
matrix - two-dim container for elements stored in an array.
dot product
how much of the force vector is applied in the direction of the motion vector.
measure the angle formed by a pair of vectors
the position of a vector relative to the coordinate axes
simple test to determine whether two vectors meet at a right angle
| 2 |
| 1 2 3 | . | 3 | = 1*2 + 2*3 + 3*4 = 20
| 4 |
| a b | . | e f | = | ae + bg af + bh |
| c d | | g h | | ce + dg cf + dh |
| 1 2 | . | 1 2 | = | 1*1 + 1*2 | 2*1 + 2*2 | = | 3 6 |
| 3 4 | | 1 2 | | 1*3 + 1*4 | 2*3 + 2*4 | | 7 14 |
Two categories of descriptive statistics
Statistics that describe the values of observations in a variable.
Statistics that describe a variable’s spread
Uses of descriptive statistics
Identify outliers
Planning data for machine learning
Selecting features for machine learning
Involves limited and fixed set of values.
Easily grouped data.
Described with counts, variable descriptions, groupings.
Crosstab - Cross tabulation of 2 or more features, by default shows frequency counts for features.
A method to find correlation between linearly related, continuous, numeric variables.
Correlation does not imply causation.
Pearson correlation coefficient R:
Pearson correlation assumes:
Binomial (assumes 1 of 2 values) or multinomial variables (gear=3,4,5) will not work. These are categorical variables.
Use Pearson Correlation to uncover linear relationships between variables.
Can not use Pearson Correlation to rule out non-linear relationships between variables.
Find correlation between categorical, non-linear, non-normal, distributed variables.
Spearman’s rank correlation
Chi-squared tables
Scaling and transforming variables.
Avoids erroneous or misleading results.
Scale it to prepare for machine learning.
Two ways to scale data:
Use scikit-learn pre-processor to scale, center, normalize, bin, or impute data.
Most machine learning methods assume data has been treated for outliers.
Detecting outliers can be a data processing task or analytic method.
Use it to uncover anomolies in data.
Use it in fraud analysis, cyber security, even detection
Univariate Method: Tukey boxplots
Tukey Outlier Method: Tukey Outlier Labeling
Outliers that appear within combinations of observations of two or more variables
Using scatter plot matrices to find outliers