Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Computing Science and ML

ML Libraries linked in this lesson:

Real Python ML Resources:

Scientific Computing Libraries:

Real Python Scientific Computing Resources:

00:00 In the previous lesson, I showed you libraries for GUIs and games. This lesson is the start of the second section, which is on data science and math.

00:10 Typically, when you code, you tell the computer step-by-step what you want it to perform. Machine learning is a subset of artificial intelligence, and in it, you write code that makes predictions based on trained data.

00:22 You create that trained dataset by running algorithms on existing data and using a variety of methods to find patterns which you then apply to future inputs.

00:32 AI and ML are rapidly changing fields, and there’s a lot of press coverage on this topic.

00:39 Machine learning libraries contain the pattern-finding algorithms, which you then run on your data to train your system. All three of the libraries on the screen here are popular, and if you’re just getting started, any one of them will do.

00:52 Once you get going, each has their strong points and you may want to pick one over the other based on your problem set.

01:00 The three libraries on the previous slide are generic ML libraries. These next two are more specialized. NLTK is specific to natural language processing, so if you’re trying to write code that understands writing, this is the toolkit for you.

01:15 And scikit-learn is a little lower level than the three on the previous slide and really is a container for those learning algorithms. I mentioned before. It’s common to see this library used in combination with data science libraries like NumPy, which I’ll talk about shortly.

01:31 This link is a collection of machine-learning tools, while this learning path is a step-by-step journey introduction to the topic. Scientific computing is kind of a catchall and can mean all sorts of things.

01:45 Typically, though, it’s shorter programs written to crunch some numbers to do one or more calculations. Common uses are statistics for things like biology, or number crunching for physics or engineering tasks.

01:58 Sometimes the way to understand a system better is to model it, and coding simulations can help you pose what-if questions and see potential results.

02:08 NumPy is the most common number-crunching library out there. It gets used for more than just scientific computing and can be thought of as an extension to Python’s math capabilities.

02:18 NumPy is written in C and connected to Python, which means it tends to be much faster than your typical pure Python code. A lot of data science libraries are built on top of NumPy as well. As its name implies, SciPy is a collection of tools for science, as well as math and engineering.

02:36 It is built on top of NumPy and adds capabilities such as algebraic and differential equations.

02:43 Another library where the name is descriptive of its value, SimPy is for doing discrete event simulations. This can be helpful for anything from modeling throughputs at a factory to emulating the interactions of particles. As an added bonus, SciPy and SimPy are just fun to say.

03:02 This learning path helps you on your journey with scientific computing. While this tutorial is specifically about how to calculate correlation, and it combines NumPy, SciPy, and pandas—more on that one later. If you want to learn more about simulation, this tutorial can get you started.

03:21 Next up, I’ll cover data analysis and visualization libraries.

Become a Member to join the conversation.