Optimize Model Using Jupiter Notebook Python