AI
haiya2001
不想上班!!!
展开
-
python 实现手肘法
手肘法是一种用于确定 K 值的方法,其中 K 值是聚类中心的数量。该方法是通过计算不同 K 值对应的 SSE 值(误差平方和)来实现的。SSE 表示数据点与其所属簇质心之间的距离平方和,因此,SSE 越小,则表示聚类结果越好。在手肘法中,首先需要将数据集聚成不同数量的簇,计算对应的 SSE 值。通常情况下,当簇的数量增加时,SSE 值也会随之减小。但是,随着簇的数量增加,SSE 的减小幅度会逐渐变缓,因为增加更多的簇会导致一些数据点成为离群点,从而使得 SSE 值不再减小。原创 2023-04-04 14:00:14 · 1242 阅读 · 0 评论 -
python 实现简单的KMediod
K-medoids 是 K-means 算法的一种改进算法,可以解决 K-means 中不稳定的问题,是一种基于聚类中心的距离度量方法,因此也被称为 partitioning around medoids (PAM)。本篇博客将介绍 K-medoids 算法的原理和实现过程,并用 Python 实现一个 K-medoids 算法。原创 2023-04-04 13:55:58 · 1065 阅读 · 0 评论 -
tensorflow2.4.1 无法使用gpu,只能用cpu
error:E tensorflow/stream_executor/cuda/cuda_blas.cc:226] failed to createcublas handle: CUBLAS_STATUS_ALLOC_FAILEDtensorflow.python.framework.errors_impl.InternalError: Blas GEMM launch failed : a.shape=(100, 2048)跑训练的时候发现只能用cpu跑,gpu根本不动后面发现是sessio原创 2021-08-11 20:57:32 · 885 阅读 · 0 评论