你是否好奇数据可以告诉你什么？你是否想在关于机器学习促进商业的核心方式上有深层次的理解？你是否想能同专家们讨论关于回归，分类，深度学习以及推荐系统的一切？在这门课上，你将会通过一系列实际案例学习来获取实践经历。在这门课结束的时候，

Loading...

来自 University of Washington 的课程

机器学习基础：案例研究

7334 个评分

你是否好奇数据可以告诉你什么？你是否想在关于机器学习促进商业的核心方式上有深层次的理解？你是否想能同专家们讨论关于回归，分类，深度学习以及推荐系统的一切？在这门课上，你将会通过一系列实际案例学习来获取实践经历。在这门课结束的时候，

从本节课中

Regression: Predicting House Prices

This week you will build your first intelligent application that makes predictions from data.<p>We will explore this idea within the context of our first case study, predicting house prices, where you will create models that predict a continuous value (price) from input features (square footage, number of bedrooms and bathrooms,...). <p>This is just one of the many places where regression can be applied.Other applications range from predicting health outcomes in medicine, stock prices in finance, and power usage in high-performance computing, to analyzing which regulators are important for gene expression.</p>You will also examine how to analyze the performance of your predictive model and implement regression in practice using an iPython notebook.

- Carlos GuestrinAmazon Professor of Machine Learning

Computer Science and Engineering - Emily FoxAmazon Professor of Machine Learning

Statistics

[MUSIC]

We've learned now, together, we've learned two regression models from our data,

one just based on square foot of living,

the other one based on these more advanced features.

So let's apply these models.

Let's see what it looks like when we use them in practice to predict house prices.

So, what we're going to do is apply this learned

models to predict prices of three houses from

the data set, so three different houses.

So the first house is, and this is three that I picked

that had different sizes, different properties,

they look a bit different, in different neighborhoods.

So let's just look at them.

So the first house is from our data and

so what we're gonna do with this house is, so this is for not data but sales data.

So out of my sales data, I'm going to

select the house whose id is equal to a particular id.

And so the county record gives us string ids for every house, it gives a number.

So this one is 5309, I'm copying from a piece of paper here, 101200.

So, a particular house for a particular id, and so I'm selecting it

and if I type house1, you'll see what it is.

So it's the house that has this particular ID.

It got sold on this date for $620,000.

It had four bedrooms, two and

a quarter bathrooms, 2,400 square feet of living space, and so on.

Now what you can do is in iPython notebook,

you can embed not only mark ups and texts in the Python code.

But you can also embed HTML and images.

So let me just do that for you right now, just as an example.

So I'm typing xm and then I am going to add an image to my notebook and this image

is an image that I downloaded from the county records for this particular house.

So, the image is on my directory, it's called house.

So, house, 53, what was the number?

09101200, so this is gonna be pretty cool.

When I see a picture of the house we're trying to make a prediction for, oops,

I must have typed that wrong oh, yeah.

I forgot it's .jpg.

And that's pretty cool, here's a picture of the house we're pricing.

So this house was sold in 2014 for $620,000.

It has four bedrooms, two and a quarter bathrooms.

It was built, for example, in 1929.

Now, let's see what our model predicts.

So, We had two models.

So, we had first.

So the true price of the house.

And just a print out to remind ourselves, so this is house1 of price.

This is 200 so if I just type print here, it will look a little nicer.

$620,000, this is the house price.

Then let's see what my first model predicts.

So that was the simple square foot model that we built.

When you they it, so whenI typed .predict,

the price of house1, and it says it predicts it as

$628,000, so pretty close, actually.

That's really good.

And let's see what adding more features did for us.

my_features_model.predict:house1, so

you remember on average, the my features model,

adding more features, gives you better performance.

Now, if you look at the prediction here, it's $720,000, so the square

foot model had a better prediction than the one with more features.

So what we learned here is, even though on average,

adding more features give a better prediction.

For this one particular house,

the simple model did a better job than the more advanced model.

But this is to be expected, and not always, but

sometimes gonna do better, probably works, when average is going to do better.

[MUSIC]