Hey @jrich20! I’m about to finish this project and I’m a bit confused here on how r2 score gives us some insight into how each feature impacts the acceptance chances! I’ve got an 0.76 r2_score, wondering if that’s good enough.
First I searched for means to find the feature importance for the model.
t’s deep learning, there’s nothing like that due to the model complexity and its “black box” aspect. To have some sort of in-depth into each feature, it would require an iterative approach: dropout of features.
Anyway, thanks for the skill path! It’s pretty nice!
Also @lendoo, nice project! Here’s mine 
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras import layers
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.preprocessing import Normalizer
from sklearn.metrics import r2_score
import eli5
from eli5.sklearn import PermutationImportance
df = pd.read_csv('admissions_data.csv')
features = df.iloc[:,1:-1]
labels = df.iloc[:,-1]
print(features.head())
features_train, features_test, labels_train, labels_test = train_test_split(features, labels, test_size=0.1)
scaler = StandardScaler()
features_train = scaler.fit_transform(features_train)
features_test = scaler.transform(features_test)
model = Sequential([
layers.InputLayer(input_shape=(features_train.shape[1],)),
layers.Dense(6, activation='relu'),
layers.Dropout(0.2),
layers.Dense(6, activation='relu'),
layers.Dense(1),
])
opt = keras.optimizers.Adam(learning_rate = 0.1)
model.compile(loss='mse', metrics=['mae'], optimizer=opt)
history = model.fit(features_train, labels_train, epochs=40, batch_size=250, verbose=1, validation_split=0.2)
res_mse, res_mae = model.evaluate(features_test, labels_test)
print(history.history.keys())
plt.plot(history.history['mae'])
plt.plot(history.history['val_mae'])
plt.title('model mae')
plt.ylabel('mae')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.show()