python – Demand Planning, S&OP/ IBP, Supply Planning, Business Forecasting Blog https://demand-planning.com S&OP/ IBP, Demand Planning, Supply Chain Planning, Business Forecasting Blog Mon, 11 Jul 2022 08:27:43 +0000 en hourly 1 https://wordpress.org/?v=6.6.4 https://demand-planning.com/wp-content/uploads/2014/12/cropped-logo-32x32.jpg python – Demand Planning, S&OP/ IBP, Supply Planning, Business Forecasting Blog https://demand-planning.com 32 32 Simplifying Python For Business Forecasting With Mariya Sha https://demand-planning.com/2022/03/17/simplifying-python-for-business-forecasting-with-mariya-sha/ https://demand-planning.com/2022/03/17/simplifying-python-for-business-forecasting-with-mariya-sha/#comments Thu, 17 Mar 2022 12:54:05 +0000 https://demand-planning.com/?p=9528

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.

 

]]>
https://demand-planning.com/2022/03/17/simplifying-python-for-business-forecasting-with-mariya-sha/feed/ 3
Should I Use Open Source Instead Of Demand Planning Software For Forecasting? https://demand-planning.com/2020/02/19/should-i-use-open-source-instead-of-demand-planning-software-for-forecasting/ https://demand-planning.com/2020/02/19/should-i-use-open-source-instead-of-demand-planning-software-for-forecasting/#comments Wed, 19 Feb 2020 12:51:10 +0000 https://demand-planning.com/?p=8242

You’re not going to get advanced modeling like machine learning in Excel. Excel can’t handle large data sets either, making it clunky and problematic. And when you start feeding it multiple SKU’s or a whole lot of different variables, running all the different simulations and computations can weigh even the best machine down.   

This is where open source software comes in for analysts who want a little more to work with. Open Source Software is a type of software where the source code is publicly accessible or open and grants users the right to change, modify or share it.

To help handle and extract insight from Big Data, people have turned to open source platforms like Hadoop and Apache Spark. For a lot of people in the data science world, they used software like SAS at college and learned to code in languages like R and Python. All of these, as well as some others not mentioned, do an excellent job on the platforms they have set out. While some of us might be afraid of coding and learning these languages, they are all relatively user-friendly and many elements are simpler than an Excel macro.

What is Hadoop? Hadoop is used frequently with big volumes of previously unmanageable data. It is an open-source software framework for storing data and running applications on clusters of commodity hardware. It provides massive storage for any kind of data, enormous processing power and the ability to handle virtually limitless concurrent tasks or jobs. Hadoop is used by companies with Big Data like Airbnb, Uber, and Netflix.

What is Apache Spark? Apache Spark is another platform used to manage data and actually can work with Hadoop. It is an open-source engine developed specifically for handling large-scale data processing and analytics. Spark offers the ability to access data in a variety of sources, including Hadoop Distributed File System (HDFS), OpenStack Swift, Amazon and Cassandra.

What is Python? Originating as an open source scripting language, Python usage has grown over time. It is an interactive and interpreted high-level object-oriented programming language. It is easy to learn and understand. It is largely used as an open-source scripting language that supports many libraries used for data analysis (pandas), scientific computation (NumPy, SciPy), and machine learning (scikit-learn). Python is used by many of the larger tech giants such as Google, Quora and Reddit, etc.

What is R? R is a free open-source platform. As it is open-source, it is highly extensible and there are quick releases of the software with the latest techniques. R is strong in visualizations and graphics and offers multiple different functions. It is not hard to learn to code in R and once you learn the fundamentals of the logic, the possibilities are endless. You can find multiple information sources for R over the web. Companies that use R include Facebook, Google and Microsoft.

How Is Open Source Software Different To Specialized Demand Planning Software?

These are what we referred to as open source software which makes them unique compared to a demand planning package that you purchase and may install. In general, open source is any program whose source code is made available for use or modification as users or other developers see fit.  Additionally, they are available for free with a user community made up of fellow practitioners creating packages and codes anyone can use.

With the open source, someone may have already tried to solve your problem and has developed the model you need.

Open Source Is Highly Flexible

For Big Data and advanced analytics professionals, the flexibility of the open source code and minimal/ no cost are what makes platforms like these so attractive. But what makes them even more worthwhile is that with the open source, someone may have already tried to solve your problem and has developed the model you need. Basic neural networks, decision trees, logistic regression, and even time-series models have been developed, tested, and are available for copying and pasting. Users do not find themselves limited to the methods and configurations of an off the shelf package that is part of a legacy system, but rather can design and develop what they need.

Open source also gives you the capability to code and create something new.

Open source also gives you the capability to code and create something new. Open source tools give developers the ability to tinker with them, thereby increasing the chances of rapid improvements or experimentation that could expand the usage or features of tools.

Open Source Communities Help Solve Your Problems

People who work with open source machine learning tools also find they have thriving online communities at their disposal that allow them to tap into collective thinking when they run into unexpected difficulties. R and Python are both open-source programming languages with a large community. New libraries and tools are added regularly. Those forums currently have hundreds of answers to common problems, and as machine learning tools become even more popular, the knowledge base will expand even more.

Should I Use Open Source Software Then?

All of this does not come without risk or problems though. While many new college kids may cut their teeth on data analytics tools, there are not many people experienced enough to code or create models. While coding is not as scary as it sounds, it still requires time, effort, experience, and working through many potential bugs. Given the need for specific skills and the time and effort required to leverage open source software, investing in specialized demand planning software may be more advisable.

Open source platforms do come with limitations. A good planning system can do a lot more than just model, which justifies its cost. Besides being most likely more user friendly, most software packages offer the advantages of stability, easier deployment, better support, and governance. Advancements in these software packages mean the models today are more advanced than they were, and many even offer interfaces that integrate with open source platforms like R. This provides the various features of advanced planning systems while providing modeling extension capabilities with R and Python.

[bar id=”8202″]

 

Eric will be speaking at IBF’s Predictive Business Analytics, Forecasting & Planning Conference in New Orleans from April 28-20, 2020. Learn more about the tools discussed in this article and how to leverage them as a competitive advantage. Includes special data science workshop.

]]>
https://demand-planning.com/2020/02/19/should-i-use-open-source-instead-of-demand-planning-software-for-forecasting/feed/ 3