maps-visualizer
DWARF 모델이 생성한 규칙 파일(.py)을 받아
규칙 정렬 → 라벨 인코딩 변환 → HTML 트리 시각화 까지
세 단계를 자동으로 처리하는 패키지입니다.
설치
pip install maps-visualizer
빠른 시작
from maps_visualizer import DwarfVisualizer
column_dict = {
"island": "Categorical",
"bill_length_mm": "Numerical",
"bill_depth_mm": "Numerical",
"flipper_length_mm": "Numerical",
"body_mass_g": "Numerical",
"sex": "Categorical",
"year": "Numerical",
"Decision": "Decision",
}
viz = DwarfVisualizer(
data_path = "./data/penguins/5_fold/penguins_fold_1_train.csv",
rule_path = "./outputs/rules/penguins_C4.5_1_99.63.py",
column_dict = column_dict,
html_out = "penguins_output.html",
)
viz.run() # 전체 파이프라인 한 번에 실행
단계별 실행
viz.sort_rules() # 1단계: Less_/Greater_ 구간 오름차순 정렬
viz.transform_rules() # 2단계: 데이터 전처리 + 라벨 인코딩 + 규칙 치환
viz.visualize() # 3단계: HTML 트리 시각화 생성
메서드 체이닝도 가능합니다:
viz.sort_rules().transform_rules().visualize()
파라미터
| 파라미터 | 필수 | 설명 |
|---|---|---|
data_path |
✅ | 시각화에 사용할 CSV 경로 |
rule_path |
✅ | DWARF 생성 규칙 .py 파일 경로 |
column_dict |
✅ | 컬럼 타입 딕셔너리 (Categorical / Numerical / Decision) |
html_out |
❌ | 출력 HTML 파일명 (기본값: <rule_name>_output.html) |
sorted_rule_path |
❌ | 정렬된 규칙 임시 파일 경로 (기본값: order_rule.py) |
viz_rule_path |
❌ | 변환된 규칙 임시 파일 경로 (기본값: order_rule_viz.py) |
viz_csv_path |
❌ | 시각화용 CSV 임시 경로 |
출력물
<html_out>— 브라우저에서 바로 열 수 있는 인터랙티브 트리 HTMLorder_rule.py— 정렬된 규칙 파일 (중간 산출물)order_rule_viz.py— 인코딩 변환된 규칙 파일 (중간 산출물)<rule_name>_viz.csv— 시각화용 전처리 CSV (중간 산출물)
의존성
pandas >= 1.5numpy >= 1.23scikit-learn >= 1.1supertree >= 0.3
Metadata
Release files for maps-visualizer 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| maps_visualizer-0.1.0.tar.gz | 9.7 kB | Without provenance | Details for maps_visualizer-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| maps_visualizer-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for maps_visualizer-0.1.0-py3-none-any.whl |
Total release size: 19.7 kB
Release files / maps_visualizer-0.1.0.tar.gz
| Download URL | maps_visualizer-0.1.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00034620545889d6417cbfa0a4c30e06fdd54e96f8b5b8af1c6966b5cbea8a11
|
|
BLAKE2b-256 checksum How to use checksums |
e9fb277afcf93c150cf79032e1cda785bc10658f13ab9d24406b309aa7fd5ebf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / maps_visualizer-0.1.0-py3-none-any.whl
| Download URL | maps_visualizer-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c036d40b7b34f60843f04eae1e808dab81cf0bdeb0755736461a1df7b401ae11
|
|
BLAKE2b-256 checksum How to use checksums |
2123a5cae7f23434e7794cc784040884a46b4e4adfa06c24c934b1b4a86e6aae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for maps-visualizer 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.