이 알고리즘들은 훈련 결과에 거의 차이가 없습니다. 모두 매우 비슷한 모델을 만들고 정확히 같은
방식으로 예측을 합니다.
4.3
다항 회귀
가지고 있는 데이터가 단순한 직선보다 복잡한 형태라면 어떨까요? 신기하게도 비선형 데이터
를 학습하는 데 선형 모델을 사용할 수 있습니다. 이렇게 하는 간단한 방법은 각 특성의 거듭제
곱을 새로운 특성으로 추가하고, 이 확장된 특성을 포함한 데이터셋에 선형 모델을 훈련시키는
것입니다. 이런 기법을 다항 회귀
Polynomial
Regression
라고 합니다.
예를 들어보겠습니다. 먼저 간단한
2
차방정식
quadratic
equation
24
으로 비선형 데이터를 생성하겠
습니다(약간의 노이즈를 포함합니다. [그림
4
-
12
]를 참조하세요).
m
=
100
X
=
6
*
np
.
random
.
rand
(
m
,
1
)
-
3
y
=
0
.
5
*
X
**
2
+
X
+
2
+
np
.
random
.
randn
(
m
,
1
)
그림
4-12
노이즈가 포함된 비선형 데이터셋
24
2
차방정식의 형식은
y
=
ax
2
+
bx
+
c
입니다.
174
1
부
머신러닝
확실히 직선은 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.