1、本文将双聚类作为一个凸优化问题,提出了一种新的凸双聚类算法(COBRA)来迭代求解。COBRA输出的结果保留了聚类树图的简单可解释性和可视化,并且与现有技术相比还有几个关键优势:
2、L2范数是指向量各元素的平方和,然后求其平方根。(这个值也就是向量的模即向量的长度),由于向量旋转对于长度是不变的,所以根据L2范数的定义可知其大小与旋转变换无关,故L2范数具有旋转不变性。
3、优化问题的两大难题
4、条件数(condition-number),是一个矩阵的稳定性或敏感的的度量,如果一个矩阵的条件数在1附近,那么它就是well-conditioned,如果远大于1,那么它就是ill-conditioned.
5、矩阵范数,假设 A ∈ R n × n A\in R^{n\times n} A∈Rn×n,其矩阵范数定义为:
∣ ∣ A ∣ ∣ = m a x x ≠ 0 ∣ ∣ A x ∣ ∣ ∣ ∣ x ∣ ∣ ||A||=\underset{x\ne0}{max} {\frac{||Ax||}{||x||}} ∣∣A∣∣=x=0max∣∣x∣∣∣∣Ax∣∣
其中 ∣ ∣ x ∣ ∣ ||x|| ∣∣x∣∣是某一向量范数,下面举几个典型范数例子:
l 1 l_{1} l1矩阵范数(列和范数)
∣ ∣ A ∣ ∣ 1 = m a x j ∣ ∣ a . j ∣ ∣ 1 = m a x j ∑ i = 1 n ∣ a i j ∣ ||A||_{1}=\underset{j}{max} {||a_{.j}||_{1}}=\underset{j}{max} \sum_{i=1}^{n}|a_{ij}| ∣∣A∣∣1=jmax∣∣a.j∣∣1=jmaxi=1∑n∣aij∣
l ∞ l_{\infty} l∞矩阵范数(行和范数)
∣ ∣ A ∣ ∣ ∞ = m a x i ∣ ∣ a i . ∣ ∣ 1 = m a x i ∑ j = 1 n ∣ a i j ∣ ||A||_{\infty}=\underset{i}{max} {||a_{i.}||_{1}}=\underset{i}{max} \sum_{j=1}^{n}|a_{ij}| ∣∣A∣∣∞=imax∣∣ai.∣∣1=imaxj=1∑n∣aij∣
l 2 l_{2} l2矩阵范数(谱范数)
∣ ∣ A ∣ ∣ 2 = ( λ A T A ) 1 2 ||A||_{2}=(\lambda_{A^TA})^{\frac{1}{2}} ∣∣A∣∣2=(λATA)21
其中, λ A T A \lambda_{A^TA} λATA表示 A T A A^TA ATA的最大特征值, a . j a_{.j} a.j表示 A A A的第 j j j列, a i . a_{i.} ai.表示 A A A的第 i i i行。
最后给个双聚类的例子来说明什么是双聚类,双聚类就是对行和列都进行聚类。
# Author: Kemal Eren
# License: BSD 3 clause
import numpy as np
from matplotlib import pyplot as plt
from sklearn.datasets import make_checkerboard
from sklearn.cluster import SpectralBiclustering
from sklearn.metrics import consensus_score
n_clusters = (4, 3)
data, rows, columns = make_checkerboard(
shape=(300, 300), n_clusters=n_clusters, noise=10, shuffle=False, random_state=0
)
plt.matshow(data, cmap=plt.cm.Blues)
plt.title("Original dataset")
# shuffle clusters
rng = np.random.RandomState(0)
row_idx = rng.permutation(data.shape[0])
col_idx = rng.permutation(data.shape[1])
data = data[row_idx][:, col_idx]
plt.matshow(data, cmap=plt.cm.Blues)
plt.title("Shuffled dataset")
model = SpectralBiclustering(n_clusters=n_clusters, method="log", random_state=0)
model.fit(data)
score = consensus_score(model.biclusters_, (rows[:, row_idx], columns[:, col_idx]))
print("consensus score: {:.1f}".format(score))
fit_data = data[np.argsort(model.row_labels_)]
fit_data = fit_data[:, np.argsort(model.column_labels_)]
plt.matshow(fit_data, cmap=plt.cm.Blues)
plt.title("After biclustering; rearranged to show biclusters")
plt.matshow(
np.outer(np.sort(model.row_labels_) + 1, np.sort(model.column_labels_) + 1),
cmap=plt.cm.Blues,
)
plt.title("Checkerboard structure of rearranged data")
# plt.show() # 该行不注释,在jupyter notebook中无法显示图片
活动地址:CSDN21天学习挑战赛