I'm getting an "Unbound Local Error" Practice Lab Linear Regression

I’m receiving an “unbound local error” after I run my code. Can someone please advise?

you should give us compute_cost function

see if cost_sum you have written without assigning any value

The problem here is that you haven’t defined cost_sum variable yet before summing it, first you need to define it like for example:

cost_sum =0

I am not sure what are you trying to do here, but that’s your current problem!

2 Likes