hossam 0.3.16__py3-none-any.whl → 0.3.18__py3-none-any.whl

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.
@@ -1,636 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: hossam
3
- Version: 0.3.16
4
- Summary: Hossam Data Helper
5
- Author-email: Lee Kwang-Ho <leekh4232@gmail.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/leekh4232/hossam-py
8
- Project-URL: Repository, https://github.com/leekh4232/hossam-py
9
- Keywords: data,analysis,helper,hossam,tensorflow
10
- Classifier: Development Status :: 3 - Alpha
11
- Classifier: Intended Audience :: Developers
12
- Classifier: Topic :: Software Development :: Libraries
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3 :: Only
15
- Requires-Python: >=3.11
16
- Description-Content-Type: text/markdown
17
- License-File: LICENSE
18
- Requires-Dist: tqdm
19
- Requires-Dist: tabulate
20
- Requires-Dist: pandas
21
- Requires-Dist: matplotlib
22
- Requires-Dist: seaborn
23
- Requires-Dist: requests
24
- Requires-Dist: openpyxl
25
- Requires-Dist: xlrd
26
- Requires-Dist: statsmodels
27
- Requires-Dist: scipy
28
- Requires-Dist: scikit-learn
29
- Requires-Dist: pingouin
30
- Requires-Dist: statannotations
31
- Requires-Dist: joblib
32
- Requires-Dist: geopandas
33
- Requires-Dist: kmodes
34
- Requires-Dist: pmdarima
35
- Requires-Dist: prophet
36
- Requires-Dist: plotly
37
- Dynamic: license-file
38
-
39
- # 🎓 Hossam Data Helper
40
-
41
- [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)
42
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
43
- [![Version](https://img.shields.io/badge/version-0.3.8-green.svg)](https://pypi.org/project/hossam/)
44
-
45
- **Hossam**은 데이터 분석, 시각화, 통계 처리를 위한 종합 헬퍼 라이브러리입니다.
46
-
47
- 아이티윌(ITWILL)에서 진행 중인 머신러닝 및 데이터 분석 수업을 위해 개발되었으며, 이광호 강사의 강의에서 활용됩니다.
48
-
49
- ---
50
-
51
- ## 📋 목차
52
-
53
- - [특징](#-특징)
54
- - [설치](#-설치)
55
- - [빠른 시작](#-빠른-시작)
56
- - [주요 기능](#-주요-기능)
57
- - [데이터 로더](#1-데이터-로더)
58
- - [시각화 모듈](#2-시각화-모듈-hossamplot)
59
- - [분석 모듈](#3-분석-모듈-hossamanalysis)
60
- - [전처리 모듈](#4-전처리-모듈-hossamprep)
61
- - [유틸리티 모듈](#5-유틸리티-모듈-hossamutil)
62
- - [의존성](#-의존성)
63
- - [문서](#-문서)
64
- - [라이선스](#-라이선스)
65
- - [저자](#-저자)
66
-
67
- ---
68
-
69
- ## ✨ 특징
70
-
71
- - 📊 **풍부한 시각화**: Seaborn/Matplotlib 기반의 25+ 시각화 함수
72
- - 🎯 **통계 분석**: 회귀, 분류, 시계열 분석을 위한 통계 도구
73
- - 📦 **샘플 데이터**: 학습용 데이터셋 즉시 로드 기능
74
- - 🔧 **데이터 전처리**: 결측치 처리, 이상치 탐지, 스케일링 등
75
- - 🚀 **간편한 사용**: 직관적인 API로 빠른 프로토타이핑 지원
76
- - 📈 **교육용 최적화**: 데이터 분석 교육에 특화된 설계
77
-
78
- ---
79
-
80
- ## 📦 설치
81
-
82
- ### PyPI를 통한 설치 (권장)
83
-
84
- ```bash
85
- pip install hossam
86
- ```
87
-
88
- ### 요구사항
89
-
90
- - Python 3.8 이상
91
- - pandas, numpy, matplotlib, seaborn 등 (자동 설치됨)
92
-
93
- ---
94
-
95
- ## 🚀 빠른 시작
96
-
97
- ### 버전 확인
98
-
99
- ```python
100
- import hossam
101
- print(hossam.__version__) # 0.3.0
102
- ```
103
-
104
- ### 샘플 데이터 로드
105
-
106
- ```python
107
- from hossam import load_data, load_info
108
-
109
- # 사용 가능한 데이터셋 목록 확인
110
- datasets = load_info()
111
- print(datasets)
112
-
113
- # 특정 키워드로 검색
114
- ad_datasets = load_info(search="AD")
115
-
116
- # 데이터셋 로드
117
- df = load_data('AD_SALES')
118
- print(df.head())
119
- ```
120
-
121
- ### 간단한 시각화
122
-
123
- ```python
124
- from hossam import hs_plot
125
- import pandas as pd
126
- import numpy as np
127
-
128
- # 샘플 데이터 생성
129
- df = pd.DataFrame({
130
- 'x': np.random.randn(100),
131
- 'y': np.random.randn(100),
132
- 'category': np.random.choice(['A', 'B', 'C'], 100)
133
- })
134
-
135
- # 산점도 그리기
136
- hs_plot.scatterplot(df=df, xname='x', yname='y', hue='category', palette='Set1')
137
-
138
- # 박스플롯 그리기
139
- hs_plot.boxplot(df=df, xname='category', yname='x', palette='pastel')
140
-
141
- # KDE 플롯 그리기
142
- hs_plot.kdeplot(df=df, xname='x', hue='category', fill=True, fill_alpha=0.3)
143
- ```
144
-
145
- ---
146
-
147
- ## 🎯 주요 기능
148
-
149
- ### 1. 데이터 로더
150
-
151
- 학습용 샘플 데이터셋을 빠르게 로드할 수 있습니다.
152
-
153
- ```python
154
- from hossam import load_data, load_info
155
-
156
- # 모든 데이터셋 목록 보기
157
- all_datasets = load_info()
158
-
159
- # 키워드로 검색
160
- search_results = load_info(search="regression")
161
-
162
- # 데이터 로드
163
- df = load_data('DATASET_NAME')
164
- ```
165
-
166
- **주요 데이터셋** (예시):
167
- - `AD_SALES`: 광고비와 매출 데이터
168
- - 기타 다양한 회귀, 분류, 시계열 데이터셋
169
-
170
- ---
171
-
172
- ### 2. 시각화 모듈 (`hossam.hs_plot`)
173
-
174
- #### 기본 플롯
175
-
176
- ##### 선 그래프 (Line Plot)
177
- ```python
178
- from hossam import hs_plot
179
-
180
- hs_plot.lineplot(
181
- df=df,
182
- xname='time',
183
- yname='value',
184
- hue='category',
185
- marker='o',
186
- palette='Set1'
187
- )
188
- ```
189
-
190
- ##### 산점도 (Scatter Plot)
191
- ```python
192
- hs_plot.scatterplot(
193
- df=df,
194
- xname='x',
195
- yname='y',
196
- hue='group',
197
- palette='husl'
198
- )
199
- ```
200
-
201
- ##### 히스토그램 (Histogram)
202
- ```python
203
- hs_plot.histplot(
204
- df=df,
205
- xname='value',
206
- hue='category',
207
- bins=30,
208
- kde=True,
209
- palette='Set2'
210
- )
211
- ```
212
-
213
- #### 분포 시각화
214
-
215
- ##### 박스플롯 (Box Plot)
216
- ```python
217
- hs_plot.boxplot(
218
- df=df,
219
- xname='category',
220
- yname='value',
221
- orient='v',
222
- palette='pastel'
223
- )
224
- ```
225
-
226
- ##### 바이올린 플롯 (Violin Plot)
227
- ```python
228
- hs_plot.violinplot(
229
- df=df,
230
- xname='category',
231
- yname='value',
232
- palette='muted'
233
- )
234
- ```
235
-
236
- ##### KDE 플롯 (Kernel Density Estimation)
237
- ```python
238
- # 1차원 KDE
239
- hs_plot.kdeplot(
240
- df=df,
241
- xname='value',
242
- hue='category',
243
- fill=True,
244
- fill_alpha=0.3,
245
- palette='Set1'
246
- )
247
-
248
- # 2차원 KDE
249
- hs_plot.kdeplot(
250
- df=df,
251
- xname='x',
252
- yname='y',
253
- palette='coolwarm'
254
- )
255
- ```
256
-
257
- #### 통계적 플롯
258
-
259
- ##### 회귀선이 포함된 산점도 (Regression Plot)
260
- ```python
261
- hs_plot.regplot(
262
- df=df,
263
- xname='x',
264
- yname='y',
265
- palette='red'
266
- )
267
- ```
268
-
269
- ##### 선형 모델 플롯 (LM Plot)
270
- ```python
271
- hs_plot.lmplot(
272
- df=df,
273
- xname='x',
274
- yname='y',
275
- hue='category'
276
- )
277
- ```
278
-
279
- ##### 잔차 플롯 (Residual Plot)
280
- ```python
281
- from sklearn.linear_model import LinearRegression
282
-
283
- # 모델 학습
284
- model = LinearRegression()
285
- model.fit(X_train, y_train)
286
- y_pred = model.predict(X_test)
287
-
288
- # 잔차 플롯
289
- hs_plot.residplot(
290
- y=y_test,
291
- y_pred=y_pred,
292
- lowess=True, # LOWESS 평활화
293
- mse=True # MSE 범위 표시
294
- )
295
- ```
296
-
297
- ##### Q-Q 플롯 (Quantile-Quantile Plot)
298
- ```python
299
- residuals = y_test - y_pred
300
- hs_plot.qqplot(y_pred=residuals)
301
- ```
302
-
303
- ##### 혼동 행렬 (Confusion Matrix)
304
- ```python
305
- hs_plot.confusion_matrix(
306
- y=y_test,
307
- y_pred=y_pred,
308
- cmap='Blues'
309
- )
310
- ```
311
-
312
- #### 다변량 분석
313
-
314
- ##### 쌍 관계 플롯 (Pair Plot)
315
- ```python
316
- hs_plot.pairplot(
317
- df=df,
318
- diag_kind='kde',
319
- hue='category',
320
- palette='Set1'
321
- )
322
- ```
323
-
324
- ##### 공동 분포 플롯 (Joint Plot)
325
- ```python
326
- hs_plot.jointplot(
327
- df=df,
328
- xname='x',
329
- yname='y',
330
- palette='viridis'
331
- )
332
- ```
333
-
334
- ##### 히트맵 (Heatmap)
335
- ```python
336
- # 상관계수 행렬
337
- corr_matrix = df.corr()
338
- hs_plot.heatmap(
339
- data=corr_matrix,
340
- palette='coolwarm'
341
- )
342
- ```
343
-
344
- #### 고급 시각화
345
-
346
- ##### 볼록 껍질 산점도 (Convex Hull)
347
- ```python
348
- hs_plot.convex_hull(
349
- data=df,
350
- xname='x',
351
- yname='y',
352
- hue='cluster',
353
- palette='Set1'
354
- )
355
- ```
356
-
357
- ##### 100% 누적 막대 그래프 (Stacked Bar)
358
- ```python
359
- hs_plot.stackplot(
360
- df=df,
361
- xname='category',
362
- hue='subcategory',
363
- palette='Pastel1'
364
- )
365
- ```
366
-
367
- ##### P-Value 주석 박스플롯
368
- ```python
369
- hs_plot.pvalue1_anotation(
370
- data=df,
371
- target='value',
372
- hue='group',
373
- pairs=[('A', 'B'), ('B', 'C')],
374
- test='t-test_ind',
375
- text_format='star'
376
- )
377
- ```
378
-
379
- ##### 클래스별 분포 (Distribution by Class)
380
- ```python
381
- hs_plot.distribution_by_class(
382
- data=df,
383
- xnames=['feature1', 'feature2'],
384
- hue='target',
385
- type='kde',
386
- fill=True,
387
- palette='Set1'
388
- )
389
- ```
390
-
391
- ##### 클래스별 산점도 (Scatter by Class)
392
- ```python
393
- hs_plot.scatter_by_class(
394
- data=df,
395
- group=[['x', 'y'], ['x', 'z']],
396
- hue='target',
397
- outline=True, # 볼록 껍질 표시
398
- palette='husl'
399
- )
400
- ```
401
-
402
- #### 공통 매개변수
403
-
404
- 모든 시각화 함수는 다음 공통 매개변수를 지원합니다:
405
-
406
- - **width**: 캔버스 가로 픽셀 (기본값: 1280)
407
- - **height**: 캔버스 세로 픽셀 (기본값: 720)
408
- - **dpi**: 해상도 (기본값: 200)
409
- - **palette**: 색상 팔레트 ('Set1', 'Set2', 'pastel', 'husl', 'coolwarm' 등)
410
- - **ax**: 외부 Axes 객체 전달 가능
411
- - **callback**: Axes 후처리 콜백 함수
412
-
413
- #### 캔버스 크기 조정 예제
414
-
415
- ```python
416
- # 고해상도 큰 차트
417
- hs_plot.scatterplot(
418
- df=df,
419
- xname='x',
420
- yname='y',
421
- width=1920,
422
- height=1080,
423
- dpi=300
424
- )
425
- ```
426
-
427
- #### 외부 Axes 사용 예제
428
-
429
- ```python
430
- import matplotlib.pyplot as plt
431
-
432
- fig, axes = plt.subplots(2, 2, figsize=(12, 10))
433
-
434
- hs_plot.boxplot(df=df, xname='cat', yname='val', ax=axes[0, 0])
435
- hs_plot.violinplot(df=df, xname='cat', yname='val', ax=axes[0, 1])
436
- hs_plot.histplot(df=df, xname='val', ax=axes[1, 0])
437
- hs_plot.kdeplot(df=df, xname='val', ax=axes[1, 1])
438
-
439
- plt.tight_layout()
440
- plt.show()
441
- ```
442
-
443
- #### 콜백 함수 사용 예제
444
-
445
- ```python
446
- def custom_style(ax):
447
- ax.set_title('사용자 정의 제목', fontsize=16, fontweight='bold')
448
- ax.set_xlabel('X축 레이블', fontsize=12)
449
- ax.set_ylabel('Y축 레이블', fontsize=12)
450
- ax.grid(True, alpha=0.3, linestyle='--')
451
-
452
- hs_plot.scatterplot(
453
- df=df,
454
- xname='x',
455
- yname='y',
456
- callback=custom_style
457
- )
458
- ```
459
-
460
- ---
461
-
462
- ### 3. 분석 모듈 (`hossam.hs_stats`)
463
-
464
- 데이터 분석을 위한 통계 기능들을 제공합니다.
465
-
466
- ```python
467
- from hossam import analysis as hs_analysis
468
-
469
- # 기술 통계 분석
470
- # 회귀 분석 헬퍼
471
- # 분류 성능 평가
472
- # 시계열 분석
473
- # 등등 (상세 문서 참조)
474
- ```
475
-
476
- ---
477
-
478
- ### 4. 전처리 모듈 (`hossam.hs_prep`)
479
-
480
- 데이터 전처리 및 정제를 위한 유틸리티입니다.
481
-
482
- ```python
483
- from hossam import prep as hs_prep
484
-
485
- # 결측치 처리
486
- # 이상치 탐지 및 제거
487
- # 스케일링 및 인코딩
488
- # 등등 (상세 문서 참조)
489
- ```
490
-
491
- ---
492
-
493
- ### 5. 유틸리티 모듈 (`hossam.hs_util`)
494
-
495
- 기타 편의 기능들을 제공합니다.
496
-
497
- ```python
498
- from hossam import util as hs_util
499
-
500
- # 다양한 헬퍼 함수들
501
- # 데이터 변환
502
- # 파일 I/O 지원
503
- # 등등 (상세 문서 참조)
504
- ```
505
-
506
- ---
507
-
508
- ## 📚 의존성
509
-
510
- Hossam은 다음 라이브러리들을 사용합니다:
511
-
512
- ### 핵심 의존성
513
- - **pandas**: 데이터 처리 및 분석
514
- - **numpy**: 수치 계산
515
- - **matplotlib**: 기본 시각화
516
- - **seaborn**: 통계 시각화
517
-
518
- ### 통계 및 머신러닝
519
- - **scipy**: 과학 계산 및 통계
520
- - **scikit-learn**: 머신러닝 알고리즘
521
- - **statsmodels**: 통계 모델링
522
- - **pingouin**: 통계 분석
523
-
524
- ### 기타
525
- - **tqdm**: 진행률 표시
526
- - **tabulate**: 표 형식 출력
527
- - **requests**: HTTP 요청
528
- - **openpyxl**, **xlrd**: Excel 파일 지원
529
- - **statannotations**: 통계 주석
530
- - **joblib**: 직렬화 및 병렬 처리
531
-
532
- 모든 의존성은 `pip install hossam` 시 자동으로 설치됩니다.
533
-
534
- ---
535
-
536
- ## 📖 문서
537
-
538
- - **라이브 사이트**: https://py.hossam.kr/
539
- - **API 레퍼런스(패키지)**: https://py.hossam.kr/api/hossam/
540
- - **워크플로우 가이드**: https://py.hossam.kr/guides/workflow/
541
- - **아키텍처 다이어그램**: https://py.hossam.kr/overview/architecture/
542
-
543
- ---
544
-
545
- ## 🎓 사용 사례
546
-
547
- ### 교육용
548
-
549
- ```python
550
- # 수업에서 빠르게 시각화 시연
551
- from hossam import load_data, plot as hs_plot
552
-
553
- df = load_data('SAMPLE_DATA')
554
- hs_plot.pairplot(df=df, hue='target', palette='Set1')
555
- ```
556
-
557
- ### 데이터 탐색
558
-
559
- ```python
560
- # 빠른 EDA (탐색적 데이터 분석)
561
- from hossam import hs_plot
562
-
563
- # 분포 확인
564
- hs_plot.distribution_by_class(
565
- data=df,
566
- hue='target',
567
- type='histkde'
568
- )
569
-
570
- # 상관관계 확인
571
- hs_plot.heatmap(data=df.corr(), palette='coolwarm')
572
-
573
- # 특징 관계 확인
574
- hs_plot.scatter_by_class(
575
- data=df,
576
- hue='target',
577
- outline=True
578
- )
579
- ```
580
-
581
- ### 모델 평가
582
-
583
- ```python
584
- from sklearn.linear_model import LinearRegression
585
- from hossam import hs_plot
586
-
587
- # 모델 학습
588
- model = LinearRegression()
589
- model.fit(X_train, y_train)
590
- y_pred = model.predict(X_test)
591
-
592
- # 잔차 분석
593
- hs_plot.residplot(y=y_test, y_pred=y_pred, lowess=True, mse=True)
594
-
595
- # 정규성 검증
596
- hs_plot.qqplot(y_pred=y_test - y_pred)
597
- ```
598
-
599
- ---
600
-
601
- ## 📝 라이선스
602
-
603
- 이 프로젝트는 MIT 라이선스 하에 배포됩니다.
604
-
605
- 자세한 내용은 [LICENSE](LICENSE) 파일을 참조하세요.
606
-
607
- ---
608
-
609
- ## 👨‍🏫 저자
610
-
611
- **이광호 (Lee Kwang-Ho)**
612
- - 아이티윌(ITWILL) 강사
613
- - 머신러닝 및 데이터 분석 교육 전문
614
- - Email: leekh4232@gmail.com
615
- - Blog: [https://blog.hossam.kr/](https://blog.hossam.kr/)
616
- - GitHub: [https://github.com/leekh4232](https://github.com/leekh4232)
617
- - Youtube: [https://www.youtube.com/@hossam-codingclub](https://www.youtube.com/@hossam-codingclub)
618
-
619
- ---
620
-
621
- ## 🙏 감사의 말
622
-
623
- 이 라이브러리는 아이티윌에서 진행되는 데이터 분석 교육을 위해 개발되었습니다.
624
-
625
- 수강생 여러분의 학습에 도움이 되기를 바랍니다.
626
-
627
- ---
628
-
629
- ## 📞 지원 및 문의
630
-
631
- - 이슈 리포트: [GitHub Issues](https://github.com/leekh4232/hossam-data/issues)
632
- - 이메일: leekh4232@gmail.com
633
-
634
- ---
635
-
636
- **Happy Data Analysis! 📊✨**
@@ -1,16 +0,0 @@
1
- hossam/NotoSansKR-Regular.ttf,sha256=0SCufUQwcVWrWTu75j4Lt_V2bgBJIBXl1p8iAJJYkVY,6185516
2
- hossam/__init__.py,sha256=hJTS1Yl85JqG0iBaVkQcYtguP5f-zO0_wT-ZAouQyzI,2613
3
- hossam/data_loader.py,sha256=UpC_gn-xUWij0s-MO51qrzJNz3b5-RCz1N6esQMZUJM,6320
4
- hossam/hs_classroom.py,sha256=b2vzxHapxibnJwcRwWvOfLfczjF-G3ZdT9hIUt4z4oU,27407
5
- hossam/hs_gis.py,sha256=9ER8gXG2Or0DZ1fpbJR84WsNVPcxu788FsNtR6LsEgo,11379
6
- hossam/hs_plot.py,sha256=7cngzrEeVeBvANyReI9kd3yHZGMOFZjvgBbBGA7rT2E,78467
7
- hossam/hs_prep.py,sha256=hTHNJvHMVBkV7xthV6igSz0QIKy-bTyVXHzQKblVfQw,36220
8
- hossam/hs_stats.py,sha256=nhfdZjo4NeyQ3_Pk-xTAN8OLNBDHH8nH9UDtvBNs5AU,112373
9
- hossam/hs_timeserise.py,sha256=loRofR-m2NMxHaDEWDhZjo6DwayEf4c7qkSoCErfBWY,42165
10
- hossam/hs_util.py,sha256=E4LnzPlRdWeqICv7TtTL9DT5PogqBhOuTgYiaav565U,7461
11
- hossam/leekh.png,sha256=1PB5NQ24SDoHA5KMiBBsWpSa3iniFcwFTuGwuOsTHfI,6395
12
- hossam-0.3.16.dist-info/licenses/LICENSE,sha256=nIqzhlcFY_2D6QtFsYjwU7BWkafo-rUJOQpDZ-DsauI,941
13
- hossam-0.3.16.dist-info/METADATA,sha256=5Yhqjz7S5BTs_OTGaC_l4YzbhQXL8mssrS73hjjCy5s,13116
14
- hossam-0.3.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- hossam-0.3.16.dist-info/top_level.txt,sha256=_-7bwjhthHplWhywEaHIJX2yL11CQCaLjCNSBlk6wiQ,7
16
- hossam-0.3.16.dist-info/RECORD,,