Advanced Code Template (PRACTICAL)
Important information on code changes & updates can be found below this video
Code notes: Newer versions of scikit-learn (since recording) may have updates or changes.
One Hot Encoder: Updated parameter names.
Two examples that you might come across:
- sparse = False updated to sparse_output = False
- get_feature_names() updated to get_feature_names_out()
Pickle:
If you encounter the error message No module named 'pandas.core.indexes.numeric' when attempting to read in the pickle file, please use the Pandas version of read_pickle() instead:
data_for_model = pd.read_pickle("data/abc_classification_modelling.p")
Plot Style: In newer versions of matplotlib, the styles list has been updated. Instead of seaborn-poster you will now use seaborn-v0_8-poster. You will see the updated list when running plt.style.available