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

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

by 마테우스 파쿠레, 박지용(감수), 신진수, 가짜연구소 인과추론팀
March 2024
Beginner to intermediate
464 pages
11h 51m
Korean
Hanbit Media, Inc.
Content preview from 실무로 통하는 인과추론 with 파이썬
257
6
장
이질적 처치효과
6.6
누적 효과 곡선
분위수 그래프로 효과를 파악했다면 다음 단계는 쉽게 이해할 수 있습니다. 즉, 이 아이디
어는 모델을 사용해서 그룹을 정의하고 각 그룹 내 효과를 추정하는 것입니다. 그러나 이
번에는 그룹별로 효과를 추정하지 않고 한 그룹을 다른 그룹 위에 누적하는 형태로 진행합
니다.
먼저, 데이터를 점수순으로 정렬해야 합니다. 보통
CATE
모델의 점수를 사용하지만, 다른 점
수도 사용할 수 있습니다. 그런 다음 해당 정렬에 따라 상위
1
%의 효과를 추정합니다. 다음 단
계로,
1
%를 추가하여 상위
2
%의 효과를 계산하고, 그 후 상위
3
%의 효과를 계산하는 식으로
계속 진행합니다. 결과적으로, 누적 표본에 따른 효과 곡선이 생성됩니다. 다음은 해당 과정을
구현하는 간단한 코드입니다.
In [11]: def cumulative_effect_curve(dataset, prediction, y, t,
ascending=False, steps=100):
size = len(dataset)
ordered_df = (dataset
.sort_values(prediction, ascending=ascending)
.reset_index(drop=True))
steps = np.linspace(size/steps, size, steps).round(0) ...
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