Fitting a model to a training dataset is so easy today with libraries like scikit-learn. A model can be fit and evaluated on a dataset in just a few lines of code. It is so easy that it has become a problem. The same few lines of code are repeated again and again and it […]
Archive | Python Machine Learning
How to Save a NumPy Array to File for Machine Learning
Developing machine learning models in Python often requires the use of NumPy arrays. NumPy arrays are efficient data structures for working with data in Python, and machine learning models like those in the scikit-learn library, and deep learning models like those in the Keras library, expect input data in the format of NumPy arrays and […]
How to Fix FutureWarning Messages in scikit-learn
Upcoming changes to the scikit-learn library for machine learning are reported through the use of FutureWarning messages when the code is run. Warning messages can be confusing to beginners as it looks like there is a problem with the code or that they have done something wrong. Warning messages are also not good for operational […]
Your First Machine Learning Project in Python Step-By-Step
Do you want to do machine learning using Python, but you’re having trouble getting started? In this post, you will complete your first machine learning project using Python. In this step-by-step tutorial you will: Download and install Python SciPy and get the most useful package for machine learning in Python. Load a dataset and understand […]
How to Develop a Framework to Spot-Check Machine Learning Algorithms in Python
Spot-checking algorithms is a technique in applied machine learning designed to quickly and objectively provide a first set of results on a new predictive modeling problem. Unlike grid searching and other types of algorithm tuning that seek the optimal algorithm or optimal configuration for an algorithm, spot-checking is intended to evaluate a diverse set of […]
How to Make Predictions with scikit-learn
How to predict classification or regression outcomes with scikit-learn models in Python. Once you choose and fit a final machine learning model in scikit-learn, you can use it to make predictions on new data instances. There is some confusion amongst beginners about how exactly to do this. I often see questions such as: How do […]
How to Generate Test Datasets in Python with scikit-learn
Test datasets are small contrived datasets that let you test a machine learning algorithm or test harness. The data from test datasets have well-defined properties, such as linearly or non-linearity, that allow you to explore specific algorithm behavior. The scikit-learn Python library provides a suite of functions for generating samples from configurable test problems for […]
How to Install a Python for Machine Learning on macOS
It can be difficult to install a Python machine learning environment on Mac OS X. Python itself must be installed first, and then there are many packages to install, and it can be confusing for beginners. In this tutorial, you will discover how to setup a Python 3 machine learning and deep learning development environment […]
How to Setup Your Python Environment for Machine Learning with Anaconda
It can be difficult to install a Python machine learning environment on some platforms. Python itself must be installed first and then there are many packages to install, and it can be confusing for beginners. In this tutorial, you will discover how to set up a Python machine learning development environment using Anaconda. After completing […]
How to Create a Linux Virtual Machine For Machine Learning Development With Python 3
Linux is an excellent environment for machine learning development with Python. The tools can be installed quickly and easily and you can develop and run large models directly. In this tutorial, you will discover how to create and setup a Linux virtual machine for machine learning with Python. After completing this tutorial, you will know: […]