Documente Academic
Documente Profesional
Documente Cultură
Abstract
The aim of this practice case is the proposal of a learning algorithm in the Real State
sector. The two-principal learning algorithms are Supervised learning and Unsupervised
learning.
Supervised learning, we are given a data set and already know what our correct output
should look like, having the idea that there is a relationship between the input and the
output. Supervised learning problems are categorized into “regression” and
“classification” problems. Since the price of the housing is dealing as continue variable,
with infinite values, I have proposed a multiple linear regression algorithm.
Given data about the size of houses on the real estate market, try to predict their price.
Price as a function of size is a continuous output, so this is a regression problem.
Additionally, the results have been compared with the results get from the program SPSS,
making a discuss about.
4. Gradient descent
6. Linear regression model
𝑚
1 7. Results with Octave
𝜃𝑗 = 𝜃𝑗 − 𝛼 ∑(ℎ𝜃 − 𝑦) ∗ 𝑥𝑗
𝑚
𝑖=1
- Initial cost: 95968267006010.046875
- Optimized cost: 4553682196675.862305
𝛼 = 𝑡ℎ𝑒 𝑙𝑒𝑎𝑟𝑛𝑖𝑛𝑔 𝑟𝑎𝑡𝑒.
- Theta (with normalization):
𝑚 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑟𝑎𝑖𝑛𝑖𝑛𝑔 𝑒𝑥𝑎𝑚𝑝𝑙𝑒𝑠
-- 340407.801043
𝑥𝑗
-- 104127.515597
= 𝑗 𝑓𝑒𝑎𝑡𝑢𝑟𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝑡ℎ𝑒 𝑡𝑟𝑎𝑖𝑛𝑖𝑛𝑔
-- -172.205334
Following it´s the equation proposal by
Octave after develop the algorithm:
ℎ𝜃 = 340407,80 + 104127,51 ∗ 𝑥1
− 172,20 ∗ 𝑥2
X 1: square feet of house
X 2: number of rooms
8. Results with SPSS
Coeficientesa
Coeficient
es
Coeficientes no estandari Estadísticas de
estandarizados zados Correlaciones colinealidad
Desv. Orden Parcia Toleranc
Modelo B Error Beta t Sig. cero l Parte ia VIF
1 (Constante 89597,91 41767,41 2,145 ,037
) 0 9
NumberRo -8738,019 15450,69 -,053 -,566 ,575 ,442 -,085 -,044 ,686 1,457
oms 6
SquareFee 139,211 14,795 ,885 9,409 ,000 ,855 ,817 ,733 ,686 1,457
t
a. Variable dependiente: Price
Equation:
ℎ𝜃 = 89.597,91 + 139,21 ∗ 𝑥1 − 8738,019 ∗ 𝑥2
X 1: square feet of house
X 2: number of rooms
ANNEX 1: INPUT VALUES OF THE ALGORITHM
2162 4 287000
1664 2 368500
SQUARE NUMBER PRICE
FEET OF ($) 2238 3 329900
ROOMS 2567 4 314000
2104 3 399900 1200 3 299000
1600 3 329900 852 2 179900
2400 3 369000 1852 4 299900
1416 2 232000 1203 3 239500
3000 4 539900
1985 4 299900
1534 3 314900
1427 3 198999
1380 3 212000
1494 3 242500
1940 4 239999
2000 3 347000
1890 3 329999
4478 5 699900
1268 3 259900
2300 4 449900
1320 2 299900
1236 3 199900
2609 4 499998
3031 4 599000
1767 3 252900
1888 2 255000
1604 3 242900
1962 4 259900
3890 3 573900
1100 3 249900
1458 3 464500
2526 3 469000
2200 3 475000
2637 3 299900
1839 2 349900
1000 1 169900
2040 4 314900
3137 3 579900
1811 4 285900
1437 3 249900
1239 3 229900
2132 4 345000
4215 4 549000
ANNEX 2: RESULTS OF THE ALGORITHM