I am training a model for predicting a number between 0 to 10 in this case. These are the number of roots of a polynomial. The input array for the number of polynomials is the coefficients of that polynomial from $x^n$ to constant. Even though I prepared a balanced dataset in which all number of roots (from 0 to 10) are equally existed, my input is an array of array of integers.

For example:

23 43 -545 34 45 -34 234 -434 234 434 -2344334

And the output of this is the number of roots of that polynomial (as I said before).

I tried many combinations of layers, but the accuracy never gets higher than 50% percent. By accuracy, I mean the number of correct predictions (I count the biggest probability as the prediction).

My Keras code for modeling:

model = Sequential()
model.add(Dense(32, input_dim=degree+1, activation='relu'))
model.add(Dense(32, activation='relu'))
model.add(Dense(16, activation='relu'))
model.add(Dense(degree+1, activation='softmax'))

              optimizer='adam', metrics=['accuracy'])

model.fit(X, y, epochs=500, batch_size=50, verbose=0)

Is there something that I am doing wrong? Is this a good model for this kind of problem? I am new to deep learing so if the answer is obvious, I am sorry.



Your information is not discriminative enough

Why? Coefficients of polynomials dont give (alteast partially) discriminative information about roots of the polynomial. In other words different coefficients could give same roots.

It does not matter how complex your network is it cant catch what is not there to be catched in the first place.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.