def test_LocallyLinearEmbedding(*data):
'''
test the LLE method
:param data: train_data, train_value
:return: None
'''
X,y=data
for n in [4,3,2,1]:
lle=manifold.LocallyLinearEmbedding(n_components=n)
lle.fit(X)
print('reconstruction_error(n_components=%d) : %s'%
(n, lle.reconstruction_error_))
评论列表
文章目录