Skip to content

Week 1 Solutions - Mansi Pandey#3

Open
mansipandey18 wants to merge 8 commits intosubhasmitasahoo:mainfrom
mansipandey18:main
Open

Week 1 Solutions - Mansi Pandey#3
mansipandey18 wants to merge 8 commits intosubhasmitasahoo:mainfrom
mansipandey18:main

Conversation

@mansipandey18
Copy link
Copy Markdown

  1. I learned how to plot lines using Python and understand how slope (m) and intercept (b) shape a line.
  2. I understood that slope controls the tilt of the line and intercept moves the line up or down.
  3. I learned how to calculate predictions using the formula y = mx + b.
  4. I learned what error means in machine learning — the difference between actual value and predicted value.
  5. I also learned how to save Jupyter notebooks as .ipynb in VS Code.

Copy link
Copy Markdown
Owner

@subhasmitasahoo subhasmitasahoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments on code.

"\n",
"1. Create a list of numbers from **1 to 7**.\n",
"2. Print each number multiplied by **10**.\n",
"3. Print only **odd** numbers.\n",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 & 4 are missing

"\n",
"1. Create a list of **5 fruits**.\n",
"2. Print the **first** and **last** fruit.\n",
"3. Add a new fruit to the list.\n",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing code

"def squareOfNum(n):\n",
" return n*n\n",
"\n",
"print(squareOfNum(8)) # 65"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

65 is wrong

Copy link
Copy Markdown
Owner

@subhasmitasahoo subhasmitasahoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you save output of each excercise cell, so that its easy for me to review. I see errors for many cells output.

Copy link
Copy Markdown
Owner

@subhasmitasahoo subhasmitasahoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similarly save output for each cell in bonus challenge as well.

@mansipandey18
Copy link
Copy Markdown
Author

What I Learned:

  1. I learned how Linear Regression Works
  2. Calculating Slope & Intercept Manually
  3. I learned how to use this for estimating future values.
  4. Residuals = difference between actual and predicted values. Helps check whether the line fits well or poorly.
  5. Learned to calculate how well the model explains the data. R^2 close to 1 means excellent fit. R^2 near 0 means poor fit.
  6. Plotting Regression Line
  7. Multiple Linear Regression

@mansipandey18
Copy link
Copy Markdown
Author

✅ Completed the house price prediction exercise using linear regression! I learned how to:

  1. Analyze data and find patterns (size vs price)
  2. Build a model step by step (calculate slope and intercept)
  3. Make predictions for new houses using Price = m × Size + b
  4. Evaluate the model with errors and R^2 score

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants