Scikit Learn Local Linear Embedding (LLE):重构错误

问题描述

我正在尝试根据特征值的数量绘制恒星光谱样本的 LLE 重建误差 n_components;我预计会出现指数下降趋势,该趋势与 n_components 一样大,因为 LLE 看起来会随着 eigenvalues增加而最小化重建误差,但我看到了相反的指数增长趋势。也就是说,随着 n_components增加,重建误差似乎呈指数增长。我的代码如下:

eigenspectra = [5,10,15,20,25,30]

var_LLE = [var_LLE_5,var_LLE_10,var_LLE_15,var_LLE_20,var_LLE_25,var_LLE_30]

plt.plot(eigenspectra,var_LLE)

plt.xlabel('Number of Eigenvalues')

plt.ylabel('Reconstruction Error')

plt.title('LLE Reconstruction Error vs Eigenvalues')

哪里:

embedding_LLE_5 = LocallyLinearEmbedding(n_neighbors = 10,n_components = 5,eigen_solver = 'arpack',method= 'standard')

X_trans_LLE_5 = embedding_LLE_5.fit_transform(X)

var_LLE_5 = embedding_LLE_5.reconstruction_error_

其中 n_components 增加 5 等等。

有什么我遗漏的吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)