無標(biāo)題文章

In this module,we focused on using regression to predict a continuous value(house prices) from features of the house (square feet of living space,numbre of bedrooms,..).We also built an iPython notebook for predicting house prices,using data from King County,USA,the region where the city of Seattle is located.
In this assignment ,we are going to build a more accurate regression model for predicting house prices by including more features of the house. In the process,we will also become more familiar with how the Python langugae can be used for data exploation,data transformations and machine learning.These techniques will be key to building intelligent applications.
Follow the rest of the instructions on this page wo complete your program.When you are done,instead of uploading your code, you will answer a series of quiz questions(see the quiz after this reading)to document your completion of this assignment. The instructions will indicate what data to collect for answering the quiz.

Learning outcomes

  • Execute programs with the iPython notebook
  • Load and transform real,tabular data
  • Compute summaries and statistics of the data
  • Buil a regression model using features of the data

Resources you will need

You will need to install the software tools or use the free Amazon EC2 Machine. Instructions for both options are provided in the reading for Module 1.

Now you are ready to get started!

What you will do

Now you are ready! We are going do three tasks in this assignment.There are 3 results you need to gather along the way to enter into the quiz after this reading

  1. Selection and summary statistics: In the notebook we covered in the module, we discovered which neighborhood(zip code)of Seattle had the highest average house sale price.Now ,take the sales data,select only the houses with this zip code,and compute the average price.Save this result to answer the quiz at the end.
    2.Filtering data:One of the key features we used in our model was the number of square feet of living sqace in the house.For this part,we are going to use the idea of filtering data.
  • In particular,we are going to use logical filters to select rows of an SFrame. You can find more info in the LogicalFile...
  • Using such filter,first select the houses that have sqft_living higher than 2000 sqft but no larger than 4000 sqft
  • What fraction of the all houses have sqftliving in this range? Save this result to answer the quiz at the end
    3.Building a regression model with several more feature: In the sample notebook,we build two regression models to predict house prices, one using just'sqft_living' and other using a few more features, we called this set []
    Now,going back to the original dataset,youwilll build a model using the following features:

Note that using copy and paste from this webpage to the Ipython Notebook sometimes does not work perfectly in some operating systems,especially on Windows.For example,the quotes defining strings myay not paste correctly.Please check carefully if you use copy&paste.

  • Compute the RMSE(root mean squared error ) on the test_data for the model using just my_features,and for the one using advanced_features.
    Note1 : both models must be trained on the original sales dataset ,not the filtered one.
    note2: when doing the train-test split,make sure you use seed=0,so you get the same training and test sets,and thusresults,as we do.
    Note3: in the module we discussed residual sum of squares(RSS) as an error metric for regression,but graphlab create uses root mean squared error.These are two common measures of error regression,and RMSE is simply the square root the the mean RSS:
    RMSE = 根號()RSS/N)
    where N is the number of data points. RMSE can be more intutive than RSS,since its units are the same as that of the target column in the data,in our case the unit is dollars,and doesn't grow with the number of data points,like the RSS does.
    Important note:when answering the question below using GraphLab Create,when you call linerar_regression.create() function,make sure you use the para
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末及皂,一起剝皮案震驚了整個濱河市倚评,隨后出現(xiàn)的幾起案子云芦,更是在濱河造成了極大的恐慌空另,老刑警劉巖锄俄,帶你破解...
    沈念sama閱讀 216,470評論 6 501
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異珍促,居然都是意外死亡褥紫,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,393評論 3 392
  • 文/潘曉璐 我一進(jìn)店門冬筒,熙熙樓的掌柜王于貴愁眉苦臉地迎上來统刮,“玉大人,你說我怎么就攤上這事账千。” “怎么了暗膜?”我有些...
    開封第一講書人閱讀 162,577評論 0 353
  • 文/不壞的土叔 我叫張陵匀奏,是天一觀的道長。 經(jīng)常有香客問我学搜,道長娃善,這世上最難降的妖魔是什么论衍? 我笑而不...
    開封第一講書人閱讀 58,176評論 1 292
  • 正文 為了忘掉前任,我火速辦了婚禮聚磺,結(jié)果婚禮上坯台,老公的妹妹穿的比我還像新娘。我一直安慰自己瘫寝,他們只是感情好蜒蕾,可當(dāng)我...
    茶點故事閱讀 67,189評論 6 388
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著焕阿,像睡著了一般咪啡。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上暮屡,一...
    開封第一講書人閱讀 51,155評論 1 299
  • 那天撤摸,我揣著相機與錄音,去河邊找鬼褒纲。 笑死准夷,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的莺掠。 我是一名探鬼主播衫嵌,決...
    沈念sama閱讀 40,041評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼汁蝶!你這毒婦竟也來了渐扮?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 38,903評論 0 274
  • 序言:老撾萬榮一對情侶失蹤掖棉,失蹤者是張志新(化名)和其女友劉穎墓律,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體幔亥,經(jīng)...
    沈念sama閱讀 45,319評論 1 310
  • 正文 獨居荒郊野嶺守林人離奇死亡耻讽,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,539評論 2 332
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了帕棉。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片针肥。...
    茶點故事閱讀 39,703評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖香伴,靈堂內(nèi)的尸體忽然破棺而出慰枕,到底是詐尸還是另有隱情,我是刑警寧澤即纲,帶...
    沈念sama閱讀 35,417評論 5 343
  • 正文 年R本政府宣布具帮,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏蜂厅。R本人自食惡果不足惜匪凡,卻給世界環(huán)境...
    茶點故事閱讀 41,013評論 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望掘猿。 院中可真熱鬧病游,春花似錦、人聲如沸稠通。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,664評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽采记。三九已至佣耐,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間唧龄,已是汗流浹背兼砖。 一陣腳步聲響...
    開封第一講書人閱讀 32,818評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留既棺,地道東北人讽挟。 一個月前我還...
    沈念sama閱讀 47,711評論 2 368
  • 正文 我出身青樓,卻偏偏與公主長得像丸冕,于是被迫代替她去往敵國和親耽梅。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,601評論 2 353

推薦閱讀更多精彩內(nèi)容

  • 與“模擬器”運行效果不同胖烛,在真機上面直接用 是不調(diào)用 這些代理方法的眼姐,更不會加載h5界面。 查了相關(guān)文檔以及百度上...
    舊雨傘時閱讀 596評論 0 0
  • 請你先安裝chrome瀏覽器,并且設(shè)為你的默認(rèn)瀏覽器趟畏。下載地址谷歌的chrome瀏覽器 在chrome瀏覽器中打開...
    masakakaikai閱讀 2,751評論 5 3
  • 我媽說我今年命中犯桃花贡歧,應(yīng)料有許多男生圍繞身邊。轉(zhuǎn)念一想赋秀,今年還真是一堆男生圍繞利朵,因為玩了一個特別雄性的游戲。我很...
    雀舞閱讀 170評論 0 0
  • 我們可以在圖1中看到img的路徑是動態(tài)生成的猎莲,圖片的路徑寫在了一個json對象中绍弟,這樣看上去好像沒有什么問題,但是...
    shirley媛閱讀 5,072評論 0 2