From 43043ef29b0a744716fb6b9a215b0c9aac41bcb1 Mon Sep 17 00:00:00 2001 From: Gene Leynes Date: Mon, 7 Aug 2017 11:51:38 -0500 Subject: [PATCH] commenting out the code to find linear combos because of complicaitons with possible missing data. Also added notes about running manually --- R/21_create_features.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/R/21_create_features.R b/R/21_create_features.R index 8da671f..002c864 100644 --- a/R/21_create_features.R +++ b/R/21_create_features.R @@ -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")