Skip to content

Commit

Permalink
NAs handling at user level in ff.makeFeatureSet
Browse files Browse the repository at this point in the history
  • Loading branch information
gtesei committed Oct 2, 2015
1 parent c29f37c commit f801f12
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R-package/R/featureEncode.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ ff.encodeCategoricalFeature = function(data.train ,
ff.extractDateFeature = function(data.train ,
data.test) {

stopifnot(identical(class(data.train),'Date') )
stopifnot(identical(class(data.test),'Date'))
stopifnot(identical(class(data.train),'Date'))
stopifnot(identical(class(data.test), 'Date'))

all_date = as.Date(c(data.train , data.test))
all_date = sort(all_date)
Expand Down Expand Up @@ -259,9 +259,9 @@ ff.makeFeatureSet = function(data.train ,
currIdx <<- currIdx + l[[i]]$dim
})

#
stopifnot(sum(is.na(traindata))==0)
stopifnot(sum(is.na(testdata))==0)
# NAs handling at user level
#stopifnot(sum(is.na(traindata))==0)
#stopifnot(sum(is.na(testdata))==0)

#
return(list(traindata=traindata,testdata=testdata))
Expand Down

0 comments on commit f801f12

Please sign in to comment.