Skip to content

Commit

Permalink
fixing bug with hpdrpart DR-1142
Browse files Browse the repository at this point in the history
  • Loading branch information
vishrutg committed Oct 15, 2015
1 parent bf1ed60 commit 9b43558
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions algorithms/HPdclassifier/R/hpdrpart.R
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,7 @@ hpdrpart <- function(formula, data, weights, subset , na.action = na.omit,
attr(model,"xlevels") <- attr(model,"xlevels")$Levels
names(attr(model,"xlevels")) <- colnames(data)[categorical_features]
response_col = colnames(data)[categorical_features] == response_name
response_col = which(response_col)
attr(model,"xlevels") <- attr(model,"xlevels")[-response_col]
attr(model,"xlevels") <- attr(model,"xlevels")[!response_col]
model$nExecutor = nExecutor
class(model) <- c("hpdrpart","rpart")

Expand Down

0 comments on commit 9b43558

Please sign in to comment.