Skip to Content
실무로 통하는 인과추론 with 파이썬
book

실무로 통하는 인과추론 with 파이썬

by 마테우스 파쿠레, 박지용(감수), 신진수, 가짜연구소 인과추론팀
March 2024
Beginner to intermediate
464 pages
11h 51m
Korean
Hanbit Media, Inc.
Content preview from 실무로 통하는 인과추론 with 파이썬
151
4
장
유용한 선형회귀
이터의 편향을 제거하고, 모두가 그 데이터를 사용하도록 할 수 있습니다.
FWL
정리를 사용
하면 편향 제거 단계와 영향 추정 단계를 분리할 수 있습니다.
이 정리를 본격적으로 배우기 전에
먼저 회귀분석 이론을 간단히 복습해봅시다.
4.2
회귀분석 이론
이번 절에서 선형회귀분석이 어떻게 구성되고 추정되는지 너무 깊이 다루지는 않지만, 그래도
이론을 익히면 인과추론에서 선형회귀분석이 가진 힘을 파악하는 데 큰 도움이 될 것입니다.
우선, 회귀분석은 선형 예측 문제를 가장 잘 해결합니다. 다음 식에서
β
*
를 매개변수 벡터라고
하겠습니다.



argminEY X
ii
2
선형회귀분석은 평균제곱오차
mean
squared
error
(
MSE
)를 최소화하는 매개변수를 찾습니다. 이를
미분하고 그 결과를
0
으로 두면, 이 문제에 대한 선형 해
solution
는 다음과 같습니다.
*
EXXEXY
1
표본을 통해 다음과 같이 회귀계수를 추정할 수 있습니다.
( )
1
ˆ
XX XY
β
−
′′
=
앞서 배운 수식을 통해, 이를 코드로 구현해보겠습니다. 다음 코드에서는
OLS
의 대수적 해를
사용해서 앞 모델의 매개변수를 추정합니다(마지막 변수로 절편을 추가했으니 첫 번째 매개변
수 추정값은
β
1
이 됩니다).
In [8]: X_cols ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’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
QuotationMarkI 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
QuotationMarkI’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
QuotationMarkI'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.
Mark W.
Embedded Software Engineer

You might also like

실무로 통하는 ML 문제 해결 with 파이썬

실무로 통하는 ML 문제 해결 with 파이썬

카일 갤러틴, 크리스 알본
잘되는 머신러닝 팀엔 이유가 있다

잘되는 머신러닝 팀엔 이유가 있다

데이비드 탄, 에이다 양, 데이비드 콜스

Publisher Resources

ISBN: 9791169212113