juliasilge.com icon indicating copy to clipboard operation
juliasilge.com copied to clipboard

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

Open utterances-bot opened this issue 3 years ago • 8 comments

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/

utterances-bot avatar Sep 02 '21 14:09 utterances-bot

Thank for this tutorial.

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

Many thanks

nguyenlovesrpy avatar Sep 02 '21 14:09 nguyenlovesrpy

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.

juliasilge avatar Sep 02 '21 14:09 juliasilge

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.

gus079 avatar Sep 25 '21 12:09 gus079

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?

poligabi avatar Oct 22 '21 21:10 poligabi

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

juliasilge avatar Oct 22 '21 21:10 juliasilge

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

poligabi avatar Oct 23 '21 20:10 poligabi

@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?).

juliasilge avatar Oct 25 '21 01:10 juliasilge

I love your content

auzaluis avatar Dec 20 '23 14:12 auzaluis