

Discover more from Daily Dose of Data Science
High-quality insights on Data Science and Python, along with best practices — shared daily.
Get a free 550+ page data science PDF guide and 450+ practice questions notebook.
Over 50,000 subscribers
Continue reading
Build Baseline Models Effortlessly With Sklearn
Before developing a complex ML model, it is always sensible to create a baseline first.
The baseline serves as a benchmark for the engineered model. Moreover, it ensures that the model is better than making random (or fixed) predictions. But building baselines with various strategies (random, fixed, most frequent, etc.) can be tedious.
Instead, Sklearn's 𝐃𝐮𝐦𝐦𝐲𝐂𝐥𝐚𝐬𝐬𝐢𝐟𝐢𝐞𝐫() (and 𝐃𝐮𝐦𝐦𝐲𝐑𝐞𝐠𝐫𝐞𝐬𝐬𝐨𝐫()) makes it totally effortless and straightforward. You can select the specific behavior of the baseline with the 𝐬𝐭𝐫𝐚𝐭𝐞𝐠𝐲 parameter.
Read more here: Documentation.
I like to explore, experiment and write about data science concepts and tools. You could connect with me on LinkedIn.