Hi all, till now, we have used spyder for writing small programs. However, when we create end to and applications, PyCharm is a hugely popular IDE. We want to leverage machine learning capabilities in PyCharm just like we did in Spyder, so we will prepare PyCharm for machine learning.
PyCharm for Machine Learning:
We will use PyCharm community edition for this purpose. Please download it from https://www.jetbrains.com/pycharm/download/. Install PyCharm with default settings and we are ready to go.
Create a New Project:
Open PyCharm, click File > New Project. You should see a dialog box to create project. Name it anything you want and choose to create a new virtual environment.
Once we have created a new project, we can install machine learning related libraries on our virtual environment. Go to File > Settings > Project Interpreter. You should be able to see a dialog box with virtual environment listed and all of its available packages.
Click the green plus icon and you can type package name. Once a package name is selected, you can click “Install Package” button and selected package will be downloaded and installed. Please install pandas, numpy, matplotlib, theano, keras, scikit-learn, scipy, sklearn packages.
After above package installations, pycharm for machine learning is ready. Let us simply run our linear regression program explained in simple linear regression article.
I have just copied the same program and included same salary_data.csv file for demonstration purpose. Simply put a breakpoint on last line of program and click “Debug”. You should see variables in variables explorer.
You can view the dataset using “view as dataframe” option.
I hope this article helped understand how to use PyCharm for machine learning.