Skip to main content

DWARF 모델 규칙 파일을 HTML 트리로 시각화하는 패키지

Project description

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> — 브라우저에서 바로 열 수 있는 인터랙티브 트리 HTML
  • order_rule.py — 정렬된 규칙 파일 (중간 산출물)
  • order_rule_viz.py — 인코딩 변환된 규칙 파일 (중간 산출물)
  • <rule_name>_viz.csv — 시각화용 전처리 CSV (중간 산출물)

의존성

  • pandas >= 1.5
  • numpy >= 1.23
  • scikit-learn >= 1.1
  • supertree >= 0.3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maps_visualizer-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maps_visualizer-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file maps_visualizer-0.1.0.tar.gz.

File metadata

  • Download URL: maps_visualizer-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for maps_visualizer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 00034620545889d6417cbfa0a4c30e06fdd54e96f8b5b8af1c6966b5cbea8a11
MD5 63e01a53526e759db045b02e62ffdba0
BLAKE2b-256 e9fb277afcf93c150cf79032e1cda785bc10658f13ab9d24406b309aa7fd5ebf

See more details on using hashes here.

File details

Details for the file maps_visualizer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for maps_visualizer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c036d40b7b34f60843f04eae1e808dab81cf0bdeb0755736461a1df7b401ae11
MD5 f71cce6d791947c2be8cf77f14d4d42c
BLAKE2b-256 2123a5cae7f23434e7794cc784040884a46b4e4adfa06c24c934b1b4a86e6aae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page