from itertools import permutations
a = [1,2,3]
perm = permutations(a)
print(list(perm))
# [(1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), (3, 2, 1)]
from itertools import combinations
a = [1,2,3,4]
comb = combinations(a, 2)
print(list(comb))
# [(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)]
Num | Distribution | Definition | Usage |
---|---|---|---|
1 | Binomial distribution | Probability of k number of successes in n independent trial | Coin flips (number of heads in n flips) |
2 | Poisson distribution | Number of events occurring within a particular fixed interval ( |
Number of visits to a website in a certain period of time |
Num | Distribution | Definition | Usage |
---|---|---|---|
1 | Uniform distribution | Constant probability of X falling between a and b | In sampling and hypothesis testing cases |
2 | Exponential distribution | Poisson for continous data | The time until a credit defaul occurs |
3 | Normal distribution | Probability according to the bell curve over a range of Xs | The Central Limit Theorem |
Maximum Likelihood Estimation (MLE) and Maximum A Posteriori (MAP) estimation. The difference among them is the inclusion of the prior in MAP. Moreover, MLE can be seen as a special case of MAP with a uniform prior.
Linear regression assumptions
Num | Assumption | Description |
---|---|---|
1 | Linearity | The relationship between the features and the target variable is linear |
2 | Homoscedasticity | The variance of the residuals is constant |
3 | Independence | All observations are independent of each other |
4 | Normality | The distribution of the target variable (Y) is assumed to be normal |