セクション 1. 章 9
single
Challenge: 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').
1234import 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())
タスク
スワイプしてコーディングを開始
- Assign the
'age'and'square_feet'columns ofdftoX. - Initialize the
LinearRegressionmodel. - Fit the model using
Xandy. - Predict the target for
X_newand store it iny_pred. - 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.
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 9
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください