def test_VarianceThreshold():
'''
test the method of VarianceThreshold
:return: None
'''
X=[[100,1,2,3],
[100,4,5,6],
[100,7,8,9],
[101,11,12,13]]
selector=VarianceThreshold(1)
selector.fit(X)
print("Variances is %s"%selector.variances_)
print("After transform is %s"%selector.transform(X))
print("The surport is %s"%selector.get_support(True))
print("After reverse transform is %s"%
selector.inverse_transform(selector.transform(X)))
评论列表
文章目录