A password will be e-mailed to you.

I recently spoke to Mariya Sha, Python guru and star of the Python Simplified YouTube channel. I asked her how forecasters and Demand Planners can get started with the Python programming language and leverage it for Machine Learning. I gained some fantastic insights that should inspire all forecasters to take the leap. The following are her responses.

What’s The Best Way To Learn Python?

“The best way to begin is to take a short, introductory course on Udacity, Udemy or Coursera to learn the basic commands. As long as you have a basic understanding of functions, for loops, control flow operations, etc. you have the foundations required to use the language for your specific needs, whether it’s math, ML or whatever you need it to do.”

Does Experience In Excel Help With Learning Python?

“Skills in Excel like VBA (Virtual Basic for Applications) translate directly into Pandas, which is a data science library that is widely used in Python. I believe a lot of things you encounter in other languages can be applied in Python. The difference is that Python is very high level; you don’t need to think about the small details, all the data types. Python takes care of that, unlike other languages like  C++ which requires programming every little detail. By comparison, Python is very simple.

Python cuts to the chase – it allows you to get it done, and get it done fast. If people ty to build a simple application in Python, they will see the difference. Just try it!”

 

Tips When Starting With Python

“Begin with data types. These are the building blocks of your application. You always need to know which data types to use because they have different methods. Strings have different methods to integers and floating point numbers, for example. Every different data type allows you to do different operations. You need to know which operations you can do with each data type.

When you’re comfortable with that you can move onto control flow operations, like conditional statements, functions, and once you’re comfortable with that you can move to classes and object-oriented programming. Actually, everything is an object in Python – that’s part of why this language is so brilliant.

When you’re comfortable with object-oriented programming, then you can spread your wings and get into what you’re interested in. If you’re interested in Machine Learning, you’d then start looking for Machine Learning frameworks and libraries, if you’re into data science you’ll dive into Pandas.”

What are Objects In Python?

“If you’re creating a windmill for instance, it’ll have a height, width, speed, color etc. This is the data about the windmill. It’ll also have functions like ‘spin’ and ‘stop’. The data and functions combine into an object, which in this case is a windmill.”

 

What Is Python Library?

“A library is ready blocks of code that somebody else made that you can use for yourself. Take, for example, a SoftMax function which is an algorithm we use in ML. Instead of writing the entire formula, you write SoftMax and it’s done for you. It’s basically using simplified parameters instead of writing code. Every library has incredible documentation, with a lot of support and forums where you can ask questions. If you have an issue, somebody will help you out.

The most important libraries are NumPy (for mathematics), Pandas (for data science), and Matplotlib (for plotting graphs and charts). These are 3 main libraries that we all use. If you’re into ML/AI you’d probably go for PyTorch and TensorFlow.”

Using Python For Machine Learning

“Python is a very minimalistic language. You only specify the most basic things. With AI, it’s almost the opposite where everything consists of long formulas – not complicated math, but there’s a lot of it and it’s sequential. Python gives you the easiest syntax for ML. Processes like radiant descent can be summarized in a single command.

Inference, for example, sounds very complicated with predicting and loading a pre-trained neural network and exposing it to an image it’s never seen before. It all seems very complicated but with 30 minutes you can do all of this.

If somebody explains it to you in simple language, I think everybody can understand it. It’s not as intimidating when you understand how simple it is. I think people are afraid of ML because they read these academic style articles and assume they’re not smart enough to do it. At the end of the day, it’s very simple math. Unlike other languages like C++, Python takes care of the details, and allows you to do ML in plain English.”

Parting Thoughts

“There are no rules when it comes to using Python. Don’t listen to what people say is the right way to doing things – it just limits your imagination. The best way to go is trial and error. Try to be creative – it’s the best way to learn.”

You can find Mariya Sha and more data science and computing insights at her YouTube channel, Python Implied.