Files
2nd/10_Wiki/Topics/Domain_Programming/AI_and_ML/Degrees-of-Freedom.md
T
Antigravity Agent c24165b8bc refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게
[공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류.
문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인).

- Topic_Programming → Domain_Programming (내부 구조 보존)
- Topic_Graphic → Domain_Design
- Topic_Business → Domain_Product
- Topic_General → Domain_General
- _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning),
  Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing)
- 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서)
- 빈 폴더 정리 (memory/procedures)
- 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 11:05:56 +09:00

6.0 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-degrees-of-freedom Degrees of Freedom (DOF) 10_Wiki/Topics verified self
DOF
degrees of freedom
kinematic DOF
statistical DOF
none A 0.94 applied
robotics
kinematics
statistics
mathematics
physics
mechanical
2026-05-10 pending
language applicable_to
Math / Robotics / Statistics
Robotics
Statistics
Mechanics
ML

Degrees of Freedom (DOF)

매 한 줄

"매 system 의 independent parameter 의 count". 매 robotics: 매 movable joint. 매 statistics: 매 sample 의 free 의 vary. 매 modern AI: 매 model parameter (over-parameterization).

매 핵심

매 mechanical / robotics

  • Rigid body in 3D: 6 DOF (3 translation + 3 rotation).
  • Rigid body in 2D: 3 DOF.
  • Manipulator: 매 joint 의 sum.
  • Mobile robot: 매 base + arm.

매 Grübler-Kutzbach formula

DOF = λ(n - j - 1) + Σ f_i
  • λ: 매 6 (3D), 3 (2D).
  • n: 매 link 수 (base 포함).
  • j: 매 joint 수.
  • f_i: 매 joint 의 freedom.

매 statistical DOF

  • Sample variance: n - 1 (mean 의 1 의 lose).
  • Linear regression: n - p - 1 (p predictor).
  • Chi-square: 매 categories - 1.
  • t-distribution: 매 sample-dependent.

매 ML / DL

  • Effective DOF: 매 model 의 parameter count.
  • Over-parameterization: 매 modern DL 의 paradox (n_param >> n_data).
  • Implicit regularization: 매 SGD 의 effective DOF 의 reduce.

매 응용

  1. Robot arm design: 매 6+ DOF 의 redundancy.
  2. VR head tracking: 6 DOF.
  3. Hand tracking: 매 26 DOF (each hand).
  4. Statistics: 매 hypothesis test.
  5. Camera pose: 6 DOF.

💻 패턴

Compute DOF (manipulator)

def grubler_dof_3d(n_links, joints):
    """매 3D Grübler. joints: list of (type, freedom)."""
    j = len(joints)
    f_sum = sum(f for _, f in joints)
    return 6 * (n_links - j - 1) + f_sum

# 매 6-axis arm: 6 revolute joints
arm = grubler_dof_3d(7, [('rev', 1)] * 6)  # 6
# 매 4-bar linkage (planar)
def grubler_dof_2d(n, joints):
    return 3 * (n - len(joints) - 1) + sum(f for _, f in joints)
fourbar = grubler_dof_2d(4, [('rev', 1)] * 4)  # 1

Statistical DOF (chi-square test)

import scipy.stats as st

def chi2_dof(observed, expected):
    chi2 = sum((o - e)**2 / e for o, e in zip(observed, expected))
    dof = len(observed) - 1
    p = 1 - st.chi2.cdf(chi2, dof)
    return chi2, dof, p

Sample variance (Bessel's correction)

import numpy as np

def variance(data, ddof=1):  # 매 ddof = degrees of freedom adjust
    n = len(data)
    mean = sum(data) / n
    return sum((x - mean)**2 for x in data) / (n - ddof)

# 매 ddof=1: 매 sample (unbiased)
# 매 ddof=0: 매 population

Effective DOF (ridge regression)

def effective_dof_ridge(X, lam):
    """매 trace of hat matrix."""
    XtX = X.T @ X
    n_features = X.shape[1]
    H = X @ np.linalg.inv(XtX + lam * np.eye(n_features)) @ X.T
    return np.trace(H)

6-DOF pose (3D vision)

class Pose6DOF:
    def __init__(self, position, orientation):
        self.t = np.array(position)  # 매 [x, y, z]
        self.q = orientation  # 매 quaternion [w, x, y, z]
    
    def as_matrix(self):
        T = np.eye(4)
        T[:3, 3] = self.t
        # 매 quaternion → rotation matrix (Hamilton)
        w, x, y, z = self.q
        T[:3, :3] = np.array([
            [1-2*(y*y+z*z), 2*(x*y-z*w), 2*(x*z+y*w)],
            [2*(x*y+z*w), 1-2*(x*x+z*z), 2*(y*z-x*w)],
            [2*(x*z-y*w), 2*(y*z+x*w), 1-2*(x*x+y*y)],
        ])
        return T

Hand tracking DOF

HAND_DOF = {
    'wrist': 6,         # 매 free in space
    'thumb': 5,         # 매 CMC 의 2, MCP 의 1, IP 의 1, opposition 의 1
    'index_finger': 4,  # 매 MCP 2 + PIP 1 + DIP 1
    'middle_finger': 4,
    'ring_finger': 4,
    'pinky_finger': 4,
}
total = sum(HAND_DOF.values())  # 27

Redundancy (kinematic)

def redundancy(robot_dof, task_dof):
    """매 redundancy = robot_dof - task_dof."""
    return max(0, robot_dof - task_dof)

# 매 7-DOF arm + 매 6-DOF task → 1-DOF redundancy
# 매 self-motion 의 obstacle 의 avoid
print(redundancy(7, 6))  # 1

Over-parameterization (DL)

def model_dof(model):
    """매 deep learning effective DOF approximation."""
    total = sum(p.numel() for p in model.parameters())
    trainable = sum(p.numel() for p in model.parameters() if p.requires_grad)
    return {'total': total, 'trainable': trainable}

# 매 GPT-3: 175B parameters >> 매 dataset size
# 매 overfitting paradox: 매 implicit regularization 의 explain

매 결정 기준

상황 DOF Approach
Manipulator design Grübler-Kutzbach
Robot redundancy n_robot - n_task
Statistics test Specific test formula
ML model Parameter count + effective
VR / AR 6 DOF (full) or 3 DOF (rotation)
Hand tracking ~26 per hand

기본값: 매 task-specific DOF + 매 redundancy 의 prefer (manipulator) + 매 statistical 의 ddof aware.

🔗 Graph

🤖 LLM 활용

언제: 매 robot design. 매 statistical analysis. 매 ML capacity. 언제 X: 매 informal usage.

안티패턴

  • Confuse statistical / mechanical: 매 different concept.
  • Forget Bessel correction: 매 biased estimator.
  • Under-DOF manipulator: 매 task 의 reach X.
  • Over-DOF without redundancy logic: 매 self-collision.

🧪 검증 / 중복

  • Verified (Spong Robot Dynamics, Statistics textbook).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-04-20 Auto-reinforced
2026-05-08 Phase 1
2026-05-10 Manual cleanup — mechanical + statistical DOF + 매 Grübler / chi2 / pose / redundancy code