Skip to main content

Tools for Repetitive Data Analysis

Project description

TORDA

  • TOols for Repetitive Data Analysis
  • 분석 업무 진행 시, 반복해서 수행하게 되는 작업들을 모듈화 하기 위한 패키지입니다.

현재 존재하는 함수

visualization class

  • Parameters:
    • dataset : list of pandas series or numpy ndarray
      • pandas series, 혹은 numpy ndarray를 원소로 가지는 리스트를 할당.
  • 사용 예시:
from torda.visualization import distribution as vd
vd = vd(dataset=[np.random.randn(1000), np.random.randn(1000)+2])

plot_histogram_kde(names, title, height, width, kernel = 'gaussian', bandwidth = None, bins = 10, opacity = 0.75, colors = None, display_quantiles = {'n_list':False, 'line_dash':'dash'}, display_maxinum_peak_density = {'use':False, 'line_dash':'dot'}, display_mean = {'use':False, 'line_dash':'dot'})

  • Parameters:
    • names : list of string
      • dataset 리스트 내 각 데이터의 이름.
    • title : string
      • 플롯의 제목.
    • height : int
      • 플롯의 높이.
    • width : int
      • 플롯의 폭.
    • kernel : {'gaussian', 'epanechnikov'}, default = 'gaussian'
      • KDE 진행 시 어떤 kernel function을 사용할 지 선택.
    • bandwidth : float, default = None
      • KDE 진행 시 bandwidth를 수동으로 선택하고 싶을 경우 숫자를 할당
    • bins : int, default = 10
      • 히스토그램의 bin 숫자.
    • opacity : float, default = 0.75
      • 히스토그램의 투명도.
    • colors : list of string, default = None
      • 데이터별 색.
    • display_quantiles : dictionary, default = {'n_list':False, 'line_dash':'dash'}
      • n_list에 정수 리스트를 할당하면, 해당하는 백분위수를 horizontal line으로 출력한다.
      • line_dash에는 아래와 같은 문자열들이 할당될 수 있다.
        • ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
        • '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%'...
          • 선분의 형태를 조절할 수 있다.
    • display_maxinum_peak_density : dictionary, default = {'use':False, 'line_dash':'dot'}
      • True일 경우, KDE 결과에서 가장 밀도가 높은 peak를 점선으로 표시.
      • line_dash에는 아래와 같은 문자열들이 할당될 수 있다.
        • ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
        • '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%'...
          • 선분의 형태를 조절할 수 있다.
    • display_mean : dictionary, default = {'use':False, 'line_dash':'dot'}
      • True일 경우, 평균 값을 점선으로 표시.
      • line_dash에는 아래와 같은 문자열들이 할당될 수 있다.
        • ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']
        • '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%'...
          • 선분의 형태를 조절할 수 있다.

plot_box(names, title, height, width, colors = None)

  • Parameters:
    • names : list of string
      • dataset 리스트 내 각 데이터의 이름.
    • title : string
      • 플롯의 제목.
    • height : int
      • 플롯의 높이.
    • width : int
      • 플롯의 폭.
    • colors : list of string, default = None
      • 데이터별 색.

사용 예시

import pandas as pd
import numpy as np
from torda.visualization import distribution as vd

vd = vd(dataset=[np.random.randn(1000), np.random.randn(1000)+2])
vd.plot_histogram_kde(
    names=['Sample A', 'Sample B']
  , title='test_title'
  , height=600, width=1200, bins=60, opacity=0.5
  , display_quantiles={'n_list':[50], 'line_dash':'dash'}
  , display_maxinum_peak_density={'use':True, 'line_dash':'solid'}
  , display_mean={'use':True, 'line_dash':'5px 10px 2px 2px'}
  , kernel = 'gaussian'
)
vd.plot_box(
    names=['Sample A', 'Sample B']
  , title='test_title'
  , height=600, width=1200
)

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

torda-0.1.6.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

torda-0.1.6.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file torda-0.1.6.2.tar.gz.

File metadata

  • Download URL: torda-0.1.6.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for torda-0.1.6.2.tar.gz
Algorithm Hash digest
SHA256 8d43bf29db5fd1cb31d5d02b6311999e36fdac5cbf4a61652b6ee05180b5de9c
MD5 3a0eca7f84b7c1baadb2bafb605aca20
BLAKE2b-256 b95c76acfe911998dfe5968170143cfe5eb51b6c4f9f472583beb9cb25e34a7e

See more details on using hashes here.

File details

Details for the file torda-0.1.6.2-py3-none-any.whl.

File metadata

  • Download URL: torda-0.1.6.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for torda-0.1.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bdaa067a8fc6ebd8ba479d9c63bbecc1b04784370d231e9e3362380445892e26
MD5 0e8beafdbb2c1ce7abdc5d7e590d3715
BLAKE2b-256 568b97cd4117baa90ef9939f9958f02a3b19f8cd69b83cef8068dcf85d2c377b

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