Skip to content

Commit

Permalink
commenting out the code to find linear combos because of complicaiton…
Browse files Browse the repository at this point in the history
…s with possible missing data. Also added notes about running manually
  • Loading branch information
geneorama committed Aug 7, 2017
1 parent 5b75373 commit 43043ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/21_create_features.R
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,11 @@ rm(xx,yy,jj)
## will not contribute to the model.
caret::nearZeroVar(weather_summary)
weather_summary <- weather_summary[,.SD,.SDcols=-c("snow", "snwd")]
caret::findLinearCombos(weather_summary[date < min(missing_dates),
list(tmin, tmax, awnd, prcp, wdf2, wsf2)])
## findLinearCombos causes errors if dates are missing, and filtering causes
## warnings if dates are not missing. So, run this manually, but it doesn't
## change unless you change data sources or add new fetaures. It's just a good
## diagnostic to keep in mind.
# caret::findLinearCombos(weather_summary[ , list(tmin, tmax, awnd, prcp, wdf2, wsf2)])
cor(weather_summary[ , list(tmin, tmax, awnd, prcp, wdf2, wsf2)])
dat <- merge(dat, weather_summary, "date")

Expand Down

0 comments on commit 43043ef

Please sign in to comment.