dantelabs-agentic-school 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/.claude-plugin/marketplace.json +94 -15
  2. package/README.md +188 -39
  3. package/package.json +5 -2
  4. package/plugins/common/skills/kie-image-generator/scripts/utils.py +25 -6
  5. package/plugins/common/skills/kie-video-generator/scripts/utils.py +29 -13
  6. package/plugins/data-science/data-profiling/README.md +297 -0
  7. package/plugins/data-science/data-profiling/agents/data-profiler.md +140 -0
  8. package/plugins/data-science/data-profiling/agents/eda-analyst.md +253 -0
  9. package/plugins/data-science/data-profiling/commands/analyze-profile.md +406 -0
  10. package/plugins/data-science/data-profiling/commands/profile-data.md +245 -0
  11. package/plugins/data-science/data-profiling/plugin.json +9 -0
  12. package/plugins/data-science/data-profiling/skills/profiling/SKILL.md +315 -0
  13. package/plugins/data-science/data-profiling/skills/profiling/requirements.txt +30 -0
  14. package/plugins/data-science/data-profiling/skills/profiling/scripts/analyze_eda.py +611 -0
  15. package/plugins/data-science/data-profiling/skills/profiling/scripts/generate_profile.py +325 -0
  16. package/plugins/data-science/feature-engineering/README.md +118 -0
  17. package/plugins/data-science/feature-engineering/agents/feature-engineer.md +194 -0
  18. package/plugins/data-science/feature-engineering/commands/engineer-features.md +296 -0
  19. package/plugins/data-science/feature-engineering/plugin.json +9 -0
  20. package/plugins/data-science/feature-engineering/skills/feature-engineering/outputs/models/creditcard_preprocessing_pipeline.pkl +0 -0
  21. package/plugins/data-science/feature-engineering/skills/feature-engineering/outputs/reports/creditcard_feature_engineering_log.md +38 -0
  22. package/plugins/data-science/feature-engineering/skills/feature-engineering/requirements.txt +18 -0
  23. package/plugins/data-science/feature-engineering/skills/feature-engineering/scripts/transform_features.py +358 -0
  24. package/plugins/data-science/hyperparameter-tuning/README.md +230 -0
  25. package/plugins/data-science/hyperparameter-tuning/commands/tune-hyperparameters.md +351 -0
  26. package/plugins/data-science/hyperparameter-tuning/plugin.json +9 -0
  27. package/plugins/data-science/hyperparameter-tuning/skills/tuning/requirements.txt +25 -0
  28. package/plugins/data-science/hyperparameter-tuning/skills/tuning/scripts/tune_model.py +299 -0
  29. package/plugins/data-science/imbalance-handling/README.md +234 -0
  30. package/plugins/data-science/imbalance-handling/commands/balance-data.md +304 -0
  31. package/plugins/data-science/imbalance-handling/plugin.json +9 -0
  32. package/plugins/data-science/imbalance-handling/skills/imbalance-handling/requirements.txt +18 -0
  33. package/plugins/data-science/imbalance-handling/skills/imbalance-handling/scripts/balance_data.py +134 -0
  34. package/plugins/data-science/model-deployment/README.md +340 -0
  35. package/plugins/data-science/model-deployment/commands/deploy-model.md +375 -0
  36. package/plugins/data-science/model-deployment/plugin.json +9 -0
  37. package/plugins/data-science/model-deployment/skills/deployment/requirements.txt +22 -0
  38. package/plugins/data-science/model-deployment/skills/deployment/scripts/deploy_api.py +561 -0
  39. package/plugins/data-science/model-evaluation/README.md +316 -0
  40. package/plugins/data-science/model-evaluation/commands/evaluate-model.md +279 -0
  41. package/plugins/data-science/model-evaluation/plugin.json +9 -0
  42. package/plugins/data-science/model-evaluation/skills/evaluation/requirements.txt +22 -0
  43. package/plugins/data-science/model-evaluation/skills/evaluation/scripts/evaluate_model.py +471 -0
  44. package/plugins/data-science/model-monitoring/README.md +225 -0
  45. package/plugins/data-science/model-monitoring/commands/monitor-model.md +250 -0
  46. package/plugins/data-science/model-monitoring/plugin.json +9 -0
  47. package/plugins/data-science/model-monitoring/skills/monitoring/requirements.txt +22 -0
  48. package/plugins/data-science/model-monitoring/skills/monitoring/scripts/monitor_performance.py +488 -0
  49. package/plugins/data-science/model-selection/README.md +364 -0
  50. package/plugins/data-science/model-selection/commands/train-model.md +500 -0
  51. package/plugins/data-science/model-selection/plugin.json +9 -0
  52. package/plugins/data-science/model-selection/skills/model-selection/requirements.txt +20 -0
  53. package/plugins/data-science/model-selection/skills/model-selection/scripts/train_model.py +168 -0
  54. package/plugins/data-science/shap-analysis/README.md +357 -0
  55. package/plugins/data-science/shap-analysis/commands/analyze-shap.md +300 -0
  56. package/plugins/data-science/shap-analysis/plugin.json +9 -0
  57. package/plugins/data-science/shap-analysis/skills/shap-analysis/requirements.txt +21 -0
  58. package/plugins/data-science/shap-analysis/skills/shap-analysis/scripts/analyze_shap.py +422 -0
  59. package/samples/datascience/INSTALL.md +243 -0
  60. package/samples/datascience/QUICKSTART.md +318 -0
  61. package/samples/datascience/README.md +241 -0
  62. package/samples/datascience/STRUCTURE.md +125 -0
  63. package/samples/datascience/outputs/reports/creditcard_eda_report.md +226 -0
  64. package/samples/datascience/requirements.txt +33 -0
  65. package/samples/datascience/scripts/01_data_profiling.py +89 -0
  66. /package/plugins/{brand-analytics → marketing/brand-analytics}/agents/brand-strategist.md +0 -0
  67. /package/plugins/{brand-analytics → marketing/brand-analytics}/agents/competitive-analyst.md +0 -0
  68. /package/plugins/{brand-analytics → marketing/brand-analytics}/commands/analyze-brand.md +0 -0
  69. /package/plugins/{brand-analytics → marketing/brand-analytics}/plugin.json +0 -0
  70. /package/plugins/{brand-analytics → marketing/brand-analytics}/skills/brand-positioning/SKILL.md +0 -0
  71. /package/plugins/{campaign-orchestration → marketing/campaign-orchestration}/agents/campaign-director.md +0 -0
  72. /package/plugins/{campaign-orchestration → marketing/campaign-orchestration}/agents/workflow-coordinator.md +0 -0
  73. /package/plugins/{campaign-orchestration → marketing/campaign-orchestration}/commands/run-full-pipeline.md +0 -0
  74. /package/plugins/{campaign-orchestration → marketing/campaign-orchestration}/commands/run-phase.md +0 -0
  75. /package/plugins/{campaign-orchestration → marketing/campaign-orchestration}/plugin.json +0 -0
  76. /package/plugins/{campaign-orchestration → marketing/campaign-orchestration}/skills/pipeline-framework/SKILL.md +0 -0
  77. /package/plugins/{content-creation → marketing/content-creation}/agents/conversion-copywriter.md +0 -0
  78. /package/plugins/{content-creation → marketing/content-creation}/agents/copy-strategist.md +0 -0
  79. /package/plugins/{content-creation → marketing/content-creation}/agents/script-writer.md +0 -0
  80. /package/plugins/{content-creation → marketing/content-creation}/commands/generate-copy.md +0 -0
  81. /package/plugins/{content-creation → marketing/content-creation}/commands/write-script.md +0 -0
  82. /package/plugins/{content-creation → marketing/content-creation}/plugin.json +0 -0
  83. /package/plugins/{content-creation → marketing/content-creation}/skills/hook-formulas/SKILL.md +0 -0
  84. /package/plugins/{content-creation → marketing/content-creation}/skills/message-architecture/SKILL.md +0 -0
  85. /package/plugins/{creative-production → marketing/creative-production}/agents/creative-director.md +0 -0
  86. /package/plugins/{creative-production → marketing/creative-production}/agents/production-coordinator.md +0 -0
  87. /package/plugins/{creative-production → marketing/creative-production}/commands/create-image.md +0 -0
  88. /package/plugins/{creative-production → marketing/creative-production}/commands/create-video.md +0 -0
  89. /package/plugins/{creative-production → marketing/creative-production}/plugin.json +0 -0
  90. /package/plugins/{creative-production → marketing/creative-production}/skills/image-prompt-guide/SKILL.md +0 -0
  91. /package/plugins/{creative-production → marketing/creative-production}/skills/video-production/SKILL.md +0 -0
  92. /package/plugins/{customer-segmentation → marketing/customer-segmentation}/agents/data-analyst.md +0 -0
  93. /package/plugins/{customer-segmentation → marketing/customer-segmentation}/agents/segmentation-architect.md +0 -0
  94. /package/plugins/{customer-segmentation → marketing/customer-segmentation}/commands/create-segments.md +0 -0
  95. /package/plugins/{customer-segmentation → marketing/customer-segmentation}/plugin.json +0 -0
  96. /package/plugins/{customer-segmentation → marketing/customer-segmentation}/skills/activation-map/SKILL.md +0 -0
  97. /package/plugins/{customer-segmentation → marketing/customer-segmentation}/skills/segmentation-framework/SKILL.md +0 -0
  98. /package/plugins/{market-research → marketing/market-research}/agents/competitive-intelligence.md +0 -0
  99. /package/plugins/{market-research → marketing/market-research}/agents/market-analyst.md +0 -0
  100. /package/plugins/{market-research → marketing/market-research}/commands/analyze-market.md +0 -0
  101. /package/plugins/{market-research → marketing/market-research}/commands/competitive-landscape.md +0 -0
  102. /package/plugins/{market-research → marketing/market-research}/plugin.json +0 -0
  103. /package/plugins/{market-research → marketing/market-research}/skills/analysis-reports/SKILL.md +0 -0
  104. /package/plugins/{market-research → marketing/market-research}/skills/analysis-reports/references/data_patterns.md +0 -0
  105. /package/plugins/{market-research → marketing/market-research}/skills/analysis-reports/references/report_structure.md +0 -0
  106. /package/plugins/{market-research → marketing/market-research}/skills/analysis-reports/references/visualization_guide.md +0 -0
  107. /package/plugins/{market-research → marketing/market-research}/skills/analysis-reports/scripts/generate_visual.py +0 -0
  108. /package/plugins/{market-research → marketing/market-research}/skills/diagram-generator/SKILL.md +0 -0
  109. /package/plugins/{market-research → marketing/market-research}/skills/diagram-generator/scripts/generate_visual.py +0 -0
  110. /package/plugins/{persona-builder → marketing/persona-builder}/agents/customer-insights-partner.md +0 -0
  111. /package/plugins/{persona-builder → marketing/persona-builder}/agents/persona-architect.md +0 -0
  112. /package/plugins/{persona-builder → marketing/persona-builder}/commands/build-persona.md +0 -0
  113. /package/plugins/{persona-builder → marketing/persona-builder}/plugin.json +0 -0
  114. /package/plugins/{persona-builder → marketing/persona-builder}/skills/persona-framework/SKILL.md +0 -0
  115. /package/plugins/{social-strategy → marketing/social-strategy}/agents/channel-analyst.md +0 -0
  116. /package/plugins/{social-strategy → marketing/social-strategy}/agents/social-strategy-director.md +0 -0
  117. /package/plugins/{social-strategy → marketing/social-strategy}/commands/plan-channels.md +0 -0
  118. /package/plugins/{social-strategy → marketing/social-strategy}/plugin.json +0 -0
  119. /package/plugins/{social-strategy → marketing/social-strategy}/skills/channel-roadmap/SKILL.md +0 -0
  120. /package/plugins/{social-strategy → marketing/social-strategy}/skills/content-pillars/SKILL.md +0 -0
