0

I have some questions about the sequential model from Keras. Please let me know if there is anything wrong with how I presented my questions and I will be more than happy to fix it to make it align with community guidelines.

I am working with a data set of about 6000 points. I have three input variables (all real numbers) and I have one output (also a real number). It is essentially a regression problem.

  1. I found here that the sequential model is not a good idea to use if you have multiple inputs. Is this true? I also found many examples of people using this network for multiple input values so I'm confused.
  2. My three data inputs represent three different parameters for a structure design. This is considered sequential data is that correct?

The current code I have is giving me rather good $R^2$ values (~.85) so I am wondering if this is a fluke or if what I have done is valid even though I have a multi-dimensional input.

This is more of a conceptual question but in case it helps, here is the code I wrote:

model = Sequential()
model.add(Dense(3, input_shape=(3,), activation='relu')) 
model.add(Dense(13, activation='relu'))#hiddn layer 1
model.add(Dense(9, activation='relu'))#hidden layer 2
model.add(Dense(9, activation='relu'))#hidden layer 3
model.add(Dense(9, activation='relu'))#hidden layer 4 
model.add(Dense(1,)) 
model.compile(Adam(learning_rate = 0.001), 'mean_squared_error')
earlystopper = EarlyStopping(monitor='val_loss', min_delta=0, patience=15, verbose=1, mode='auto')
model.fit(X_trainL, y_trainL, epochs = 5000, validation_split = 0.1,shuffle = True, verbose = 0,callbacks=[earlystopper])

1 Answers1

0

Sequential model when it says you cant have multiple inputs its basically does not refer to your case were you have single input of 3 dimension. The examples of multiple inputs and multiple output are as follows :

  1. Training a model to generate image caption requires both image and text data during training which is multiple inputs

No, the three variables you have is not a sequential data as API refers it.

R2 values may be accurate but rely on it if it is calaculate on test data only

Ashwiniku918
  • 1,864
  • 3
  • 17