我正在尋找覆蓋/替換數組列表中的值的方法,數組列表本身是散列表中的值。 這是我們提供的一些代碼。 public Equations(Double[][] matrix) {
// save input matrix into M -- it represents the equations
M = new HashMap<Integer,ArrayList<Double>>()
我試圖在數據集data = [[x,y],...上實現期望最大化算法(高斯混合模型)... ]。我正在使用mv_norm.pdf(data, mean,cov)函數來計算羣集責任。但COV的後6-7次迭代計算協方差(COV矩陣)的新值之後,COV矩陣是變奇異即行列式爲0(非常小的值),並且因此它給錯誤 ValueError: the input matrix must be positive se