juliasilge / juliasilge.com

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

Fit and predict with tidymodels for #TidyTuesday bird baths in Australia | Julia Silge #46

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

Fit and predict with tidymodels for #TidyTuesday bird baths in Australia | Julia Silge

In this screencast, focus on some tidymodels basics such as how to put together feature engineering and a model algorithm, and how to fit and predict.

https://juliasilge.com/blog/bird-baths/

nguyenlovesrpy commented 3 years ago

Thank for this tutorial.

I see that the outcome is quite imbalance class. Could I use step_dowsample for outcome?

Many thanks

juliasilge commented 3 years ago

Yes, you definitely could balance the classes during training to end up with better calibrated probabilities where, say, the default of 0.5 gives you "better" accuracy. In this particular case, the base rate is pretty low so if our goal is to end up with predicted probabilities that match real life, one option is to just not balance like we did here. You can read more about subsampling for class imbalance here.

gus079 commented 3 years ago

Thanks! I reallly like your tutorials/examples, the easy and the complex ones. It helps me to learn and to practice the little I know.

poligabi commented 2 years ago

Do you have an example exactly like this but instead of a factor (urban|rural) the variable tested is numeric (size of the pool for example)? To predict the presence of species?

juliasilge commented 2 years ago

@poligabi Not exactly the same, but this one has an interaction between year and ethnicity that might help.

poligabi commented 2 years ago

Thank you for the kindness. But I am breaking mind trying to make a graph like p2 for a community.

juliasilge commented 2 years ago

@poligabi If you are interested in a numeric predictor, I don't think you can make a plot very similar to p2, which shows the relationship with two categorical predictors. I think you'll need to do something very different, like a line plot with an error ribbon showing the relationship between size and predicted probability (two colors for urban/rural?).

auzaluis commented 9 months ago

I love your content