My first logistic regression model gives bad accuracy. please check

@TMosh

Here is the “housing[1].csv” file:
housing[1].csv (1.1 MB)

Hey,

@TMosh Thanks for your thoughts! You’re suggesting that maybe the issue isn’t with my code, but with the data we’re using. That’s a good point.

I’ll try using different data to see if our model works better.

After seeing the GitHub link I provided, I agree that it seems like the model in that code struggled with overfitting, and the dataset appears to be difficult.

As you mentioned: "I recommend you test your code with a simple invented dataset that has a known simple solution (see below). " Where is the dataset?

Thanks for helping me figure this out!

You have to create it. I gave instructions in my reply for how to do it.

2 Likes

Hi,

@TMosh, as you suggested, I needed to create a dataset. Although you provided instructions, I found it difficult to understand how to proceed. Therefore, I ended up using a different dataset.

In linear regression, it achieved an accuracy of 57.50%. The accuracy for decision trees was 26.648%, and for gradient boosting, it was 56.22%.

Do you think these results are acceptable given the data, or it can be improved?

Here is the code:
Assignments (5).ipynb (274.0 KB)

Thank you for your guidance.

I think.
But tray again.

1 Like