juliasilge / juliasilge.com

My blog, built with blogdown and Hugo :link:
https://juliasilge.com/
40 stars 27 forks source link

Tune and interpret decision trees for #TidyTuesday wind turbines | Julia Silge #53

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Tune and interpret decision trees for #TidyTuesday wind turbines | Julia Silge

Use tidymodels to predict capacity for Canadian wind turbines with decision trees.

https://juliasilge.com/blog/wind-turbine/

data-datum commented 2 years ago

I would like to know why in this example, you did not setup the workflow? Thank you so much! :)

juliasilge commented 2 years ago

@data-datum I didn't use a workflow() in this example partly to show how you can tune a model + preprocessor, and partly because parttree did not support workflows at the time. I believe it does now!

data-datum commented 2 years ago

Thank you for your answer, Julia. I have another question, with rpart.plot library we can plot our decision trees, is there any option like that in tidymodels? Thanks.

juliasilge commented 2 years ago

@data-datum You can use rpart.plot(); check out this example.

RaymondBalise commented 1 year ago

Hello Julia, At around 28:47 in the recording (https://youtu.be/EDQnJF9LKHQ?t=1723) you are taking about last_fit() and you say it gives metrics and predictions on the training data. I thought last_fit() refit the model on the full training data but it returns metrics on the test data. I think that is what you said earlier in the video. I am hoping that you just misspoke in this spot. Did you misspeak or am I wrong about what last_fit() does or am I generally confused?

juliasilge commented 1 year ago

Ah, it is possible I misspoke there briefly @RaymondBalise. The function last_split() does in fact fit one time to the training data and evaluate one time on the testing data; the predictions and metrics returned are for the testing data.

RaymondBalise commented 1 year ago

Cool. Thank you for the seemingly endless supply of entertaining useful information.