In a previous tutorial, we explored logistic regression as a simple but popular machine learning algorithm for binary classification implemented in the OpenCV library. So far, we have seen how logistic regression may be applied to a custom two-class dataset we have generated ourselves. In this tutorial, you will learn how the standard logistic regression […]
Search results for "regression"
Logistic Regression in OpenCV
Logistic regression is a simple but popular machine learning algorithm for binary classification that uses the logistic, or sigmoid, function at its core. It also comes implemented in the OpenCV library. In this tutorial, you will learn how to apply OpenCV’s logistic regression algorithm, starting with a custom two-class dataset that we will generate ourselves. […]
Building a Logistic Regression Classifier in PyTorch
Logistic regression is a type of regression that predicts the probability of an event. It is used for classification problems and has many applications in the fields of machine learning, artificial intelligence, and data mining. The formula of logistic regression is to apply a sigmoid function to the output of a linear function. This article […]
Training Logistic Regression with Cross-Entropy Loss in PyTorch
In the previous session of our PyTorch series, we demonstrated how badly initialized weights can impact the accuracy of a classification model when mean square error (MSE) loss is used. We noticed that the model didn’t converge during training and its accuracy was also significantly reduced. In the following, you will see what happens if […]
Building a Regression Model in PyTorch
PyTorch library is for deep learning. Some applications of deep learning models are to solve regression or classification problems. In this post, you will discover how to use PyTorch to develop and evaluate neural network models for regression problems. After completing this post, you will know: How to load data from scikit-learn and adapt it […]
Using Autograd in PyTorch to Solve a Regression Problem
We usually use PyTorch to build a neural network. However, PyTorch can do more than this. Because PyTorch is also a tensor library with automatic differentiation capability, you can easily use it to solve a numerical optimization problem with gradient descent. In this post, you will learn how PyTorch’s automatic differentiation engine, autograd, works. After […]
Making Predictions with Logistic Regression in PyTorch
Logistic regression is a statistical technique for modeling the probability of an event. It is often used in machine learning for making predictions. We apply logistic regression when a categorical outcome needs to be predicted. In PyTorch, the construction of logistic regression is similar to that of linear regression. They both applied to linear inputs. […]
Training a Multi-Target Multilinear Regression Model in PyTorch
The multi-target multilinear regression model is a type of machine learning model that takes single or multiple features as input to make multiple predictions. In our earlier post, we discussed how to make simple predictions with multilinear regression and generate multiple outputs. Here we’ll build our model and train it on a dataset. In this […]
Multi-Target Predictions with Multilinear Regression in PyTorch
While in the previous few tutorials we worked with single output multilinear regression, here we’ll explore how we can use multilinear regression for multi-target predictions. Complex neural network architectures are essentially having each neuron unit to perform linear regression independently then pass on their result to another neuron. Therefore, knowing how such regression works is […]
Training a Single Output Multilinear Regression Model in PyTorch
A neural network architecture is built with hundreds of neurons where each of them takes in multiple inputs to perform a multilinear regression operation for prediction. In the previous tutorials, we built a single output multilinear regression model that used only a forward function for prediction. In this tutorial, we’ll add optimizer to our single […]