举例说明吧,路径一定要带转义符‘\’,下面的例子中,每一行是一个样本的feature
>>> myfile=open("D:\\301\\graduate_thesis\\分类实验\\属性选取\\feature_label_data_2016_01_02\\07feature.txt","r");
>>> feature=myfile.read();
>>> feature=feature.split(‘\n‘);
时间: 2024-10-27 03:33:48
举例说明吧,路径一定要带转义符‘\’,下面的例子中,每一行是一个样本的feature
>>> myfile=open("D:\\301\\graduate_thesis\\分类实验\\属性选取\\feature_label_data_2016_01_02\\07feature.txt","r");
>>> feature=myfile.read();
>>> feature=feature.split(‘\n‘);