Skip to content

Instantly share code, notes, and snippets.

@brinnaebent
Created June 30, 2020 01:45
Show Gist options
  • Save brinnaebent/b031e8432766e1a2803b0222a00413dd to your computer and use it in GitHub Desktop.
Save brinnaebent/b031e8432766e1a2803b0222a00413dd to your computer and use it in GitHub Desktop.
# Train data - all other people in dataframe
data_train = data_filtered.drop(columns=dropcols)
X_train = data_train.drop(columns=[outcomevar])
feature_list = list(X_train.columns) #Get a feature list to use for importances later on
X_train= np.array(X_train) #Re-format as numpy array for input into model
y_train = np.array(data_train[outcomevar]) #Outcome variable here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment