Skip to content

Instantly share code, notes, and snippets.

@shubham0204
Created May 27, 2019 11:19
Show Gist options
  • Select an option

  • Save shubham0204/909ada9db687de9259344775c1396a00 to your computer and use it in GitHub Desktop.

Select an option

Save shubham0204/909ada9db687de9259344775c1396a00 to your computer and use it in GitHub Desktop.
import pandas as pd
import numpy as np
import tensorflow as tf
from sklearn.model_selection import train_test_split
data = pd.read_csv( 'graduate_admission_prediction/Admission_Predict_Ver1.1.csv' )
data.head()
continuous_features = data[ ['GRE Score','TOEFL Score','University Rating','SOP','LOR ','CGPA'] ].values / 100
categorical_research_features = data[ [ 'Research' ] ].values
X = np.concatenate( [ continuous_features , categorical_research_features ] , axis=1 )
Y = data[ [ 'Chance of Admit ' ] ].values
train_features , test_features ,train_labels, test_labels = train_test_split( X , Y , test_size=0.2 )
X = tf.constant( train_features , dtype=tf.float32 )
Y = tf.constant( train_labels , dtype=tf.float32 )
test_X = tf.constant( test_features , dtype=tf.float32 )
test_Y = tf.constant( test_labels , dtype=tf.float32 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment