Closed KonghaYao closed 1 year ago
中层陷落问题是由于分包时,中文分包的最后几个字符没有进行处理,不过这些字符都是使用率非常低的字符
最新分包算法解决超重问题之后,需要解决较多分包碎片的问题
const skmeans = require("skmeans")
const data = [1,12,13,4,25,21,22,3,14,5,11,2,23,24,15];
const num = 3
const res = skmeans(data,num);
res.idxs.reduce(
(col,cur,index)=>{
col[cur] .push( data[index])
return col
},
[...Array(num).keys()].map(i=>[])
)
[[25, 21, 22, 23, 24], [12, 13, 14, 11, 15], [1, 4, 3, 5, 2]] 可以尝试使用 kmeans 算法进行离群值分析,从而分出数值小的集群,然后合并
kmeans 算法只是聚合了相似的数据,但是对离群最小值没法处理干净
图中为理论分包数,而非实际分包数
z-score 算法能有效削减低分包值