1

First of all, I just want to clarify that I'm a beginner with AI and I've never used TensorFlow.

So basically I want to make an AI that can predict the Critic_Score based on 13 features and this is the way I implemented it:

inputs = tf.keras.Input(shape=(13,))
x = tf.keras.layers.Dense(64, activation='relu')(inputs)
x = tf.keras.layers.Dense(64, activation='relu')(x)
outputs = tf.keras.layers.Dense(1, activation='sigmoid')(x)

model = tf.keras.Model(inputs, outputs)

model.compile(
    optimizer='adam',
    loss= tf.keras.losses.MeanSquaredError(),
    metrics=[tf.keras.metrics.AUC(name='auc')]
)
batch_size = 32
epochs = 30
history = model.fit(
     X_train,
     y_train,
     validation_split=0.2,
     batch_size = batch_size,
     epochs = epochs,
     callbacks=[tf.keras.callbacks.ReduceLROnPlateau()],
     verbose=0,

)

deepLearningEv = model.evaluate(X_test, y_test)


prediction = model.predict(X_test)

Img predictions

And all my predictions are 1, what am I doing wrong?

Albastrali
  • 11
  • 1
  • Could you specify, what kind of output you expect your model to create (e.g. share one sample from Y_train)? The sigmoid function you use for the output layer can be seen as kind of a probability of a value to be either 0 or 1. – Luca Knaack Jun 14 '22 at 20:28

1 Answers1

-1

The problem lies almost certainly in your output function. The sigmoid function you use can create values between 0 and 1 which is

I would advise you to take a look at the following resources. "Sigmoid — This results in a value between 0 and 1 which we can infer to be how confident the model is of the example being in the class", taken from here

So in your case, only predictions of 1 could mean, that the model wants to predict higher values but can't. Also, the very high MEA hints at that being the case as well.

Luca Knaack
  • 107
  • 8