Skip to content

Instantly share code, notes, and snippets.

View Samar-080301's full-sized avatar

Samar Pratap Singh Samar-080301

View GitHub Profile
import numpy as np
import pandas as pd
term = 60
P = 34689.96
def calc_interest(P,emi,interest_rate = 0.0702):
interest_paid = np.floor(((interest_rate/12)*P)*100)/100
principal_paid = np.round(emi-interest_paid, 2)
new_balance = np.round(P - principal_paid,2)
return(emi, interest_paid, principal_paid, new_balance)

Machine Learning Week 1 Quiz 2 (Linear Regression with One Variable) Stanford Coursera

Github repo for the Course: Stanford Machine Learning (Coursera)

Question 1

Consider the problem of predicting how well a student does in her second year of college/university, given how well she did in her first year.

Specifically, let x be equal to the number of "A" grades (including A-. A and A+ grades) that a student receives in their first year of college (freshmen year). We would like to predict the value of y, which we define as the number of "A" grades they get in their second year (sophomore year).