joelowj / Machine-Learning-and-Reinforcement-Learning-in-Finance

Machine Learning and Reinforcement Learning in Finance New York University Tandon School of Engineering
245 stars 120 forks source link

Bank defaults prediction using FDIC dataset (80/100) #2

Open joelowj opened 6 years ago

joelowj commented 6 years ago

Current submission

Logistic Regression Stats Model 20/20 Logistic Regression using Scikit-learn 20/20 Logistic Regression fewer predictors 20/20 Logistic Regression with Tensorflow 0/20 Logistic Regression with Neural Network 20/20

I am left with Logistic Regression with Tensorflow which did not clear the grader (your answer to Logistic Regression with TensorFlow is not correct). In case, there is any issue with the grader, I will wait for a while before attempting this question again. If anyone managed to clear this and would like to help, feel free to start a discussion.

randy-tsukemen commented 5 years ago

Hi, I found that the grader need the gradient to run n_epochs*n_batches times. But I think the random_batch function did not go through all X_trainTf is rarely seen in other ML implementation.

for epoch in range(n_epochs):        
        for batch_index in range(n_batches):
            X_trainTf_batch, y_trainTf_batch = random_batch(X_trainTf, y_trainTf, batch_size)
            sess.run([optimizer, loss], feed_dict={X: X_trainTf_batch, 
                                                   y: y_trainTf_batch})
    y_proba_val = sess.run(y_proba, feed_dict={X: X_testTf})
joelowj commented 5 years ago

@minori111 , I see. Would you be able to post a screen shot of this set of code clearing the grader? And if so, would you like to make a pull request for it? (: