Ive been thinking about combining some processes between keras and Sci-kit Learn and am looking to the this group to either validate my process or tell Im crazy. Im creating a simple Regression problem using 17 inputs like this:
Creating test/train here:
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.25, random_state=7)
Building the network here:
model = Sequential()
model.add(Dense(34, input_dim=17, kernel_initializer='normal', activation='relu'))
model.add(Dense(17, kernel_initializer='normal', activation='relu'))
model.add(Dense(8, kernel_initializer='normal'))
model.add(Dense(1, kernel_initializer='normal'))
compiling the model with:
model.compile(loss='mean_squared_error', optimizer='adam')
fitting the model here:
model.fit(X_train,y_train,validation_data=(X_test,y_test), epochs=100, batch_size=10)
Now that Ive fit the model is the any reason I can use some of the SciKit functions and do the following?
Make predictions
y_pred = model.predict(X_test)
Assess the model results:
mse = mean_squared_error(y_test, y_pred)
rmse = sqrt(mse)
r2score = r2_score(y_test,y_pred)
Am I way off-base here?