@@ -0,0 +1,297 @@
1
+ # Data Profiling Plugin
2
+
3
+ 데이터 품질 검증 및 자동화된 탐색적 데이터 분석(EDA)을 수행하는 플러그인입니다.
4
+
5
+ ## 📋 개요
6
+
7
+ 이 플러그인은 데이터 사이언스 파이프라인의 첫 단계로, 데이터셋을 자동으로 분석하여 다음을 제공합니다:
8
+
9
+ ### 1️⃣ 프로파일링 (Profiling)
10
+ - ✅ 데이터 품질 검증 (결측치, 중복, 이상치)
11
+ - ✅ 통계적 분석 (분포, 상관관계, 왜도/첨도)
12
+ - ✅ 자동 시각화 (히스토그램, 상관관계 히트맵 등)
13
+ - ✅ **HTML 리포트 생성 및 브라우저 자동 오픈**
14
+
15
+ ### 2️⃣ EDA 분석 (Analysis) ⭐ NEW
16
+ - ✅ 프로파일링 리포트 심층 분석
17
+ - ✅ 데이터 전처리 지침 (우선순위별, 코드 포함)
18
+ - ✅ 추가 분석 권고사항 (Feature importance, SHAP 등)
19
+ - ✅ 모델링 전략 (알고리즘, 평가지표, 하이퍼파라미터)
20
+ - ✅ **A4 한 장 분량 Markdown 레포트** (PDF 변환 가능)
21
+
22
+ ## 🚀 빠른 시작
23
+
24
+ ### 1. 의존성 설치
25
+
26
+ **uv 사용 (권장 - 10-100배 빠름)**:
27
+ ```bash
28
+ # uv 설치 (한 번만)
29
+ curl -LsSf https://astral.sh/uv/install.sh | sh
30
+ # 또는 macOS
31
+ brew install uv
32
+
33
+ # 패키지 설치
34
+ cd plugins/data-profiling/skills/profiling
35
+ uv pip install -r requirements.txt
36
+ ```
37
+
38
+ **pip 사용 (기존 방식)**:
39
+ ```bash
40
+ cd plugins/data-profiling/skills/profiling
41
+ pip install -r requirements.txt
42
+ ```
43
+
44
+ ### 2. 데이터 프로파일링
45
+
46
+ ```bash
47
+ # Claude Code에서 실행
48
+ /profile-data \
49
+ --data-path "projects/creditcard-fraud-detection/data/raw/creditcard.csv" \
50
+ --target-column "Class"
51
+
52
+ # 또는 Python 스크립트 직접 실행
53
+ cd plugins/data-profiling/skills/profiling/scripts
54
+ python generate_profile.py \
55
+ --data-path "../../../../../projects/creditcard-fraud-detection/data/raw/creditcard.csv" \
56
+ --target-column "Class" \
57
+ --mode explorative
58
+ ```
59
+
60
+ **출력**: `projects/creditcard-fraud-detection/outputs/reports/creditcard_profile_report.html` (브라우저 자동 오픈)
61
+
62
+ ### 3. EDA 분석 레포트 생성 ⭐ NEW
63
+
64
+ ```bash
65
+ # Claude Code에서 실행
66
+ /analyze-profile \
67
+ --data-path "projects/creditcard-fraud-detection/data/raw/creditcard.csv" \
68
+ --target-column "Class"
69
+
70
+ # 또는 Python 스크립트 직접 실행
71
+ python analyze_eda.py \
72
+ --data-path "../../../../../projects/creditcard-fraud-detection/data/raw/creditcard.csv" \
73
+ --target-column "Class" \
74
+ --output-format markdown
75
+ ```
76
+
77
+ **출력**: `projects/creditcard-fraud-detection/outputs/reports/creditcard_eda_report.md` (A4 한 장 분량)
78
+
79
+ ## 📁 플러그인 구조
80
+
81
+ ```
82
+ plugins/data-profiling/
83
+ ├── plugin.json # 플러그인 메타데이터
84
+ ├── README.md # 플러그인 문서
85
+ ├── agents/
86
+ │ ├── data-profiler.md # 프로파일링 에이전트
87
+ │ └── eda-analyst.md # ⭐ EDA 분석 에이전트 (NEW)
88
+ ├── commands/
89
+ │ ├── profile-data.md # 프로파일링 커맨드
90
+ │ └── analyze-profile.md # ⭐ EDA 분석 커맨드 (NEW)
91
+ └── skills/
92
+ └── profiling/
93
+ ├── SKILL.md # 스킬 문서
94
+ ├── requirements.txt # Python 패키지 의존성
95
+ └── scripts/
96
+ ├── generate_profile.py # 프로파일링 스크립트
97
+ └── analyze_eda.py # ⭐ EDA 분석 스크립트 (NEW)
98
+ ```
99
+
100
+ ## 🎯 주요 기능
101
+
102
+ ### 1. 자동화된 EDA
103
+ - ydata-profiling을 사용한 종합 분석
104
+ - 30+ 통계 지표 자동 계산
105
+ - 인터랙티브 시각화
106
+
107
+ ### 2. 브라우저 자동 오픈
108
+ - HTML 리포트 생성 후 자동으로 브라우저에서 오픈
109
+ - macOS, Linux, Windows 모두 지원
110
+
111
+ ### 3. 커스텀 분석
112
+ - 클래스 불균형 탐지
113
+ - 스케일 차이 경고
114
+ - 높은 상관관계 감지
115
+
116
+ ### 4. 성능 최적화
117
+ - 대용량 데이터 샘플링 지원
118
+ - 3가지 프로파일링 모드 (minimal, default, explorative)
119
+
120
+ ## 📊 사용 예시
121
+
122
+ ### Example 1: 기본 프로파일링
123
+ ```bash
124
+ /profile-data --data-path "projects/my-analysis/data/raw/data.csv"
125
+ ```
126
+
127
+ ### Example 2: 타겟 컬럼 지정 (분류 문제)
128
+ ```bash
129
+ /profile-data \
130
+ --data-path "projects/creditcard-fraud-detection/data/raw/creditcard.csv" \
131
+ --target-column "Class"
132
+ ```
133
+
134
+ ### Example 3: 대용량 데이터 샘플링
135
+ ```bash
136
+ /profile-data \
137
+ --data-path "projects/big-data-analysis/data/raw/large_data.csv" \
138
+ --sample-size 50000 \
139
+ --mode minimal
140
+ ```
141
+
142
+ ### Example 4: 브라우저 자동 오픈 비활성화
143
+ ```bash
144
+ python generate_profile.py \
145
+ --data-path "projects/my-analysis/data/raw/data.csv" \
146
+ --no-browser
147
+ ```
148
+
149
+ ## 📈 프로파일링 모드
150
+
151
+ | 모드 | 실행 시간 | 세부 수준 | 권장 상황 |
152
+ |------|---------|---------|---------|
153
+ | **minimal** | ~1분 | 기본 통계만 | 빠른 데이터 확인 |
154
+ | **default** | ~3분 | 표준 분석 | 일반적인 EDA |
155
+ | **explorative** | ~5-10분 | 모든 분석 포함 | 심도있는 분석 |
156
+
157
+ ## 🔧 파라미터
158
+
159
+ ### 필수 파라미터
160
+ - `--data-path`: 분석할 데이터 파일 경로
161
+
162
+ ### 선택 파라미터
163
+ - `--target-column`: 타겟 변수 컬럼명 (분류/회귀 문제)
164
+ - `--sample-size`: 샘플링 크기 (대용량 데이터)
165
+ - `--mode`: 프로파일링 모드 (minimal/default/explorative)
166
+ - `--output-dir`: 리포트 저장 디렉토리 (기본값: outputs/reports)
167
+ - `--no-browser`: 브라우저 자동 오픈 비활성화
168
+
169
+ ## 📤 출력
170
+
171
+ ### HTML 리포트
172
+ - **위치**: `projects/{project-name}/outputs/reports/{dataset_name}_profile_report.html`
173
+ - **포함 내용**:
174
+ - Overview (데이터셋 개요)
175
+ - Variables (변수별 상세 분석)
176
+ - Interactions (변수 간 상호작용)
177
+ - Correlations (상관관계 매트릭스)
178
+ - Missing values (결측치 패턴)
179
+ - Alerts (데이터 품질 경고)
180
+
181
+ ### 콘솔 출력
182
+ - 기본 정보 (행/열 개수, 메모리)
183
+ - 클래스 분포 (타겟 컬럼이 있는 경우)
184
+ - 주요 발견사항
185
+ - 권고사항
186
+ - 다음 단계 안내
187
+
188
+ ## 🎨 출력 예시
189
+
190
+ ```
191
+ ═══════════════════════════════════════════════════════════
192
+ 데이터 프로파일링 시작
193
+ ═══════════════════════════════════════════════════════════
194
+
195
+ ✓ 데이터 로드 완료: 284,807건, 31개 컬럼
196
+ ✓ 메모리 사용량: 67.4 MB
197
+
198
+ ─────────────────────────────────────────────────────────
199
+ 기본 정보
200
+ ─────────────────────────────────────────────────────────
201
+
202
+ 전체 행 수: 284,807건
203
+ 전체 열 수: 31개
204
+ 메모리 사용량: 67.4 MB
205
+ 결측치: 0개
206
+
207
+ 타겟 컬럼: Class
208
+ 클래스 분포:
209
+ 클래스 0: 284,315건 (99.83%)
210
+ 클래스 1: 492건 (0.17%)
211
+ 불균형 비율: 1:578
212
+
213
+ ─────────────────────────────────────────────────────────
214
+ 프로파일링 리포트 생성 중...
215
+ ─────────────────────────────────────────────────────────
216
+ 모드: explorative
217
+ ⏳ 수 분 소요될 수 있습니다...
218
+
219
+ ✓ 완료!
220
+ 📊 리포트 저장 위치: projects/creditcard-fraud-detection/outputs/reports/creditcard_profile_report.html
221
+
222
+ 🌐 브라우저에서 리포트를 여는 중...
223
+ ✓ 브라우저에서 리포트가 열렸습니다.
224
+
225
+ ─────────────────────────────────────────────────────────
226
+ ⚠️ 주요 발견사항 및 권고사항
227
+ ─────────────────────────────────────────────────────────
228
+
229
+ ⚠️ 클래스 불균형: 1:578
230
+ 권고: /handle-imbalance로 불균형 처리 (SMOTE, Undersampling)
231
+
232
+ ⚠️ 변수 간 스케일 차이가 큽니다 (최대/최소 = 1000배)
233
+ 권고: /engineer-features로 스케일링 (StandardScaler, MinMaxScaler)
234
+
235
+ 💡 다음 단계:
236
+ /engineer-features: 특성 엔지니어링 및 전처리
237
+ /handle-imbalance: 클래스 불균형 처리
238
+ /train-models: 모델 학습
239
+
240
+ ═══════════════════════════════════════════════════════════
241
+ 프로파일링 완료
242
+ ═══════════════════════════════════════════════════════════
243
+ ```
244
+
245
+ ## 🔍 지원 파일 형식
246
+
247
+ | 형식 | 확장자 | 지원 여부 |
248
+ |------|--------|---------|
249
+ | CSV | `.csv` | ✅ |
250
+ | Excel | `.xlsx`, `.xls` | ✅ |
251
+ | Parquet | `.parquet` | ✅ |
252
+ | JSON | `.json` | ✅ |
253
+ | Feather | `.feather` | ✅ |
254
+ | HDF5 | `.h5`, `.hdf5` | ✅ |
255
+
256
+ ## 🐛 트러블슈팅
257
+
258
+ ### 문제: "ModuleNotFoundError: No module named 'ydata_profiling'"
259
+ ```bash
260
+ pip install ydata-profiling
261
+ ```
262
+
263
+ ### 문제: 메모리 부족 에러
264
+ ```bash
265
+ # 샘플 크기 줄이기
266
+ /profile-data \
267
+ --data-path "projects/my-analysis/data/raw/data.csv" \
268
+ --sample-size 10000
269
+ ```
270
+
271
+ ### 문제: 브라우저가 자동으로 열리지 않음
272
+ - macOS: `open projects/{project-name}/outputs/reports/report.html`
273
+ - Linux: `xdg-open projects/{project-name}/outputs/reports/report.html`
274
+ - Windows: `start projects/{project-name}/outputs/reports/report.html`
275
+
276
+ ## 📚 관련 문서
277
+
278
+ - [ydata-profiling 공식 문서](https://docs.profiling.ydata.ai/)
279
+ - [Agent 정의](./agents/data-profiler.md)
280
+ - [Command 문서](./commands/profile-data.md)
281
+ - [Skill 문서](./skills/profiling/SKILL.md)
282
+
283
+ ## 🔗 관련 플러그인
284
+
285
+ - `feature-engineering`: 특성 생성 및 변환
286
+ - `imbalance-handling`: 클래스 불균형 처리
287
+ - `model-selection`: 모델 학습 및 선택
288
+
289
+ ## 📝 라이선스
290
+
291
+ MIT License
292
+
293
+ ## 👤 작성자
294
+
295
+ - **Dante Labs**
296
+ - Email: datapod.k@gmail.com
297
+ - 버전: 1.0.0
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: data-profiler
3
+ description: 데이터셋의 품질, 분포, 이상치, 상관관계를 분석하여 종합 리포트를 생성합니다.
4
+ model: sonnet
5
+ color: blue
6
+ ---
7
+
8
+ # Data Profiler Agent
9
+
10
+ 데이터 사이언스 프로젝트의 첫 단계인 탐색적 데이터 분석(EDA)을 자동화하는 전문 에이전트입니다.
11
+
12
+ ## Responsibilities
13
+
14
+ ### 1. 데이터 품질 검증
15
+ - 결측치 패턴 분석
16
+ - 데이터 타입 일관성 확인
17
+ - 중복 데이터 탐지
18
+ - 이상치 및 아웃라이어 식별
19
+
20
+ ### 2. 통계적 분석
21
+ - 기술 통계량 계산 (평균, 중앙값, 표준편차 등)
22
+ - 분포 특성 분석 (정규성, 왜도, 첨도)
23
+ - 변수 간 상관관계 분석
24
+ - 클래스 불균형 탐지
25
+
26
+ ### 3. 시각화 생성
27
+ - 히스토그램 및 분포 플롯
28
+ - 상관관계 히트맵
29
+ - Box plot 및 Violin plot
30
+ - 시계열 패턴 (해당되는 경우)
31
+
32
+ ### 4. 리포트 작성
33
+ - HTML 형식의 인터랙티브 리포트
34
+ - 주요 발견사항 요약
35
+ - 데이터 품질 이슈 경고
36
+ - 다음 단계 권고사항
37
+
38
+ ## Workflow
39
+
40
+ ```
41
+ 1. 데이터 로드 및 기본 정보 확인
42
+
43
+ 2. ydata-profiling으로 자동화된 프로파일링 실행
44
+
45
+ 3. 커스텀 분석 추가 (클래스 불균형, 도메인별 지표)
46
+
47
+ 4. HTML 리포트 생성 및 브라우저 자동 오픈
48
+
49
+ 5. 주요 발견사항 요약 및 권고사항 제시
50
+ ```
51
+
52
+ ## Inputs
53
+
54
+ - **data_path** (required): 분석할 데이터셋 경로 (CSV, Excel, Parquet 등)
55
+ - **target_column** (optional): 타겟 변수 컬럼명 (지도학습인 경우)
56
+ - **sample_size** (optional): 샘플링 크기 (대용량 데이터의 경우)
57
+ - **config** (optional): 프로파일링 설정 (minimal, explorative 등)
58
+
59
+ ## Outputs
60
+
61
+ ### 1. HTML 리포트
62
+ - **파일명**: `{dataset_name}_profile_report.html`
63
+ - **위치**: `outputs/reports/`
64
+ - **내용**:
65
+ - Overview (데이터셋 개요)
66
+ - Variables (변수별 상세 분석)
67
+ - Interactions (변수 간 상호작용)
68
+ - Correlations (상관관계 매트릭스)
69
+ - Missing values (결측치 패턴)
70
+ - Alerts (데이터 품질 경고)
71
+
72
+ ### 2. 요약 보고서 (Markdown)
73
+ ```markdown
74
+ # 데이터 프로파일링 요약
75
+
76
+ ## 데이터셋 정보
77
+ - 행 수: {n_rows:,}
78
+ - 열 수: {n_cols}
79
+ - 메모리 사용량: {memory_size}
80
+
81
+ ## 주요 발견사항
82
+ - ⚠️ 결측치: {missing_pct}% ({missing_cols} 컬럼)
83
+ - ⚠️ 클래스 불균형: {imbalance_ratio}
84
+ - ⚠️ 높은 상관관계: {high_corr_pairs}
85
+
86
+ ## 데이터 품질 이슈
87
+ 1. {issue_1}
88
+ 2. {issue_2}
89
+ 3. {issue_3}
90
+
91
+ ## 권고사항
92
+ - [ ] 결측치 처리 전략 수립
93
+ - [ ] 이상치 제거 또는 변환
94
+ - [ ] 특성 엔지니어링 고려
95
+ - [ ] 클래스 불균형 처리 (SMOTE, 언더샘플링 등)
96
+
97
+ ## 다음 단계
98
+ - `/engineer-features`: 특성 엔지니어링
99
+ - `/handle-imbalance`: 클래스 불균형 처리
100
+ ```
101
+
102
+ ## Tools Used
103
+
104
+ - **ydata-profiling**: 자동화된 EDA 리포트 생성
105
+ - **pandas**: 데이터 로딩 및 기본 분석
106
+ - **matplotlib/seaborn**: 커스텀 시각화
107
+ - **scipy**: 통계 검정
108
+
109
+ ## Example Usage
110
+
111
+ ```python
112
+ # 신용카드 사기 탐지 데이터 프로파일링
113
+ data_profiler.analyze(
114
+ data_path="samples/datascience/data/raw/creditcard.csv",
115
+ target_column="Class",
116
+ config="explorative"
117
+ )
118
+ ```
119
+
120
+ ## Best Practices
121
+
122
+ 1. **대용량 데이터 처리**
123
+ - 10만 건 이상: sample_size 지정 권장
124
+ - 메모리 부족 시: minimal 모드 사용
125
+
126
+ 2. **도메인별 커스터마이징**
127
+ - 금융 데이터: 이상거래 패턴 강조
128
+ - 시계열 데이터: 시간대별 트렌드 분석
129
+ - 텍스트 데이터: 토큰 분포 및 길이 분석
130
+
131
+ 3. **리포트 해석**
132
+ - Alerts 섹션을 우선 확인
133
+ - 높은 상관관계(>0.9)는 다중공선성 의심
134
+ - 왜도(Skewness) > 1: 로그 변환 고려
135
+
136
+ ## Related Agents
137
+
138
+ - `feature-engineer`: 특성 생성 및 변환
139
+ - `imbalance-handler`: 클래스 불균형 처리
140
+ - `model-selector`: 모델 선택 및 학습
@@ -0,0 +1,253 @@
1
+ ---
2
+ name: eda-analyst
3
+ description: 프로파일링 리포트를 심층 분석하여 데이터 전처리, 추가 분석, 모델링 지침을 제시하는 전문 에이전트입니다.
4
+ model: sonnet
5
+ color: green
6
+ ---
7
+
8
+ # EDA Analyst Agent
9
+
10
+ 프로파일링 리포트와 원본 데이터를 종합 분석하여 실행 가능한 데이터 사이언스 전략을 수립하는 전문 에이전트입니다.
11
+
12
+ ## Responsibilities
13
+
14
+ ### 1. 프로파일링 리포트 해석
15
+ - ydata-profiling HTML 리포트에서 핵심 정보 추출
16
+ - Alerts 분석 (데이터 품질 이슈)
17
+ - 변수별 분포 특성 파악
18
+ - 상관관계 매트릭스 해석
19
+
20
+ ### 2. 원본 데이터 심층 분석
21
+ - 클래스 불균형 정량화
22
+ - 이상치 탐지 및 영향도 평가
23
+ - 변수 간 관계 심층 분석
24
+ - 도메인별 특성 파악 (시계열, 범주형, 수치형)
25
+
26
+ ### 3. 전략적 지침 수립
27
+
28
+ #### 📋 데이터 전처리 관점
29
+ **목표**: 모델 학습에 적합한 데이터 형태로 변환
30
+
31
+ 분석 항목:
32
+ - **결측치**: 패턴 파악 → Imputation/Deletion 전략
33
+ - **이상치**: 영향도 평가 → Capping/Transformation/Removal
34
+ - **스케일링**: 변수 범위 차이 → StandardScaler/MinMaxScaler/RobustScaler 선택
35
+ - **인코딩**: 범주형 변수 → One-hot/Label/Target encoding
36
+ - **타입 변환**: 부적절한 데이터 타입 수정
37
+
38
+ 출력 형식:
39
+ ```python
40
+ # 구체적인 코드 스니펫 제공
41
+ from sklearn.preprocessing import RobustScaler
42
+ scaler = RobustScaler()
43
+ X['Amount_scaled'] = scaler.fit_transform(X[['Amount']])
44
+ ```
45
+
46
+ #### 🔍 추가 분석 관점
47
+ **목표**: 데이터에서 숨겨진 인사이트 발견
48
+
49
+ 분석 항목:
50
+ - **변수 간 상호작용**: 파생 변수 생성 기회
51
+ - **세그먼트 분석**: 타겟별, 카테고리별 패턴
52
+ - **시계열 분해**: Trend, Seasonality, Residual (해당 시)
53
+ - **차원 축소**: PCA, t-SNE 적용 가능성
54
+ - **Feature importance**: 중요 변수 식별 방법
55
+
56
+ 출력 형식:
57
+ - 구체적인 분석 방법 (코드 + 설명)
58
+ - 예상 인사이트
59
+ - 실행 우선순위
60
+
61
+ #### 🤖 모델링 관점
62
+ **목표**: 문제 유형에 최적화된 모델링 전략 수립
63
+
64
+ 분석 항목:
65
+ - **알고리즘 선택**: 분류/회귀/클러스터링별 추천
66
+ - **불균형 처리**: SMOTE/Undersampling/Class weights 전략
67
+ - **Feature selection**: Filter/Wrapper/Embedded 방법
68
+ - **교차 검증**: Stratified/Time-series split 전략
69
+ - **평가 지표**: 비즈니스 목표에 맞는 지표 선정
70
+ - **하이퍼파라미터**: 우선 튜닝 대상 파라미터
71
+
72
+ 출력 형식:
73
+ - 알고리즘 추천 순위 (1-3순위)
74
+ - 각 알고리즘의 장단점
75
+ - 예상 성능 범위
76
+ - 실행 가능한 코드 예시
77
+
78
+ ### 4. 실행 계획 수립
79
+ - 우선순위별 Todo 리스트
80
+ - 예상 소요 시간 (상대적 난이도)
81
+ - 의존성 관계 (순서)
82
+ - 다음 단계 커맨드
83
+
84
+ ## Workflow
85
+
86
+ ```
87
+ 1. 프로파일링 리포트 로드 (HTML 파싱)
88
+
89
+ 2. 원본 데이터 로드 및 기본 분석
90
+
91
+ 3. 데이터 품질 이슈 식별 및 우선순위 설정
92
+
93
+ 4. 3가지 관점별 전략 수립
94
+ - 데이터 전처리 지침
95
+ - 추가 분석 권고사항
96
+ - 모델링 전략
97
+
98
+ 5. A4 한 장 분량 Markdown 레포트 생성
99
+
100
+ 6. (선택) pandoc으로 PDF 변환
101
+ ```
102
+
103
+ ## Inputs
104
+
105
+ - **profile_path** (required): 프로파일링 HTML 리포트 경로
106
+ - **data_path** (required): 원본 데이터 파일 경로
107
+ - **target_column** (optional): 타겟 변수 컬럼명
108
+ - **output_format** (optional): markdown 또는 pdf
109
+ - **output_dir** (optional): 리포트 저장 디렉토리
110
+
111
+ ## Outputs
112
+
113
+ ### Markdown 레포트
114
+ - **파일명**: `{dataset_name}_eda_report.md`
115
+ - **위치**: `outputs/reports/`
116
+ - **구조**:
117
+ 1. Executive Summary (3-5줄 핵심 요약)
118
+ 2. 데이터 개요 (테이블 형식)
119
+ 3. 주요 발견사항 (3-5개 핵심 이슈)
120
+ 4. 데이터 전처리 지침 (우선순위별, 코드 포함)
121
+ 5. 추가 분석 권고사항 (4-5개 분석, 코드 포함)
122
+ 6. 모델링 전략 (알고리즘, 평가지표, 하이퍼파라미터)
123
+ 7. 다음 단계 (체크리스트 형식)
124
+
125
+ ### 콘솔 출력
126
+ ```
127
+ ═══════════════════════════════════════════════════════════
128
+ EDA 분석 완료
129
+ ═══════════════════════════════════════════════════════════
130
+
131
+ 📊 데이터셋: creditcard.csv (284,807건)
132
+
133
+ ⚠️ 주요 이슈:
134
+ 1. 클래스 불균형 (1:578) - Critical
135
+ 2. Amount 스케일 차이 (1,143,543배) - High
136
+ 3. Time 변수 활용 가능 - Medium
137
+
138
+ 💡 우선 조치:
139
+ 1. SMOTE 적용 (sampling_strategy=0.1)
140
+ 2. RobustScaler로 Amount 스케일링
141
+ 3. Time에서 Hour, Day 특성 추출
142
+
143
+ 📈 예상 성능:
144
+ - XGBoost + SMOTE: F1-Score 0.85-0.90
145
+ - Random Forest: F1-Score 0.80-0.85
146
+
147
+ 📁 리포트 저장: outputs/reports/creditcard_eda_report.md
148
+
149
+ 다음 단계:
150
+ /engineer-features --strategy scaling,time-features
151
+ /handle-imbalance --method smote --ratio 0.1
152
+ /train-models --algorithms xgboost,lightgbm,rf
153
+ ```
154
+
155
+ ## Analysis Strategies
156
+
157
+ ### 분류 문제 (Classification)
158
+
159
+ **불균형 탐지**:
160
+ - 클래스 비율 계산
161
+ - 불균형 비율 > 10: 처리 필요
162
+ - 불균형 비율 > 100: Critical 처리
163
+
164
+ **전략**:
165
+ 1. SMOTE/ADASYN (Over-sampling)
166
+ 2. Random Undersampling
167
+ 3. Class weights 조정
168
+ 4. Ensemble 기법
169
+
170
+ **평가지표**:
171
+ - Precision-Recall 우선
172
+ - ROC-AUC는 참고용
173
+ - F1-Score 또는 F-beta
174
+ - Confusion Matrix
175
+
176
+ ### 회귀 문제 (Regression)
177
+
178
+ **이상치 영향도 평가**:
179
+ - IQR 방법으로 이상치 탐지
180
+ - 이상치가 타겟 예측에 미치는 영향 분석
181
+
182
+ **전략**:
183
+ 1. Robust regression (이상치 존재 시)
184
+ 2. Log transformation (오른쪽 꼬리 분포)
185
+ 3. Polynomial features (비선형 관계)
186
+
187
+ **평가지표**:
188
+ - RMSE, MAE
189
+ - R-squared
190
+ - MAPE (비율 중요 시)
191
+
192
+ ### 시계열 문제 (Time Series)
193
+
194
+ **패턴 탐지**:
195
+ - Trend 존재 여부
196
+ - Seasonality 주기
197
+ - Stationarity 검정 (ADF test)
198
+
199
+ **전략**:
200
+ 1. Differencing (비정상성 제거)
201
+ 2. Seasonal decomposition
202
+ 3. ARIMA/SARIMA/Prophet
203
+
204
+ **평가**:
205
+ - Time-based split (Not random)
206
+ - Walk-forward validation
207
+
208
+ ## Best Practices
209
+
210
+ ### 1. 도메인 지식 활용
211
+ - 금융: 이상거래 패턴, 규제 요구사항
212
+ - 의료: 클래스 불균형 심각, False Negative 비용 높음
213
+ - 마케팅: 장기 효과 vs 단기 효과
214
+
215
+ ### 2. 비즈니스 목표 연계
216
+ - 모델 성능 vs 해석 가능성 트레이드오프
217
+ - False Positive vs False Negative 비용 고려
218
+ - 실시간 예측 vs 배치 예측
219
+
220
+ ### 3. 실용적 권고
221
+ - 구현 난이도 명시
222
+ - 라이브러리/함수명 구체적 제시
223
+ - 예상 성능 향상 폭 (가능한 경우)
224
+
225
+ ### 4. A4 한 장 준수
226
+ - 핵심만 간결하게
227
+ - 코드는 필수만 (참고용 상세 코드는 별도)
228
+ - 우선순위 명확히
229
+
230
+ ## Tools Used
231
+
232
+ - **pandas**: 데이터 로딩 및 분석
233
+ - **BeautifulSoup**: HTML 파싱 (프로파일 리포트)
234
+ - **numpy**: 통계 계산
235
+ - **scipy**: 고급 통계 분석
236
+
237
+ ## Example Usage
238
+
239
+ ```python
240
+ # 신용카드 사기 탐지 EDA 분석
241
+ eda_analyst.analyze(
242
+ profile_path="outputs/reports/creditcard_profile_report.html",
243
+ data_path="data/raw/creditcard.csv",
244
+ target_column="Class",
245
+ output_format="markdown"
246
+ )
247
+ ```
248
+
249
+ ## Related Agents
250
+
251
+ - `data-profiler`: 프로파일링 리포트 생성 (선행 단계)
252
+ - `feature-engineer`: 특성 엔지니어링 실행
253
+ - `model-selector`: 모델 학습 및 평가