autokeras icon indicating copy to clipboard operation
autokeras copied to clipboard

How to restrict the output of model to be positive

Open lwq-star opened this issue 2 years ago • 0 comments

I used the model to train data with only positive values, but the predictions yielded negative values. What can I do to make the model's predictions only positive? I don't want to directly change the negative prediction to a positive one. Should I add something to the model? reg = ak.StructuredDataRegressor(overwrite=True, metrics=[ta.metrics.RSquare(),tf.keras.metrics.RootMeanSquaredError()]) history = reg.fit(x, y, epochs=1000)

lwq-star avatar Jan 30 '23 14:01 lwq-star