docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,157 @@
|
||||
---
|
||||
id: wiki-2026-0508-pattern-recognition
|
||||
title: Pattern Recognition
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [Pattern Classification, Statistical Pattern Recognition]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [pattern-recognition, classification, ml, signal-processing]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: python
|
||||
framework: scikit-learn, pytorch
|
||||
---
|
||||
|
||||
# Pattern Recognition
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 raw signal → category label"**. 매 1960s statistical pattern recognition (Bayes, kNN, LDA) → 1980s neural pattern recognition → 매 2020s deep learning 의 absorbed sub-field. 매 modern frame: 매 supervised classification + representation learning. Bishop's PRML (2006) 의 canonical reference.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 history & framing
|
||||
- 매 1960s: Bayesian decision theory + linear classifiers.
|
||||
- 매 1970-80s: HMM (speech), template matching (OCR).
|
||||
- 매 1990s: SVM, kernel methods 의 dominance.
|
||||
- 매 2010s: DL absorbed it — "pattern recognition" 의 vintage term.
|
||||
- 매 modern: 매 ML/DL classification + representation learning.
|
||||
|
||||
### 매 classical approaches
|
||||
- **Statistical**: Bayesian, MAP, ML, GMM, LDA, QDA.
|
||||
- **Neural**: perceptron → MLP → CNN → transformer.
|
||||
- **Structural / syntactic**: grammar-based, less common today.
|
||||
- **Template matching**: cross-correlation, used in OCR, fingerprint.
|
||||
- **Kernel methods**: SVM with RBF/poly kernels.
|
||||
|
||||
### 매 pipeline (classic)
|
||||
1. Sensor / data acquisition.
|
||||
2. Preprocessing (denoise, normalize).
|
||||
3. Feature extraction (HOG, SIFT, MFCC) — 매 hand-crafted.
|
||||
4. Classifier (SVM, RF, NN).
|
||||
5. Post-processing (smoothing, thresholding).
|
||||
|
||||
### 매 modern deep pipeline
|
||||
- 매 raw input → end-to-end DNN → label.
|
||||
- Feature extraction = learned (no HOG/SIFT).
|
||||
- Backbone (ResNet, ViT, CLIP) → head (linear / MLP).
|
||||
|
||||
### 매 응용
|
||||
1. Computer vision (face, OCR, object detection).
|
||||
2. Speech recognition (Whisper, ASR).
|
||||
3. Biometrics (fingerprint, iris).
|
||||
4. Medical imaging (radiology AI).
|
||||
5. Anomaly detection (fraud, network intrusion).
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### Classic: Bayesian classifier
|
||||
```python
|
||||
from sklearn.naive_bayes import GaussianNB
|
||||
from sklearn.datasets import load_iris
|
||||
X, y = load_iris(return_X_y=True)
|
||||
clf = GaussianNB().fit(X, y)
|
||||
print(clf.score(X, y))
|
||||
```
|
||||
|
||||
### Classic: SVM with RBF
|
||||
```python
|
||||
from sklearn.svm import SVC
|
||||
from sklearn.preprocessing import StandardScaler
|
||||
from sklearn.pipeline import make_pipeline
|
||||
|
||||
clf = make_pipeline(StandardScaler(), SVC(kernel="rbf", C=1.0, gamma="scale"))
|
||||
clf.fit(X_train, y_train)
|
||||
```
|
||||
|
||||
### Modern: CNN classification
|
||||
```python
|
||||
import torch.nn as nn
|
||||
import torchvision.models as tvm
|
||||
|
||||
model = tvm.resnet50(weights=tvm.ResNet50_Weights.IMAGENET1K_V2)
|
||||
model.fc = nn.Linear(2048, num_classes) # transfer learn
|
||||
```
|
||||
|
||||
### Modern: CLIP zero-shot
|
||||
```python
|
||||
import clip, torch
|
||||
model, preprocess = clip.load("ViT-B/32")
|
||||
classes = ["cat", "dog", "bird"]
|
||||
text = clip.tokenize([f"a photo of a {c}" for c in classes])
|
||||
with torch.no_grad():
|
||||
img_feat = model.encode_image(preprocess(image).unsqueeze(0))
|
||||
txt_feat = model.encode_text(text)
|
||||
logits = (img_feat @ txt_feat.T).softmax(-1)
|
||||
print(classes[logits.argmax()])
|
||||
```
|
||||
|
||||
### HOG + SVM (classic CV pipeline)
|
||||
```python
|
||||
from skimage.feature import hog
|
||||
from sklearn.svm import LinearSVC
|
||||
|
||||
features = [hog(img, pixels_per_cell=(8,8)) for img in images]
|
||||
clf = LinearSVC().fit(features, labels)
|
||||
```
|
||||
|
||||
### Anomaly detection
|
||||
```python
|
||||
from sklearn.ensemble import IsolationForest
|
||||
detector = IsolationForest(contamination=0.01).fit(X_train)
|
||||
anomalies = detector.predict(X_test) == -1
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Tabular small data | RF / GBDT / SVM |
|
||||
| Image | Pretrained CNN/ViT (transfer) |
|
||||
| Speech / audio | Whisper / wav2vec finetune |
|
||||
| Few-shot / zero-shot | CLIP / SigLIP / VLM |
|
||||
| Anomaly (no labels) | IsolationForest / autoencoder |
|
||||
| Real-time embedded | Quantized CNN (MobileNet) |
|
||||
|
||||
**기본값**: 매 image/speech 의 pretrained foundation model 의 fine-tune; tabular 의 GBDT.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Machine-Learning]] · [[Statistical-Inference]]
|
||||
- 변형: [[Recognition]]
|
||||
- 응용: [[Computer Vision|Computer-Vision]] · [[OCR]] · [[Biometrics]]
|
||||
- Adjacent: [[Feature Engineering|Feature-Engineering]] · [[CLIP]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 classification problem framing, choosing classical vs DL approach, transfer learning decision.
|
||||
**언제 X**: 매 generative tasks (use diffusion / LLM instead).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Hand-crafted features in 2026**: 매 HOG/SIFT 의 99% case 에서 pretrained CNN feature 가 우수.
|
||||
- **No baseline**: 매 jumping to DL without trying logistic / RF baseline.
|
||||
- **Class imbalance ignored**: 매 99% accuracy on 99/1 split = trivial. 매 use F1, ROC-AUC, balanced metrics.
|
||||
- **Test contamination**: 매 train/test split 의 leakage (especially time series).
|
||||
- **Calibration ignored**: 매 raw softmax ≠ probability. 매 use Platt scaling / temperature.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Bishop "PRML" 2006, Duda & Hart "Pattern Classification" 2001).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — classical-to-modern framing, pipeline patterns |
|
||||
Reference in New Issue
Block a user