首页 > 其他分享 >sklearn选择方差大于指定数的特征

sklearn选择方差大于指定数的特征

时间:2022-12-09 10:44:55浏览次数:39  
标签:方差 指定 train pd test import data sklearn

from sqlite3 import Row import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy import stats from sklearn.feature_selection import VarianceThreshold train_data='zhengqi_train.txt' test_data='zhengqi_test.txt' train=pd.read_csv(train_data,sep='\t',encoding='utf-8') test=pd.read_csv(test_data,sep='\t',encoding='utf-8') train=train.drop(['V5','V9','V11','V17','V22','V28'],axis=1) print(VarianceThreshold(threshold=0.1).fit_transform(train) )

标签:方差,指定,train,pd,test,import,data,sklearn
From: https://www.cnblogs.com/hahaah/p/16968264.html

相关文章