使用leaps库在R中选择最佳子集时出错

时间:2014-03-03 05:46:41

标签: r machine-learning

使用的命令:

library(leaps);
t <- read.csv("trainingset2.csv");
regfit.full = regsubsets(self_containment_index ~.,data = t)

我收到以下错误:

 Error in numeric(nbest * nvmax) : vector size cannot be infinite

In addition: Warning messages:
1: In cbind(1, xx) :
  number of rows of result is not a multiple of vector length (arg 1)
2: In leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in,  :
  291  linear dependencies found
3: In max((1:np)[!rightorder]) :
  no non-missing arguments to max; returning -Inf
4: In leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in,  :
  nvmax reduced to  -Inf
5: In leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in,  :
  NAs introduced by coercion

使用head -2 trainingset2.csv

的数据快照
 "self_containment_index","competiting_sub_structures","competiting_valid_sub_structures","modified_alternate_paths","modified_good_alternate_paths","modified_bad_alternate_paths","modified_alternate_structures","modified_alternate_structure_score","modified_alternate_graph_structures","modified_competiting_sub_structures","modified_competiting_valid_sub_structures","degree_of_mutation_valid_def1","degree_of_mutation_valid_def2","degree_of_mutation_valid_def3","degree_of_mutation_valid_def5","degree_of_mutation_def1","degree_of_mutation_def2","degree_of_mutation_def3","degree_of_mutation_def5","degree_of_mutation_def1_energy_range","degree_of_mutation_def2_energy_range","degree_of_mutation_def3_energy_range","degree_of_mutation_def5_energy_range","mirna_score2","mirna_score3","competiting_sub_structures_ratio","competiting_valid_sub_structures_ratio","modified_alternate_paths_ratio","modified_good_alternate_paths_ratio","modified_bad_alternate_paths_ratio","modified_alternate_structures_ratio","modified_alternate_structure_score_ratio","modified_alternate_graph_structures_ratio","modified_competiting_sub_structures_ratio","modified_competiting_valid_sub_structures_ratio","degree_of_mutation_valid_def1_ratio","degree_of_mutation_valid_def2_ratio","degree_of_mutation_valid_def3_ratio","degree_of_mutation_valid_def5_ratio","degree_of_mutation_def1_ratio","degree_of_mutation_def2_ratio","degree_of_mutation_def3_ratio","degree_of_mutation_def5_ratio","degree_of_mutation_def1_energy_range_ratio","degree_of_mutation_def2_energy_range_ratio","degree_of_mutation_def3_energy_range_ratio","degree_of_mutation_def5_energy_range_ratio","mirna_score2_ratio","mirna_score3_ratio","degree_of_precursor_graph_validity","degree_of_precursor_graph_invalidity","degree_of_precursor_graph_invalid_valid_ratio","self_containment_of_structure_def1","self_containment_of_structure_def2","energy_density_diff","structure_energy","structure_energy_density","structure_length","count_total_number_of_bulges","count_total_number_of_symmetric_bulges","count_total_number_of_asymmetric_bulges","count_total_number_of_matches","count_total_number_of_match_stretches","upper_bulge_length","lower_bulge_length","total_bulge_length","loop_size","count_large_bulges","degree_of_asymmetry","mfei","mfei_au","mfei_gu","mfei_nodes","nodes_energy","nodes_energy_density","match_density","bulge_density","loop_density","a_count","g_count","c_count","u_count","A_ratio","G_ratio","U_ratio","C_ratio","GC_content","AU_content","GU_content","alternate_structures","alternate_structure_score","alternate_paths","good_alternate_paths","bad_alternate_paths","alternate_graph_structures","degree_of_graph_validity","degree_of_graph_invalidity","degree_of_graph_valid_invalid_ratio","modified_degree_of_mutation_valid_def1","modified_degree_of_mutation_valid_def2","modified_degree_of_mutation_valid_def3","modified_degree_of_mutation_valid_def5","modified_degree_of_mutation_def1_energy_range","modified_degree_of_mutation_def2_energy_range","modified_degree_of_mutation_def3_energy_range","modified_degree_of_mutation_def5_energy_range","modified_degree_of_mutation_def1","modified_degree_of_mutation_def2","modified_degree_of_mutation_def3","modified_degree_of_mutation_def5","modified_degree_of_mutation_valid_def1_ratio","modified_degree_of_mutation_valid_def2_ratio","modified_degree_of_mutation_valid_def3_ratio","modified_degree_of_mutation_valid_def5_ratio","modified_degree_of_mutation_def1_energy_range_ratio","modified_degree_of_mutation_def2_energy_range_ratio","modified_degree_of_mutation_def3_energy_range_ratio","modified_degree_of_mutation_def5_energy_range_ratio","modified_degree_of_mutation_def1_ratio","modified_degree_of_mutation_def2_ratio","modified_degree_of_mutation_def3_ratio","modified_degree_of_mutation_def5_ratio","bushiness_count","valid_bushiness_count","bushiness_ratio","valid_bushiness_ratio","graph_valid_nodes","graph_invalid_nodes","total_graph_nodes","precursor_graph_valid_nodes","precursor_graph_invalid_nodes","total_precursor_graph_nodes","modified_bushiness_count","modified_valid_bushiness_count","modified_bushiness_ratio","modified_valid_bushiness_ratio","degree_of_mutation_valid_def0","degree_of_mutation_def0","degree_of_mutation_def0_energy_range","degree_of_mutation_valid_def0_ratio","degree_of_mutation_def0_ratio","degree_of_mutation_def0_energy_range_ratio","modified_degree_of_mutation_valid_def0","modified_degree_of_mutation_def0_energy_range","modified_degree_of_mutation_def0","modified_degree_of_mutation_valid_def0_ratio","modified_degree_of_mutation_def0_energy_range_ratio","modified_degree_of_mutation_def0_ratio","alternate_valid_graph_structures","modified_alternate_valid_graph_structures","alternate_valid_graph_structures_ratio","modified_alternate_valid_graph_structures_ratio","no_of_edges_in_graph","self_containment","good_paths","bad_paths","good_self_containment","unpruned_edges_count","loop_valid_node","loop_invalid_node","mutations","valid_mutations","precursor_mutations","valid_precursor_mutations","matches_self_containment","random_sub_structures","random_valid_sub_structures","modified_random_sub_structures","modified_random_valid_sub_structures","erratic_sub_structures","erratic_valid_sub_structures","modified_erratic_sub_structures","modified_erratic_valid_sub_structures","stochastic_sub_structures","stochastic_valid_sub_structures","modified_stochastic_sub_structures","modified_stochastic_valid_sub_structures","energy_barrier","modified_energy_barrier","valid_energy_barrier","modified_valid_energy_barrier","valid_loop_nodes_with_incoming_path","invalid_loop_nodes_with_incoming_path","local_minima_valid_paths","total_local_minima_valid_paths_length","average_local_minima_valid_paths_length","count_paths_with_no_parents","count_mature_mirna_start_path_matches","mature_mirna_enclose_length","contingent_structures","modified_contingent_structures","casual_structures","modified_casual_structures","contending_structures","modified_contending_structures","clashing_structures","modified_clashing_structures","energy_barrier_ratio","incident_structures","modified_incident_structures","transmutation","count_gap_structures","adventitious_structures","modified_adventitious_structures","peripheral_structures","modified_peripheral_structures","low_energy_structures","modified_low_energy_structures","low_energy_structures_def1","modified_low_energy_structures_def1","low_energy_structures_def2","modified_low_energy_structures_def2","high_energy_structures","medium_energy_structures","a_count","g_count","c_count","u_count","A_ratio","G_ratio","U_ratio","C_ratio","GC_content","AU_content","GU_content","hairpins","valid_hairpins","modified_hairpins","modified_valid_hairpins","energy_binned_structures_def1","energy_binned_structures_def2","energy_binned_structures_def3","energy_binned_structures_def4","energy_binned_structures_def5","energy_binned_structures_def6","is_hairpin","is_motif_CNNC_present","is_motif_GUG_present","is_motif_UGU_present","Combinatorial_structures","Combinatorial_structures_ratio","Summed_Combinatorial_Structures_Energy","child_bushiness","path_bushiness","extended_bushiness","modified_count_paths_with_no_parents","continuity_statistic","modified_valid_loop_nodes_with_incoming_path","modified_local_minima_valid_paths","modified_total_local_minima_valid_paths_length","modified_average_local_minima_valid_paths_length","first_upper_bulge","second_upper_bulge","third_upper_bulge","fourth_upper_bulge","fifth_upper_bulge","six_upper_bulge","seventh_upper_bulge","eigth_upper_bulge","nine_upper_bulge","first_lower_bulge","second_lower_bulge","third_lower_bulge","fourth_lower_bulge","fifth_lower_bulge","six_lower_bulge","seventh_lower_bulge","eigth_lower_bulge","nine_lower_bulge","first_node_size","second_node_size","third_node_size","fourth_node_size","fifth_node_size","six_node_size","seventh_node_size","eigth_node_size","nine_node_size","tenth_node_size","mature_mirna_energy_density","mature_mirna_bushiness","mature_mirna_energy_barrier","mature_mirna_energy","modified_energy_binned_structures_def1","modified_energy_binned_structures_def2","modified_energy_binned_structures_def3","modified_energy_binned_structures_def4","modified_energy_binned_structures_def5","modified_energy_binned_structures_def6","nodes_density","classType"
 0.2625,5788,3805,51,0,10,30,0.516304,2,1402,1247,214587,231458,78463,3252.72,229649,247699,90702,4205.51,-8275,501,-1962,29.3899,26.7273,2.23077,62.913,41.3587,0.554348,0,0.108696,0.326087,0.005612,0.0217391,15.2391,13.5543,2332.47,2515.85,852.859,35.3557,2496.18,2692.38,985.891,45.7121,-89.9457,5.44565,-21.3261,31.9456,0.290514,0.0242475,889.601,110.399,124.099,247.411,735.95,0.087068,-42,-0.456522,92,11,3,8,31,12,10,15,25,5,1,5.66667,-0.65625,-1.5,-0.893617,-3.23077,-48.4,-3.72308,0.336957,0.271739,0.0543478,19,38,26,9,0.206522,0.413043,0.0978261,0.282609,0.695652,0.304348,0.51087,33,0.560277,59,2,10,241,620.566,379.434,1635.51,75543,81523,28176,1128.01,6,3,3,0.154762,81288,87697,30743,1251.08,821.12,886.12,306.261,12.261,0.0652174,0.0326087,0.0326087,0.168219,883.565,953.228,334.163,13.5987,98,50,1.06522,0.543478,3814,2332,6146,1249,155,1404,68,50,0.73913,0.543478,136301,335783,54367,1481.53,3649.82,590.946,39365,270,47880,427.88,2.93478,520.435,5,2,0.0543478,0.0217391,5735,0.658274,23,75,1,767732,496,0,241,5,2,2,0.343873,4341,3494,1346,1217,5955,3811,1403,1248,5263,3753,1396,1245,340,203,149,149,186,0,2375,87211,36.7204,3906,31,92,11,3,2,2,0,0,0,0,3.46939,0,0,1335,101,1076,134,1410,384,3821,540,5570,1171,6146,1404,186,1005,36,79,56,28,0.180905,0.396985,0.140704,0.281407,0.678392,0.321608,0.537688,2354,559,126,92,1611,1276,910,819,180,6,1,1,0,0,1069331,11623.2,-195,157,1605,3261,871,9.46154,75,775,25147,32.4477,3,0,1,0,1,0,1,0,1,5,1,2,0,1,1,0,1,2,3,3,1,2,1,2,1,1,2,2,-0.456522,23,99,-42,489,296,63,10,1,0,0.141304

请指导我可能出现的错误。

0 个答案:

没有答案