C.W.K.
Stream
Lesson 02 of 10 · published

Rule, Heuristic, 통계, 그리고 ML

~28 min · framing, rules, statistics

Level 0Scout
0 XP0/48 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

겹치지만 다른 네 도구

Rule은 거의 항상 성립하는 알려진 로직을 박는 거야. Heuristic은 대부분 잘 통하는 빠른 지름길. 통계는 모델 가정 위에서 관계와 불확실성을 추정. ML은 측정된 prediction loss를 최소화하도록 parameter를 fit. 겹치지만 서로 바꿔 쓸 수 없고, rule이면 충분한데 ML로 가는 건 흔한 프로 실수야.

도구가장 잘 맞는 곳리스크
Rule안정된 로직, audit 필요드문 예외에 깨짐
Heuristic저-stake에서 빠른 근사편향이 조용히 쌓임
통계추론과 불확실성인과 해석 잘못 박힘
MLlabel 있는 예제로 predictionleakage와 drift

도구 고르는 법

문제의 변동을 흡수할 수 있는 가장 단순한 도구를 골라. rule이 안정되고 audit 가능하면, 모던해 보이려고 모델로 갈아타지 마. 비즈니스 stakeholder들이 긴 회의 없이 target을 정의 못 하면, 어떤 모델도 구해주지 못해.

섞어 쓰는 게 보통

현실 시스템은 네 가지를 다 섞어. fraud 시스템이라면 알려진 패턴엔 rule, 고-velocity 계정엔 heuristic threshold, 기대 행동엔 통계 baseline, 모르는 영역엔 ML 모델. 재밌는 설계 질문은 어떤 layer가 어떤 케이스를 owns 할지야.

Code

결정 경계: 언제 ML이 값을 하는가?·python
def choose_tool(problem):
    if problem.rule_is_stable and problem.exceptions_are_rare:
        return "rule"
    if problem.needs_uncertainty and problem.sample_size_is_small:
        return "statistics"
    if problem.labels_exist and problem.mistakes_are_measurable:
        return "ml"
    return "clarify_problem_before_modeling"
Rule + ML 하이브리드 — rule이 이기고 ML은 long tail 커버·python
def predict(row, rule_fn, model):
    rule_decision = rule_fn(row)
    if rule_decision is not None:
        return rule_decision  # auditable path
    return model.predict_proba([row.features])[0, 1] >= 0.42

External links

Exercise

백로그에서 자동화 아이디어 하나 골라봐. rule로, 통계로, ML로 푸는 한 단락짜리 케이스를 각각 써보고, 승자를 뽑아. 다른 두 개가 왜 이 결정에 더 나쁜지 정당화해.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.