The code to train my model is:
from keras.models import Sequential
from keras.layers import Dense
import numpy
import pandas as pd
X = pd.read_csv(
"data/train.csv", header=0, usecols=['Type', 'Age', 'Breed1', 'Breed2', 'Gender', 'Color1', 'Color2', 'Color3', 'MaturitySize', 'FurLength', 'Vaccinated', 'Dewormed', 'Sterilized', 'Health', 'Quantity', 'Fee', 'VideoAmt', 'PhotoAmt'])
Y = pd.read_csv(
"data/train.csv", header=0, usecols=['AdoptionSpeed'])
X = pd.get_dummies(X, columns=["Type", "Breed1",
"Breed2", 'Color1', 'Color2', 'Color3', 'Gender', 'MaturitySize', 'FurLength'])
print(X)
Y = Y['AdoptionSpeed'].apply(lambda v: v / 4)
input_units = X.shape[1]
model = Sequential()
model.add(Dense(input_units, input_dim=input_units, activation='relu'))
model.add(Dense(input_units, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(loss='binary_crossentropy',
optimizer='adam', metrics=['accuracy'])
model.fit(X, Y, epochs=250, batch_size=1000)
scores = model.evaluate(X, Y)
I have a file called test.csv. How can I test that set against the model to see how effective my model is?
It seems to have a 97% accuracy with the training data, but I'm concerned it may be overfitting.