#Insurance regression model help

3 messages · Page 1 of 1 (latest)

analog panther
#

what does the dataset look like?

analog panther
#

if they are all categorical try this code and see if it works at all. It will likely be worse than XGBoost and Random forest but its worth a try with the little info i have so far:

import tensorflow as tf
class try_model(tf.keras.Model):
def init(self):

self.norm = tf.keras.layers.BatchNormalization()

self.intermediate_layers = [tf.keras.layers.Dense(128, activation="relu") for _ in range(3)]

self.out_layer = tf.keras.layers.Dense(1)

def call(self, x):

x = self.norm(x)

for i in self.intermediate_layers:
x = i(x)

return self.out_layer(x)

model = try_model()

model.fit(x_train, y_train, validation_split=0.2, epochs=100, callbacks=[tf.keras.callbacks.EarlyStopping(patience=15, restore_best_weights=True)])

worthy nebula
#

how bad is it? maybe its the preprocessing?