-2

I am struggling to learn the basics of machine learning and I need to design a neural network using MLP (multi layer perceptron).

The network should predict the total cost of a car ride, based on 4 parameters: - average fuel consumption per 100km (between 4.7 and 11.5) - the weight of the car (between 700kg and 2300 kg) - number of people travelling with the car (between 2 and 4) - length of the trip (between 10km and 8000km)

Additionally I know that the total cost of the ride, which here is the output, should range between 100 and 40000.

I have to design the network analytically, without writing any piece of code. The purpose is to get a better understanding of the MLP network type.

I designed the neural network by having 4 entry units which correspond to each of the features listed, one hidden layer consisting of 2 neurons and one output neuron.

The problem is that I do not have an input data-set and I do not understand how will the ranges of the features help me.

In this case I should compute the weights using stochastic gradient descent but since this is not a classification problem I am not sure how to pick up the weights towards the output neuron.

1 Answers1

0

You can start at here: https://www.kaggle.com/xgdbigdata/keras-regression-tutorial where at block 2 you change to

model = Sequential()
model.add(Dense(output_dim=2, input_dim=4, activation='relu'))
model.add(Dense(1))

Keras will take care of weights and SGD. Each feature you divide by max should be enough. You can look at here for example: https://datascienceplus.com/keras-regression-based-neural-networks/

Bob
  • 11
  • 1