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.
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')) model.compile(loss="categorical_crossentropy", 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.