1 00:00:00,000 --> 00:00:04,122 [MUSIC] 2 00:00:04,122 --> 00:00:08,454 So we seen this one example, and now let's look at a second house. 3 00:00:08,454 --> 00:00:17,230 So I'm going to now prediction for 4 00:00:17,230 --> 00:00:22,110 a second fancier house. 5 00:00:24,720 --> 00:00:26,170 So let's look at that. 6 00:00:26,170 --> 00:00:28,584 So let's call this house2. 7 00:00:28,584 --> 00:00:34,758 So, house2 from our sales data, sales, is going to be the one, 8 00:00:34,758 --> 00:00:38,821 again, we're going to use a filter here. 9 00:00:38,821 --> 00:00:43,008 So it's the one 10 00:00:43,008 --> 00:00:48,162 whose id is equal to 11 00:00:48,162 --> 00:00:55,254 1925069082. 12 00:00:55,254 --> 00:00:59,940 So let's take a look at what house2 looks like. 13 00:01:01,390 --> 00:01:05,843 House2 was sold in 2015 for $2.2 million. 14 00:01:05,843 --> 00:01:10,378 It has 5 bedrooms, 4 and a quarter bathrooms, many more bathrooms, 15 00:01:10,378 --> 00:01:14,474 4,640 square feet of living space, so it's much bigger. 16 00:01:14,474 --> 00:01:18,521 It's about 460 square meters. 17 00:01:18,521 --> 00:01:20,181 It's a pretty big house. 18 00:01:20,181 --> 00:01:24,258 So let's look at an image. 19 00:01:24,258 --> 00:01:27,930 I kinda downloaded also, an image for this house. 20 00:01:27,930 --> 00:01:31,470 So here's my little cheat sheet for 21 00:01:31,470 --> 00:01:36,910 the image, and I'm going to insert it. 22 00:01:36,910 --> 00:01:42,400 So scan, so as before we're gonna do an image whose source. 23 00:01:42,400 --> 00:01:45,767 So, this I downloaded to the basic directory here. 24 00:01:45,767 --> 00:01:48,343 It's called 25 00:01:48,343 --> 00:01:57,945 house-1925069082.jog, close, 26 00:01:57,945 --> 00:02:01,930 not jog, but jpeg. 27 00:02:03,370 --> 00:02:04,490 So, that should work. 28 00:02:04,490 --> 00:02:08,534 So, remember that other house cost $620,000. 29 00:02:08,534 --> 00:02:11,088 This one costs $2.2 million. 30 00:02:11,088 --> 00:02:12,880 Let's take a look at it. 31 00:02:12,880 --> 00:02:13,700 It looks fancier. 32 00:02:13,700 --> 00:02:15,170 It looks cool, has a bigger yard. 33 00:02:15,170 --> 00:02:16,440 But check this out. 34 00:02:16,440 --> 00:02:17,980 It's on the water. 35 00:02:17,980 --> 00:02:19,970 It's a waterfront house. 36 00:02:19,970 --> 00:02:22,630 Now that explains why it costs $2 million. 37 00:02:22,630 --> 00:02:24,830 It's fancier, much fancier. 38 00:02:24,830 --> 00:02:30,230 So, let's see now what our models predict for the value of this property. 39 00:02:30,230 --> 00:02:32,510 So, it costs $2.2 million. 40 00:02:32,510 --> 00:02:37,190 Let's print what the square foot model predicts. 41 00:02:38,200 --> 00:02:44,620 So, just like before, we're going to do .predict on house2. 42 00:02:44,620 --> 00:02:48,287 And, it predicts it costs only $1.25 million. 43 00:02:48,287 --> 00:02:50,621 So, it didn't do so well. 44 00:02:50,621 --> 00:02:56,717 So let's look at what the more advanced models, 45 00:02:56,717 --> 00:03:01,790 so my_features model.predict does. 46 00:03:01,790 --> 00:03:03,790 And before I hit Enter here, 47 00:03:03,790 --> 00:03:07,140 it's good to start thinking about what should happen here. 48 00:03:07,140 --> 00:03:10,861 The other house, the one above, where the, the one with more features, 49 00:03:10,861 --> 00:03:14,704 more than one features didn't make a big difference or actually did worse, 50 00:03:14,704 --> 00:03:16,822 was a pretty standard house for Seattle. 51 00:03:16,822 --> 00:03:19,843 Standard number of bedrooms, standard number of bathrooms, 52 00:03:19,843 --> 00:03:23,510 it was kind of common, so you expected both models to do about the same. 53 00:03:23,510 --> 00:03:24,560 But this house is crazy. 54 00:03:24,560 --> 00:03:27,580 It has features which are hard to capture just because of the square feet. 55 00:03:27,580 --> 00:03:28,301 It has waterfront. 56 00:03:28,301 --> 00:03:30,182 It has lots of bathrooms, lots of bedrooms. 57 00:03:30,182 --> 00:03:36,620 So we expect here for the more advanced feature model to do better. 58 00:03:36,620 --> 00:03:38,460 Oh, I misspelled something. 59 00:03:39,650 --> 00:03:42,300 Oh, I forgot, here my features_model. 60 00:03:42,300 --> 00:03:44,044 Sorry about that, that was really anticlimactic. 61 00:03:44,044 --> 00:03:49,328 But if we run it, you see it's 1.38 million. 62 00:03:49,328 --> 00:03:50,831 It's a little closer. 63 00:03:50,831 --> 00:03:53,640 As you remember from before, the error difference was too big, but 64 00:03:53,640 --> 00:03:55,522 here it's a little closer to the true price. 65 00:03:55,522 --> 00:03:57,892 So it does a bit better on this house. 66 00:04:01,133 --> 00:04:04,518 Now, just to conclude, 67 00:04:04,518 --> 00:04:09,193 let's do a even fancier house, so 68 00:04:09,193 --> 00:04:15,010 what I'm gonna look at, so a third house. 69 00:04:19,352 --> 00:04:24,706 So the ##Last house is gonna be super fancy. 70 00:04:24,706 --> 00:04:30,083 And in fact, what we're gonna do is take Bill Gates' house. 71 00:04:30,083 --> 00:04:36,360 Bill Gates lives in the Seattle area, and try to predict what the house looks like. 72 00:04:36,360 --> 00:04:41,400 So it has a lot of different properties. 73 00:04:41,400 --> 00:04:46,910 And rather than typing them all in, I'm going to paste them in. 74 00:04:48,540 --> 00:04:49,810 So I'm going to paste it here. 75 00:04:51,040 --> 00:04:55,700 And this is what your Gates house would have if it were in the data set. 76 00:04:55,700 --> 00:04:59,350 It has 8 bedrooms, 25 bathrooms. 77 00:04:59,350 --> 00:05:01,868 Bill Gates really needs to go to the bathroom, apparently. 78 00:05:01,868 --> 00:05:04,628 25 bathrooms, at least this is what it said online. 79 00:05:04,628 --> 00:05:08,150 It has 50,000 square feet of housing. 80 00:05:08,150 --> 00:05:10,419 That's about 5,000 square meters. 81 00:05:10,419 --> 00:05:14,459 That's a big house, four floors, lots of stuff. 82 00:05:14,459 --> 00:05:16,420 So that's what his house looks like. 83 00:05:16,420 --> 00:05:19,500 We actually don't know what the house is worth because it's never been sold. 84 00:05:19,500 --> 00:05:21,137 I guess he doesn't need the money. 85 00:05:21,137 --> 00:05:25,952 [LAUGH] And let's see what that 86 00:05:25,952 --> 00:05:30,590 house actually looks like. 87 00:05:30,590 --> 00:05:38,021 So, I actually have a little cheat sheet here with a link to an image of his house. 88 00:05:38,021 --> 00:05:44,860 So, this is a picture of, Bill Gates' house. 89 00:05:50,595 --> 00:05:52,080 And here we go. 90 00:05:52,080 --> 00:05:55,490 Oh, yes, sorry about that. 91 00:05:55,490 --> 00:05:59,170 I forgot I had to do, tell it it was a markup. 92 00:06:01,020 --> 00:06:02,460 And there we go. 93 00:06:02,460 --> 00:06:08,799 So, let's see what the model predicts for the price of Bill Gates' house. 94 00:06:08,799 --> 00:06:15,735 I'm gonna print what my_features_model.predict says for 95 00:06:15,735 --> 00:06:19,020 Bill Gates' house. 96 00:06:19,020 --> 00:06:24,293 Now these are GraphLab created models, and they only take SFrames as input. 97 00:06:24,293 --> 00:06:28,676 So I have to take that dictionary that I just created to describe 98 00:06:28,676 --> 00:06:32,160 Bill Gates' house, and convert it to an SFrame. 99 00:06:32,160 --> 00:06:36,928 So I just type graphlab.SFrame(bill_gates), this was 100 00:06:36,928 --> 00:06:43,197 a dictionary, which is what we defined above here that's called dictionary. 101 00:06:43,197 --> 00:06:46,409 And then converts to SFrame, and I execute. 102 00:06:46,409 --> 00:06:52,911 And it says it predicts it to be valued at $13 million. 103 00:06:52,911 --> 00:06:53,968 I don't know. 104 00:06:53,968 --> 00:06:57,710 It sounds like a lot, but the house might be worth a lot more than $13 million. 105 00:06:57,710 --> 00:06:58,210 Who knows? 106 00:07:00,180 --> 00:07:01,360 And that was exciting. 107 00:07:01,360 --> 00:07:05,707 We built two models of house prices using county data. 108 00:07:05,707 --> 00:07:10,720 We explored it, we use it, and we applied it to this task of predicting houses. 109 00:07:10,720 --> 00:07:15,793 We even found out what we think Bill Gates' house might actually be valued at. 110 00:07:15,793 --> 00:07:20,199 [MUSIC]