数据科学中的简单线性回归
簡單線性回歸 (Simple Linear Regression)
A simple regression model could be a linear approximation of a causative relationship between two or additional variables. Regressions models are extremely valuable, as they're one in every of the foremost common ways that to create inferences and predictions.
一個簡單的回歸模型可以是兩個或其他變量之間的因果關系的線性近似。 回歸模型非常有價值,因為它們是創建推論和預測的所有最常見方式之一。
The process goes like this. You get sample data, come back up with a model that explains the data and so create predictions for the total population supported the model you've developed.
這個過程是這樣的。 您將獲得樣本數據,然后使用一個解釋數據的模型,從而為支持您開發的模型的總人口創建預測。
There is a variable, labeled Y, being foreseen, and freelance variables, tagged x1, x2, so forth. These are the predictors. Y could be a perform of the X variables, and also the regression model could be a linear approximation of this perform.
可以預見有一個標記為Y的變量,還有一個標記為x1 , x2的自由變量。 這些是預測因素。 Y可以是X變量的執行,并且回歸模型可以是該變量的線性近似。
The easiest regression model is that the straightforward linear regression: Y is up to beta zero and beta one-time x plus epsilon.
最簡單的回歸模型是簡單的線性回歸: Y最高為beta 0和beta的x乘以 epsilon。
Let's see what these values mean. Y is that the variable we tend to are attempting to predict and is termed the variable. X is a variable quantity. Once exploitation multivariate analysis, we wish to predict the worth of Y, provided we have the worth of X.
讓我們看看這些值的含義。 Y是我們傾向于嘗試預測的變量,稱為變量。 X是一個變量。 一旦進行了多變量分析,我們希望預測Y的價值,前提是我們擁有X的價值。
But to possess a regression, Y should depend upon X in some causative manner. Whenever there's a modification in X, such modification should translate into a change in Y.
但是要擁有回歸, Y應該以某種原因依賴于X。 每當X中有修改時,此類修改應轉換為Y中的更改。
Think about the subsequent equation: the financial gain an individual receives depends on the number of years of education that a person has received. The variable is financial gain, whereas the variable quantity is years of education. There's a causative relationship between the 2. The additional education you get, the upper the financial gain you're possible to receive. This relationship is therefore trivial that it's in all probability the explanation you're observing this course, right now. You would like to urge better financial gain, therefore you're increasing your education.
考慮下面的等式 :一個人獲得的經濟收益取決于一個人受教育的年限。 變量是財務收益,變量是教育年限。 兩人之間存在因果關系。您獲得的額外教育越多,您可以獲得的經濟收益就越高。 因此,這種關系是微不足道的,因為它很可能是您目前正在觀察的此過程的解釋。 您想敦促獲得更好的經濟收益,因此您正在增加學歷。
Now, let's pause for a second and have faith in the reverse relationship. What if education depends on financial gain. This might mean the upper your financial gain, the additional years you pay educating yourself. Golf shot high tuition fees aside, wealthier people don't pay additional years in class. And, highschool and faculty take a similar range of years, regardless of your income bracket. Therefore, a causative relationship like this one is faulty, if not plain wrong. Hence, it's unfit for multivariate analysis.
現在,讓我們暫停片刻,并對反向關系充滿信心。 如果教育取決于經濟收益該怎么辦。 這可能意味著您的經濟收益越高,您自學的額外年限就越多。 高爾夫除了高額的學費外,較富裕的人無需再上課。 而且,無論您的收入水平如何,高中和教師的年限都差不多。 因此,即使不是完全錯誤的,這種因果關系也是錯誤的。 因此,它不適合進行多元分析。
Let's return to the initial example. Financial gain could be a performance of education. The additional years you study, the upper financial gain you'll receive. This sounds regarding right.
讓我們回到最初的示例。 經濟收益可能是教育的表現。 學習了額外的幾年,您將獲得最高的經濟收益。 這聽起來是對的。
好的 (Alright)
What we haven't mentioned, so far, is that, in our model, there are coefficients. Beta one is the constant that stands before the variable quantity. It quantifies the result of education on financial gain. If beta one is fifty, then for every further year of education, your financial gain would grow by $50. In the USA, the amount is way larger, somewhere around three to 5,000 bucks. So, for every further year you pay on education, your yearly financial gain is predicted to rise by 3 to 5 thousand bucks. And that's not considering pedagogy or tailored courses, like this one.
到目前為止,我們還沒有提到的是,在我們的模型中,存在系數。 Beta 1是位于變量前的常數。 它量化了關于經濟收益的教育結果。 如果beta 1是50,則每一年的教育,您的經濟收益將增加50美元。 在美國,這筆錢要大得多,大約三到五千美元。 因此,您為教育付出的每一年,預計您的年度財務收益將增加3到5,000美元。 而且,這并不是在考慮像這樣的教學法或量身定制的課程。
The different 2 other parts are the constant beta zero and also the error – epsilon.
In this example, you'll be able to consider the constant beta zero because of the pay. Regardless of your education, if you have got employment, you'll get the pay. This is often a secured quantity.
其他2個部分分別是常數beta 0和誤差– epsilon 。
在此示例中,由于報酬,您將能夠考慮常數beta 0。 無論您受過什么教育,如果您有工作,就可以獲得報酬。 這通常是安全數量。
So, if you have never visited the college and plug an education worth of zero years within the formula, the regression can predict that your financial gain is going to be the pay smart, right?
因此,如果您從未上過大學,并在公式中加入了零年制的教育費用,則回歸分析可以預測您的財務收益將是明智的報酬,對嗎?
The last term is epsilon. This represents the error of estimation. The error is that the actual distinction between the determined financial gain and also the income the regression foreseen. On average, across all observations, the error is zero. If you earn over what the regression has foreseen, then somebody earns but what the regression has foreseen. Everything evens out.
最后一個詞是epsilon。 這代表估計誤差。 錯誤是確定的財務收益與預計的回歸收益之間的實際區別。 平均而言,在所有觀察中,誤差為零。 如果您獲得的收益超過了回歸的預期,那么有人會賺錢,但回歸的收益卻是預期的。 一切都變得平穩。
式 (Formula)
The original formula was written with Greek letters. What will this tell us? it was the population formula. However, we all know statistics are all regarding sample information. In follow, we tend to use the statistical regression equation.
原始公式用希臘字母書寫。 這將告訴我們什么? 這是人口公式。 但是,我們都知道統計數據都是關于樣本信息的。 接下來,我們傾向于使用統計回歸方程。
It is merely y hat equals b zero plus b one time x.
僅僅是y等于b零加b 乘以x 。
You detected right. The y here is noted as y hat. Whenever we have a hat image, it's calculable or a foreseen worth.
您檢測正確。 此處的y表示為y帽子。 每當我們有帽子圖像時,它都是可以計算或可以預見的。
b zero is that the estimate of the regression constant beta zero, whereas b one is that the estimate of beta one, and x is that the sample information for the variable quantity.
b零是回歸常數β0的估計,而b 1是β1的估計, x是變量的樣本信息。
翻譯自: https://www.includehelp.com/data-science/simple-linear-regression.aspx
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的数据科学中的简单线性回归的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: oracle 静态监听 端口,侦听动态注
- 下一篇: ruby array_Ruby中带有示例