lec7 的内容主要在于 区分各种概念,例如机器学习,分类聚类等,然后有几个公式需要记,已经记在 cheatsheet 上了。

apriori 算法
通俗来讲,就是通过所有的频繁的组合都是由单一的频繁项来组成的。比如说,A,B,C,D 四个元素,首先构造一个 min_support , 然后进行迭代,先剪枝掉元素中 k< min_support 的元素,再对剩余元素进行排列组合,最终得到频率最高的组合。

Rule Generation 可以说是枚举法,对所有可能的组合都进行枚举,将组合的所有非空真子集列出来,并将这些候选进行区分。
Efficient Rule Generation 在前者基础上,由于
c (ABC→D)≥c (AB→CD)≥c (A→BCD),所以当我们直到第一个不符合的时候,后续的也不必列出了,因此大大降低了无效筛选

lec8

k-means 算法

1
2
3
4
5
1: Select K points as the initial centroids.
2: repeat
3: Form K clusters by assigning all points to the closest centroid.
4: Recompute the centroid of each cluster.
5: until the centroids don’t change

就是,设置 k 个中心点,然后将这一些点分成 k 个聚类,然后重新分组,直到收敛
重新计算质心的过程就是计算每个点和其他点的距离,然后选距离和最小的一个点

To get SSE, we square these errors and sum them. SSE=i=1KxCidist2(mi,x)\mathrm{SSE} = \sum_{i=1}^{K} \sum_{x \in C_i} \mathrm{dist}^2(m_i, x)

  • Cluster 1: [2, 4] with centroid at 3 Squared error for each cluster: SE1=(23)2+(43)2=1+1=2\text{SE1} = (2 - 3)^2 + (4 - 3)^2 = 1 + 1 = 2
更新于 阅读次数

请我喝[茶]~( ̄▽ ̄)~*

IRON 微信支付

微信支付

IRON 支付宝

支付宝

IRON 贝宝

贝宝