Assignment: Housing Prices

Hello, i am having the same issue with CW1.

1 Like

Hi,

just for notify that the notebook doesn’t load keras out of the box. This is the cell:

grader-required-cell

import tensorflow as tf
import numpy as np

1 Like

hi hi I need a bit of help with this assignment (c1w1) as it doesn’t import keras from the first cell before the start code area. Is there a way to define my model without using keras or is there another quick fix for this problem?

Have a good day.

1 Like

There is an error on this notebook.

If you read above, @m.abidat posted a new version of the notebook.

Try this
C1W1_Assignment.ipynb (4.3 KB)

1 Like

ailed test case: prediction is NOT close enough to 4.0 for houses with 7 bedrooms.
Expected:
a value close to 4.0 (with absolute tolerance of 0.05),
but got:
399.90460205078125.

Failed test case: prediction is NOT close enough to 5.5 for houses with 10 bedrooms.
Expected:
a value close to 5.5 (with absolute tolerance of 0.05),
but got:
550.0387573242188.
what problem im my array can give me example

1 Like

The graded workbook does not come with Keras and we’re unable to import it (that cell seems locked). What model do we use If the workbook is not including Keras. Thanks, @m.abidat.

1 Like

Actually, the matter is that number of epochs means better curve fitting or lower loss, that’s the matter you are facing in this case. Increasing the number far more gives more accurate results.
Try 5k or 10k epochs instead and then check the results :blush:

1 Like

I have sent a dm regarding the assignment. My answer was correct but I didn’t. I dm staff here but didn’t get a response and now its showing as overdue. Can someone please dm me thank you

1 Like

Hello,

Can you share your notebook via personal DM. Do not post any code or your notebook in public post as it is against community guidelines.

Regards
DP

1 Like

Same problem here. Lots of tries and always:

Failed test case: prediction is NOT close enough to 4.0 for houses with 7 bedrooms.
Expected:
a value close to 4.0 (with absolute tolerance of 0.05),
but got:
400.0003967285156.

Failed test case: prediction is NOT close enough to 5.5 for houses with 10 bedrooms.
Expected:
a value close to 5.5 (with absolute tolerance of 0.05),
but got:
550.0007934570312.

Some help please

1 Like

Make sure your xs and ys values are not in 100s as it clearly mentions to use single numerical like for assuming one bedroom costs 400, the. Use xs as 1 and ys as 4 for its relative output in housing price. Check the instructions at the start of the assignment

2 Likes

Solved. Thanks

1 Like

@Deepti_Prasad has it right that you need to scale the numbers properly to pass the grader. But the point is to learn an important characteristic of this kind of modeling. If your inputs are not at a common scale, it causes issues with the slope of the partial derivatives/ gradients and can lead to instability or lack of conversion during training. Scaling on the way in makes your training more efficient and effective - much better than merely dividing by 100 at the end. Try it yourself by running training with different input values. My assertion is that you will have better predictions with fewer epochs when the units of measure are prescaled than not. You should verify and understand why (or why not). Cheers

1 Like