I have dataset of 15 features and the goal is to estimate a best fitting curve (regression). Now I want to use a deep learning technique for this purpose. Now I see that there are many architectures that can be used such as CNN, DBM or auto-encoder, etc.. Which one to go for. And I could not find any examples for how to use the same. A sample code would be of great help. Thanks
P.S. Some of the features are categorical. How do we handle that as well?
Best Answer
For standard regression I recommend using Multi-Layer Perceptron (MLP) with Mean Square Error (MSE) loss function. The model can be defined in Keras as follows:
model = Sequential() model.add(Dense(20, input_dim=13, init='normal', activation='relu')) model.add(Dense(10, init='normal', activation='relu')) model.add(Dense(1, init='normal')) model.compile(loss='mean_squared_error', optimizer='adam')
See this article for a complete example. For a TensorFlow implementation, consider the following code.
Similar Posts:
- Solved – Keras: acc and val_acc are constant over 300 epochs, is this normal
- Solved – Trying to emulate linear regression using Keras
- Solved – Stacked shallow autoencoders vs. deep autoencoders
- Solved – Neural Networks – Performance VS Amount of Data
- Solved – How to achieve variational autoencoder (VAE) with unrestricted input