DEV Community

Cover image for Machine Learning - Celsius V Fashion Mnist
Sandeep Balachandran
Sandeep Balachandran

Posted on

Machine Learning - Celsius V Fashion Mnist

Hey there,
We've seen two different types of neural networks at this point

details

  • Our first neural network learned to convert Celsius degrees to Fahrenheit.
  • So it returned a single number that could be a wide range of floating-point numbers
  • On the other hand the neural network i mentioned using fashion mnist dataset produced 10 probability numbers

details

On the probabilities indicate how confident our neural network is the given input image is of a particular class.

So we can see that neural networks can be used to solve different kinds of problems.
The first problem where we predict a single number from an input is known as the regression problem.

Converting from Celsius to Fahrenheit is one example of a regression problem
Determining the price of a house given its number of bedrooms square footage number of bathrooms etc is another example.
On the other hand the problem we saw in this lesson of being able to classify images of clothing is known as a classification problem

Given the input the model will give as output a probability distribution specifying the confidence the input is of a certain class .
In this lesson we classified items of clothing. Later we'll build a network that can take an image and tell whether it's a cat or a dog and this is another example of a classification problem

details

So let's summarize the difference between these two types of problems
For regression problems the output is a number .The goal of this number is to be the best result even the input .So in regression problems we are not trying to classify anything. We're just predicting a number that is the best fit to the data .For classification problems we have an output consisting of a set of classes .This classify sub input for example an image as a shirt or a sandal .The output in this case is always a probability distribution .So the sum of all output numbers corresponding to the classes will be 1 or 100 percent .The main takeaway point is that all of our machine learning models is one of these categories a regression or a classification model and the difference is if we want a number as a predicted result or probabilities across a set of classes.

Key Points
Regression: A model that outputs a single value. For example, an estimate of a house’s value.
Classification: A model that outputs a probability distribution across several categories. For example, in Fashion MNIST, the output was 10 probabilities, one for each of the different types of clothing. Remember, we use Softmax as the activation function in our last Dense layer to create this probability distribution.

Lets go throught CNN (Convolutional Neural Network) in the next one. Have a great week.

Top comments (0)