scikit-learn: Save and Restore Models

On many occasions, while working with the scikit-learn library, you’ll need to save your prediction models to file, and then restore them in order to reuse your previous work to: test your model on new data, compare multiple models, or anything else. This saving procedure is also known as object serialization – representing an object with a stream of bytes, in order to store it on disk, send it over a network or save to a database, while the restoring […]

Read more

TensorFlow: Save and Restore Models

Training a deep neural network model could take quite some time, depending on the complexity of your model, the amount of data you have, the hardware you’re running your models on, etc. On most of the occasions you’ll need to save your progress to a file, so in case of interruption (or a bug), you’ll be able to continue where you left off. Even more, after a successful training you’ll surely need to re-use the model’s learned parameters to make […]

Read more

TensorFlow Neural Network Tutorial

TensorFlow is an open-source library for machine learning applications. It’s the Google Brain’s second generation system, after replacing the close-sourced DistBelief, and is used by Google for both research and production applications. TensorFlow applications can be written in a few languages: Python, Go, Java and C. This post is concerned about its Python version, and looks at the library’s installation, basic low-level components, and building a feed-forward neural network from scratch to perform learning on a real dataset. The training […]

Read more

Using Machine Learning to Predict the Weather: Part 1

Part 1: Collecting Data From Weather Underground This is the first article of a multi-part series on using Python and Machine Learning to build models to predict weather temperatures based off data collected from Weather Underground. The series will be comprised of three different articles describing the major aspects of a Machine Learning project. The topics to be covered are: Data collection and processing (this article) Linear regression models (article 2) Neural network models (article 3) The data used in […]

Read more

Using Machine Learning to Predict the Weather: Part 2

This article is a continuation of the prior article in a three part series on using Machine Learning in Python to predict weather temperatures for the city of Lincoln, Nebraska in the United States based off data collected from Weather Underground’s API services. In the first article of the series, Using Machine Learning to Predict the Weather: Part 1, I described how to extract the data from Weather Underground, parse it, and clean it. For a summary of the topics […]

Read more

Using Machine Learning to Predict the Weather: Part 3

This is the final article on using machine learning in Python to make predictions of the mean temperature based off of meteorological weather data retrieved from Weather Underground as described in part one of this series. The topic of this final article will be to build a neural network regressor using Google’s Open Source TensorFlow library. For a general introduction into TensorFlow, as well a discussion of installation methods, please see Mihajlo Pavloski’s excellent post TensorFlow Neural Network Tutorial. Topics […]

Read more

K-Means Clustering with Scikit-Learn

Introduction K-means clustering is one of the most widely used unsupervised machine learning algorithms that forms clusters of data based on the similarity between data instances. For this particular algorithm to work, the number of clusters has to be defined beforehand. The K in the K-means refers to the number of clusters. The K-means algorithm starts by randomly choosing a centroid value for each cluster. After that the algorithm iteratively performs three steps: (i) Find the Euclidean distance between each […]

Read more

Introduction to Neural Networks with Scikit-Learn

What is a Neural Network? Humans have an ability to identify patterns within the accessible information with an astonishingly high degree of accuracy. Whenever you see a car or a bicycle you can immediately recognize what they are. This is because we have learned over a period of time how a car and bicycle looks like and what their distinguishing features are. Artificial neural networks are computation systems that intend to imitate human learning capabilities via a complex architecture that […]

Read more

Linear Regression in Python with Scikit-Learn

There are two types of supervised machine learning algorithms: Regression and classification. The former predicts continuous value outputs while the latter predicts discrete outputs. For instance, predicting the price of a house in dollars is a regression problem whereas predicting whether a tumor is malignant or benign is a classification problem. In this article we will briefly study what linear regression is and how it can be implemented using the Python Scikit-Learn library, which is one of the most popular […]

Read more

K-Nearest Neighbors Algorithm in Python and Scikit-Learn

The K-nearest neighbors (KNN) algorithm is a type of supervised machine learning algorithms. KNN is extremely easy to implement in its most basic form, and yet performs quite complex classification tasks. It is a lazy learning algorithm since it doesn’t have a specialized training phase. Rather, it uses all of the data for training while classifying a new data point or instance. KNN is a non-parametric learning algorithm, which means that it doesn’t assume anything about the underlying data. This […]

Read more
1 7 8 9 10 11