2017-06-08 24 views
0

Sparklyrパッケージでml_decision_treeまたはml_logistic_regresionを使用しようとしたときに、次のエラーが表示されます。私はclouderaクラスタでspark2.1.0を使用しています。私は(na.action = getOptionコマンド( "na.action"、 "na.pass"))とml_optionsを試してみたSparklyrエラー: 'na.omit'コールによって行が削除されない

at<-data_select 

for (col in c(colnames(data_select))) 
{ 
data_ft <-at%>% 
     ft_string_indexer(input.col =col, output.col = paste0(col,"_in"))%>% 
     ft_one_hot_encoder(input.col = paste0(col,"_in"), output.col = paste0(col,'_ohe')) 
     at <-data_ft 
} 

# create the features vectors 
data_col<-colnames(data_ft) # get the colnames names of the aiom_ft table 
gp<- grep("*ohe", data_col) # select only columns ended with ohe 
features <-c(data_col[gp]) # get the names of those columns 
features<-features[features!="target_ohe"] # remove the target variables from the features columns 

# create the feactures vectors 
data_feac<- ft_vector_assembler(data_ft, input.col = features , output.col ='FeacturesVectors') 

# create a aprtition 
#parition the table 
partitions<- data_feac %>% 
      sdf_partition(training = 0.6, test = 0.4, seed = 10099) 
    fit.dec<-partitions$training %>% 
     ml_decision_tree(data_feac, response= 'target_ohe', features='FeacturesVectors', type ="classification", ml_options(na.action = getOption("na.action", "na.pass"))) 

:以下

> No rows dropped by 'na.omit' call. Error in 
> stop(simpleError(sprintf(fmt, ...), if (call.) 
> sys.call(sys.parent()))) : bad error message 

は、私が走ったコードのスニペットですml_options(na.action = getOption( "na.action"、 "na.omit"))と同じエラーメッセージ

答えて

0

これはsparklyrの未解決の問題です。 GitHubのissueを参照してください

関連する問題