Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Predicting Prices Using Two Features | Section
Supervised Learning Essentials
セクション 1.  9
single

single

bookChallenge: Predicting Prices Using Two Features

メニューを表示するにはスワイプしてください

For this challenge, the same housing dataset will be used. However, now it has two features: age and area of the house (columns 'age' and 'square_feet').

1234
import pandas as pd df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/b22d1166-efda-45e8-979e-6c3ecfc566fc/houseprices.csv') print(df.head())
copy
タスク

スワイプしてコーディングを開始

  1. Assign the 'age' and 'square_feet' columns of df to X.
  2. Initialize the LinearRegression model.
  3. Fit the model using X and y.
  4. Predict the target for X_new and store it in y_pred.
  5. Print the model's intercept and coefficients.

解答

If you did everything right, you got the p-values close to zero. That means all our features are significant for the model.

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  9
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt