HealthCatalyst / healthcareai-r

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

machine_learn error in healthcareai 2.2 #1276

Closed BobParker18 closed 5 years ago

BobParker18 commented 5 years ago

Hello! We appreciate that you've come here to offer feedback of some sort. If you have a general question about how to use the package, consider asking on Slack for a faster response.

Feature Requests

Letting us know how healthcareai could be more useful for you help us make it better. Don't worry about asking; we may not get to it right away, but we're happy to know what you want. Please include what you'd like the package to do and what you would use the functionality for.

Bug Reports

Did you find a new way to break healthcareai? We're happy you came here to tell us about it. We want to help, but it can be very difficult to diagnose a problem that happened on another machine. To help with that please include the following:

A minimal reproducable example

These help us recreate your problem on our machine. This is a good guide on how to write a reproducable example. The reprex package is extraordinarily helpful for this. If you need to include data to recreate the issue, you can paste the output of dput(your_data) here.

The output of sessionInfo()

please note the error when I call machine_learn:

models <- machine_learn(pima_diabetes, patient_id, outcome = diabetes) Training new data prep recipe...

Error in lapply(newdata[vars], function(x) { : argument "newdata" is missing, with no default

glenrs commented 5 years ago

@BobParker18, thanks for your issue. Will you please make a reproducable example with the reprex package?

The lines of code provided seem to work just fine.

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

models <- machine_learn(pima_diabetes, patient_id, outcome = diabetes)
#> Training new data prep recipe...
#> Variable(s) ignored in prep_data won't be used to tune models: patient_id
#> 
#> diabetes looks categorical, so training classification algorithms.
#> 
#> After data processing, models are being trained on 12 features with 768 observations.
#> Based on n_folds = 5 and hyperparameter settings, the following number of models will be trained: 50 rf's, 50 xgb's, and 100 glm's
#> Training with cross validation: Random Forest
#> Training with cross validation: eXtreme Gradient Boosting
#> Training with cross validation: glmnet
#> 
#> *** Models successfully trained. The model object contains the training data minus ignored ID columns. ***
#> *** If there was PHI in training data, normal PHI protocols apply to the model object. ***

Created on 2018-11-27 by the reprex package (v0.2.0).

BobParker18 commented 5 years ago
models <- machine_learn(pima_diabetes, patient_id, outcome = diabetes)
#> Error in machine_learn(pima_diabetes, patient_id, outcome = diabetes): could not find function "machine_learn"

Created on 2018-11-27 by the reprex package (v0.2.1)

BobParker18 commented 5 years ago

Thanks Rex:

Reprex generates other information than I showed earlier and it is posted. Appreciate your assistance.

Bob Parker, BIAR Statistician DXC Technology Georgia Medicaid 100 Crescent Center Pkwy Tucker, GA 30084 Tel: +1 678 713-3774

From: Rex Sumsion [mailto:notifications@github.com] Sent: Tuesday, November 27, 2018 10:02 AM To: HealthCatalyst/healthcareai-r healthcareai-r@noreply.github.com Cc: Parker, Bobby Ing bobby.ing.parker@dxc.com; Mention mention@noreply.github.com Subject: Re: [HealthCatalyst/healthcareai-r] machine_learn error in healthcareai 2.2 (#1276)

@BobParker18https://github.com/BobParker18, thanks for your issue. Will you please make a reproducable example with the reprex package?

The lines of code provided seem to work just fine.

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

models <- machine_learn(pima_diabetes, patient_id, outcome = diabetes)

> Training new data prep recipe...

> Variable(s) ignored in prep_data won't be used to tune models: patient_id

>

> diabetes looks categorical, so training classification algorithms.

>

> After data processing, models are being trained on 12 features with 768 observations.

> Based on n_folds = 5 and hyperparameter settings, the following number of models will be trained: 50 rf's, 50 xgb's, and 100 glm's

> Training with cross validation: Random Forest

> Training with cross validation: eXtreme Gradient Boosting

> Training with cross validation: glmnet

>

> Models successfully trained. The model object contains the training data minus ignored ID columns.

> If there was PHI in training data, normal PHI protocols apply to the model object.

Created on 2018-11-27 by the reprex packagehttp://reprex.tidyverse.org (v0.2.0).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/HealthCatalyst/healthcareai-r/issues/1276#issuecomment-442089687, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ArJI0ncnZ_VkOz6ckFZCiTJ-8YaqXMSjks5uzVPZgaJpZM4YttRA.

DXC Technology Company - Headquarters: 1775 Tysons Boulevard, Tysons, Virginia 22102, USA. DXC Technology Company -- This message is transmitted to you by or on behalf of DXC Technology Company or one of its affiliates. It is intended exclusively for the addressee. The substance of this message, along with any attachments, may contain proprietary, confidential or privileged information or information that is otherwise legally exempt from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate any part of this message. If you have received this message in error, please destroy and delete all copies and notify the sender by return e-mail. Regardless of content, this e-mail shall not operate to bind DXC Technology Company or any of its affiliates to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. --.

glenrs commented 5 years ago

@BobParker18 I have now looked into your original error further. There were some changes in one of our dependencies. We are currently working on these changes.

Your reprex example is showing a different error because you didn't import healthcareai in your reprex example.

BobParker18 commented 5 years ago

Thanks. Unless you need more info from me, I will wait for further developments in the package.

Bob Parker, BIAR Statistician DXC Technology Georgia Medicaid 100 Crescent Center Pkwy Tucker, GA 30084 Tel: +1 678 713-3774

From: Rex Sumsion [mailto:notifications@github.com] Sent: Tuesday, November 27, 2018 1:25 PM To: HealthCatalyst/healthcareai-r healthcareai-r@noreply.github.com Cc: Parker, Bobby Ing bobby.ing.parker@dxc.com; Mention mention@noreply.github.com Subject: Re: [HealthCatalyst/healthcareai-r] machine_learn error in healthcareai 2.2 (#1276)

@BobParker18https://github.com/BobParker18 I have now looked into your original error further. There were some changes in one of our dependencies. We are currently working on these changes.

Your reprex example is showing a different error because you didn't import healthcareai in your reprex example.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/HealthCatalyst/healthcareai-r/issues/1276#issuecomment-442164792, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ArJI0jZ9QBkL7VJiIUwB1JUQsyyirWcrks5uzYOCgaJpZM4YttRA.

DXC Technology Company - Headquarters: 1775 Tysons Boulevard, Tysons, Virginia 22102, USA. DXC Technology Company -- This message is transmitted to you by or on behalf of DXC Technology Company or one of its affiliates. It is intended exclusively for the addressee. The substance of this message, along with any attachments, may contain proprietary, confidential or privileged information or information that is otherwise legally exempt from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate any part of this message. If you have received this message in error, please destroy and delete all copies and notify the sender by return e-mail. Regardless of content, this e-mail shall not operate to bind DXC Technology Company or any of its affiliates to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. --.

glenrs commented 5 years ago

@BobParker18 These changes will be in our next release (version 2.3.0). To continue to use the current version of healthcareai you can revert to previous versions of recipes. There will be no dependency issues.

BobParker18 commented 5 years ago

Rex:

I see we can access previous versions using Library(remotes). Which version of the Recipes would you recommend?

Bob Parker, BIAR Statistician DXC Technology Georgia Medicaid 100 Crescent Center Pkwy Tucker, GA 30084 Tel: +1 678 713-3774

From: Rex Sumsion [mailto:notifications@github.com] Sent: Tuesday, November 27, 2018 8:05 PM To: HealthCatalyst/healthcareai-r healthcareai-r@noreply.github.com Cc: Parker, Bobby Ing bobby.ing.parker@dxc.com; Mention mention@noreply.github.com Subject: Re: [HealthCatalyst/healthcareai-r] machine_learn error in healthcareai 2.2 (#1276)

@BobParker18https://github.com/BobParker18 These changes will be in our next release (version 2.3.0). To continue to use the current version of healthcareai you can revert to previous versions of recipes. There will be no dependency issues.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/HealthCatalyst/healthcareai-r/issues/1276#issuecomment-442278842, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ArJI0lLjxEutpTS7Ij0BnzvcJhjJJUxXks5uzeFEgaJpZM4YttRA.

DXC Technology Company - Headquarters: 1775 Tysons Boulevard, Tysons, Virginia 22102, USA. DXC Technology Company -- This message is transmitted to you by or on behalf of DXC Technology Company or one of its affiliates. It is intended exclusively for the addressee. The substance of this message, along with any attachments, may contain proprietary, confidential or privileged information or information that is otherwise legally exempt from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate any part of this message. If you have received this message in error, please destroy and delete all copies and notify the sender by return e-mail. Regardless of content, this e-mail shall not operate to bind DXC Technology Company or any of its affiliates to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. --.