HealthCatalyst / healthcareai-r

R tools for healthcare machine learning
https://docs.healthcare.ai
Other
245 stars 106 forks source link

Write error message and test #1260

Closed glenrs closed 6 years ago

glenrs commented 6 years ago

@mmastand, we ran into this bug at HAS. It was an easy fix.

library(healthcareai)
#> healthcareai version 2.2.0
#> Please visit https://docs.healthcare.ai for full documentation and vignettes. Join the community at https://healthcare-ai.slack.com
library(tidyverse)

prepped_d <- prep_data(pima_diabetes, patient_id, outcome = diabetes)
#> Training new data prep recipe...
m <- machine_learn(prepped_d, patient_id, outcome = diabetes, models = "rf", 
                   tune = FALSE)
#> Error in machine_learn(prepped_d, patient_id, outcome = diabetes, models = "rf", : "d" is already prepped. Either use original data in `machine_learn`, or use prepped data in `flash_models` or `tune_models`.

Created on 2018-09-20 by the reprex package (v0.2.0).

codecov[bot] commented 6 years ago

Codecov Report

Merging #1260 into master will increase coverage by <.1%. The diff coverage is 100%.

@@           Coverage Diff            @@
##           master   #1260     +/-   ##
========================================
+ Coverage      95%   95.1%   +<.1%     
========================================
  Files          39      39             
  Lines        2895    2899      +4     
========================================
+ Hits         2753    2757      +4     
  Misses        142     142