Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gtesei committed Sep 29, 2015
1 parent a054c72 commit ff5820b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R-package/R/featureFilter.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ ff.featureFilter <- function(traindata,
card = NULL

if (performVarianceAnalysisOnTrainSetOnly) {
if (verbose) cat(">>> removing zero variance predictors only performing variance analysis on train set only ... \n")
if (verbose) cat(">>> removing zero variance predictors performing variance analysis on train set only ... \n")
card = apply(traindata,2,function(x) length(unique(x)) )
} else {
if (verbose) cat(">>> removing zero variance predictors only performing variance analysis on both train set and test set ... \n")
if (verbose) cat(">>> removing zero variance predictors performing variance analysis on both train set and test set ... \n")
card = apply(data,2,function(x) length(unique(x)) )
}

Expand Down Expand Up @@ -123,8 +123,8 @@ ff.featureFilter <- function(traindata,
if (sum(colToRemove) > 0) {
if (verbose) cat("removing ",sum(colToRemove)," identical predictors: ",
paste(colnames(data) [colToRemove] , collapse=" " ) , " ... \n ")
data = data[,-which(colToRemove),drop=F]
}
data = data[,-which(colToRemove),drop=F]
}

# removing high correlated predictors
Expand Down

0 comments on commit ff5820b

Please sign in to comment.