juliasilge.com
juliasilge.com copied to clipboard
Fit and predict with tidymodels for #TidyTuesday bird baths in Australia | Julia Silge
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.
Thank for this tutorial.
I see that the outcome is quite imbalance class. Could I use step_dowsample for outcome?
Many thanks
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.
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.
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 Not exactly the same, but this one has an interaction between year and ethnicity that might help.
Thank you for the kindness. But I am breaking mind trying to make a graph like p2 for a community.
@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?).
I love your content