The k-means algorithm is a popular data clustering technique due to its speed and simplicity. However, it is susceptible to issues such as sensitivity to the chosen seeds, and inaccurate clusters due to poor initial s...The k-means algorithm is a popular data clustering technique due to its speed and simplicity. However, it is susceptible to issues such as sensitivity to the chosen seeds, and inaccurate clusters due to poor initial seeds, particularly in complex datasets or datasets with non-spherical clusters. In this paper, a Comprehensive K-Means Clustering algorithm is presented, in which multiple trials of k-means are performed on a given dataset. The clustering results from each trial are transformed into a five-dimensional data point, containing the scope values of the x and y coordinates of the clusters along with the number of points within that cluster. A graph is then generated displaying the configuration of these points using Principal Component Analysis (PCA), from which we can observe and determine the common clustering patterns in the dataset. The robustness and strength of these patterns are then examined by observing the variance of the results of each trial, wherein a different subset of the data keeping a certain percentage of original data points is clustered. By aggregating information from multiple trials, we can distinguish clusters that consistently emerge across different runs from those that are more sensitive or unlikely, hence deriving more reliable conclusions about the underlying structure of complex datasets. Our experiments show that our algorithm is able to find the most common associations between different dimensions of data over multiple trials, often more accurately than other algorithms, as well as measure stability of these clusters, an ability that other k-means algorithms lack.展开更多
针对电池储能系统(battery energy storage system,BESS)进行光伏波动平抑时寿命损耗高及荷电状态(state of charge,SOC)一致性差的问题,提出了光伏波动平抑下改进K-means的BESS动态分组控制策略。首先,采用最小最大调度方法获取光伏并...针对电池储能系统(battery energy storage system,BESS)进行光伏波动平抑时寿命损耗高及荷电状态(state of charge,SOC)一致性差的问题,提出了光伏波动平抑下改进K-means的BESS动态分组控制策略。首先,采用最小最大调度方法获取光伏并网指令。其次,设计了改进侏儒猫鼬优化算法(improved dwarf mongoose optimizer,IDMO),并利用它对传统K-means聚类算法进行改进,加快了聚类速度。接着,制定了电池单元动态分组原则,并根据电池单元SOC利用改进K-means将其分为3个电池组。然后,设计了基于充放电函数的电池单元SOC一致性功率分配方法,并据此提出BESS双层功率分配策略,上层确定电池组充放电顺序及指令,下层计算电池单元充放电指令。对所提策略进行仿真验证,结果表明,所设计的IDMO具有更高的寻优精度及更快的寻优速度。所提BESS平抑光伏波动策略在有效平抑波动的同时,降低了BESS运行寿命损耗并提高了电池单元SOC的均衡性。展开更多
为了充分利用实际高速公路路段交通拥堵信息,更合理地聚类交通拥堵的内在规律和特征变化,提出自适应确定聚类中心C和类别K值(adaptive center and K-means value,ACK-Means)的聚类算法,进行高速公路拥堵路段聚类。ACK-Means算法借助簇...为了充分利用实际高速公路路段交通拥堵信息,更合理地聚类交通拥堵的内在规律和特征变化,提出自适应确定聚类中心C和类别K值(adaptive center and K-means value,ACK-Means)的聚类算法,进行高速公路拥堵路段聚类。ACK-Means算法借助簇类密度、簇类间距以及簇类强度,同时又考虑到数据样本的偶然性,对离群点进行合理分配,ACK-Means算法可实现自适应确定聚类中心C和类别K值。基于实际交通拥堵信息构建数据集,Python编程实现高速公路拥堵路段ACK-Means聚类,巧妙解决了高速公路拥堵路段聚类数目K和聚类中心C设定问题。聚类结果表明,ACK-Means算法实现高速公路拥堵路段无监督聚类,聚类结果完全基于实际的高速公路交通拥堵信息,具有更高的实用性。展开更多
受限于自然条件,光伏出力具有很强的随机性。为准确评估轨道交通基础设施分布式光伏发电的光伏出力特性,提出一种基于改进K-means聚类算法的轨道交通基础设施分布式光伏发电典型场景生成方法,并基于此进行光伏出力特性分析。首先,基于...受限于自然条件,光伏出力具有很强的随机性。为准确评估轨道交通基础设施分布式光伏发电的光伏出力特性,提出一种基于改进K-means聚类算法的轨道交通基础设施分布式光伏发电典型场景生成方法,并基于此进行光伏出力特性分析。首先,基于分布式光伏发电设施以及气象数据,利用PVsyst软件模拟光伏发电出力数据。然后,针对基本K-means聚类算法聚类参数和初始聚类中心盲目性高的问题,结合聚类有效性指标(Density based index,DBI)和层次聚类对其进行改进并利用改进K-means聚类算法生成光伏典型日出力场景。最后,基于华中地区某地轨道交通基础设施分布式光伏系统对所提方法的有效性和优越性进行验证,并通过定性和定量分析各典型场景的出力特性揭示轨道交通基础设施分布式光伏出力的规律和特点。展开更多
离群点检测任务是指检测与正常数据在特征属性上存在显著差异的异常数据。大多数基于聚类的离群点检测方法主要从全局角度对数据集中的离群点进行检测,而对局部离群点的检测性能较弱。基于此,本文通过引入快速搜索和发现密度峰值方法改...离群点检测任务是指检测与正常数据在特征属性上存在显著差异的异常数据。大多数基于聚类的离群点检测方法主要从全局角度对数据集中的离群点进行检测,而对局部离群点的检测性能较弱。基于此,本文通过引入快速搜索和发现密度峰值方法改进K-means聚类算法,提出了一种名为KLOD(local outlier detection based on improved K-means and least-squares methods)的局部离群点检测方法,以实现对局部离群点的精确检测。首先,利用快速搜索和发现密度峰值方法计算数据点的局部密度和相对距离,并将二者相乘得到γ值。其次,将γ值降序排序,利用肘部法则选择γ值最大的k个数据点作为K-means聚类算法的初始聚类中心。然后,通过K-means聚类算法将数据集聚类成k个簇,计算数据点在每个维度上的目标函数值并进行升序排列。接着,确定数据点的每个维度的离散程度并选择适当的拟合函数和拟合点,通过最小二乘法对升序排列的每个簇的每1维目标函数值进行函数拟合并求导,以获取变化率。最后,结合信息熵,将每个数据点的每个维度目标函数值乘以相应的变化率进行加权,得到最终的异常得分,并将异常值得分较高的top-n个数据点视为离群点。通过人工数据集和UCI数据集,对KLOD、LOF和KNN方法在准确度上进行仿真实验对比。结果表明KLOD方法相较于KNN和LOF方法具有更高的准确度。本文提出的KLOD方法能够有效改善K-means聚类算法的聚类效果,并且在局部离群点检测方面具有较好的精度和性能。展开更多
文摘The k-means algorithm is a popular data clustering technique due to its speed and simplicity. However, it is susceptible to issues such as sensitivity to the chosen seeds, and inaccurate clusters due to poor initial seeds, particularly in complex datasets or datasets with non-spherical clusters. In this paper, a Comprehensive K-Means Clustering algorithm is presented, in which multiple trials of k-means are performed on a given dataset. The clustering results from each trial are transformed into a five-dimensional data point, containing the scope values of the x and y coordinates of the clusters along with the number of points within that cluster. A graph is then generated displaying the configuration of these points using Principal Component Analysis (PCA), from which we can observe and determine the common clustering patterns in the dataset. The robustness and strength of these patterns are then examined by observing the variance of the results of each trial, wherein a different subset of the data keeping a certain percentage of original data points is clustered. By aggregating information from multiple trials, we can distinguish clusters that consistently emerge across different runs from those that are more sensitive or unlikely, hence deriving more reliable conclusions about the underlying structure of complex datasets. Our experiments show that our algorithm is able to find the most common associations between different dimensions of data over multiple trials, often more accurately than other algorithms, as well as measure stability of these clusters, an ability that other k-means algorithms lack.
文摘针对电池储能系统(battery energy storage system,BESS)进行光伏波动平抑时寿命损耗高及荷电状态(state of charge,SOC)一致性差的问题,提出了光伏波动平抑下改进K-means的BESS动态分组控制策略。首先,采用最小最大调度方法获取光伏并网指令。其次,设计了改进侏儒猫鼬优化算法(improved dwarf mongoose optimizer,IDMO),并利用它对传统K-means聚类算法进行改进,加快了聚类速度。接着,制定了电池单元动态分组原则,并根据电池单元SOC利用改进K-means将其分为3个电池组。然后,设计了基于充放电函数的电池单元SOC一致性功率分配方法,并据此提出BESS双层功率分配策略,上层确定电池组充放电顺序及指令,下层计算电池单元充放电指令。对所提策略进行仿真验证,结果表明,所设计的IDMO具有更高的寻优精度及更快的寻优速度。所提BESS平抑光伏波动策略在有效平抑波动的同时,降低了BESS运行寿命损耗并提高了电池单元SOC的均衡性。
文摘为了充分利用实际高速公路路段交通拥堵信息,更合理地聚类交通拥堵的内在规律和特征变化,提出自适应确定聚类中心C和类别K值(adaptive center and K-means value,ACK-Means)的聚类算法,进行高速公路拥堵路段聚类。ACK-Means算法借助簇类密度、簇类间距以及簇类强度,同时又考虑到数据样本的偶然性,对离群点进行合理分配,ACK-Means算法可实现自适应确定聚类中心C和类别K值。基于实际交通拥堵信息构建数据集,Python编程实现高速公路拥堵路段ACK-Means聚类,巧妙解决了高速公路拥堵路段聚类数目K和聚类中心C设定问题。聚类结果表明,ACK-Means算法实现高速公路拥堵路段无监督聚类,聚类结果完全基于实际的高速公路交通拥堵信息,具有更高的实用性。
文摘受限于自然条件,光伏出力具有很强的随机性。为准确评估轨道交通基础设施分布式光伏发电的光伏出力特性,提出一种基于改进K-means聚类算法的轨道交通基础设施分布式光伏发电典型场景生成方法,并基于此进行光伏出力特性分析。首先,基于分布式光伏发电设施以及气象数据,利用PVsyst软件模拟光伏发电出力数据。然后,针对基本K-means聚类算法聚类参数和初始聚类中心盲目性高的问题,结合聚类有效性指标(Density based index,DBI)和层次聚类对其进行改进并利用改进K-means聚类算法生成光伏典型日出力场景。最后,基于华中地区某地轨道交通基础设施分布式光伏系统对所提方法的有效性和优越性进行验证,并通过定性和定量分析各典型场景的出力特性揭示轨道交通基础设施分布式光伏出力的规律和特点。
文摘离群点检测任务是指检测与正常数据在特征属性上存在显著差异的异常数据。大多数基于聚类的离群点检测方法主要从全局角度对数据集中的离群点进行检测,而对局部离群点的检测性能较弱。基于此,本文通过引入快速搜索和发现密度峰值方法改进K-means聚类算法,提出了一种名为KLOD(local outlier detection based on improved K-means and least-squares methods)的局部离群点检测方法,以实现对局部离群点的精确检测。首先,利用快速搜索和发现密度峰值方法计算数据点的局部密度和相对距离,并将二者相乘得到γ值。其次,将γ值降序排序,利用肘部法则选择γ值最大的k个数据点作为K-means聚类算法的初始聚类中心。然后,通过K-means聚类算法将数据集聚类成k个簇,计算数据点在每个维度上的目标函数值并进行升序排列。接着,确定数据点的每个维度的离散程度并选择适当的拟合函数和拟合点,通过最小二乘法对升序排列的每个簇的每1维目标函数值进行函数拟合并求导,以获取变化率。最后,结合信息熵,将每个数据点的每个维度目标函数值乘以相应的变化率进行加权,得到最终的异常得分,并将异常值得分较高的top-n个数据点视为离群点。通过人工数据集和UCI数据集,对KLOD、LOF和KNN方法在准确度上进行仿真实验对比。结果表明KLOD方法相较于KNN和LOF方法具有更高的准确度。本文提出的KLOD方法能够有效改善K-means聚类算法的聚类效果,并且在局部离群点检测方面具有较好的精度和性能。