Skip to main content

arekore

記述統計のためのクラスや可視化のあれこれ。ダミーデータも作れるよ。

Quickstart

1次元データ

import matplotlib.pyplot as plt
import numpy as np
from arekore import dummy, viz
from arekore.data1d import Data1d, plot_hist


def main():
    # ダミーデータ生成
    rawdata = dummy.dist_normal_1d(mean=50, std=10, n=100)

    # 1次元データオブジェクトの作成
    d = Data1d(rawdata, bins=np.arange(0, 100 + 1, 5))

    # ヒストグラムの描画
    fig, ax = viz.fig_ax(figsize=(8, 6))
    plot_hist(ax, d)
    plt.show()

    # 度数分布表もつくれる
    freq_table_md = d.freq_table_as_md()

    print(freq_table_md)
    """| 階級           |   階級値 |   度数 |   累積度数 |   相対度数 |   累積相対度数 |
|:---------------|---------:|-------:|-----------:|-----------:|---------------:|
| (-0.001, 10.0] |        5 |      0 |          0 |       0    |           0    |
| (10.0, 20.0]   |       15 |      0 |          0 |       0    |           0    |
| (20.0, 30.0]   |       25 |      1 |          1 |       0.01 |           0.01 |
| (30.0, 40.0]   |       35 |     14 |         15 |       0.14 |           0.15 |
| (40.0, 50.0]   |       45 |     30 |         45 |       0.3  |           0.45 |
| (50.0, 60.0]   |       55 |     37 |         82 |       0.37 |           0.82 |
| (60.0, 70.0]   |       65 |     16 |         98 |       0.16 |           0.98 |
| (70.0, 80.0]   |       75 |      2 |        100 |       0.02 |           1    |
| (80.0, 90.0]   |       85 |      0 |        100 |       0    |           1    |
| (90.0, 100.0]  |       95 |      0 |        100 |       0    |           1    |
"""


if __name__ == '__main__':
    main()

data1d_histogram

2次元データ

import matplotlib.pyplot as plt

from arekore import dummy, viz
from arekore.data2d import Data2d, plot_regression_line, plot_scatter


def main():
    # ダミーデータ生成
    x, y = dummy.xy_specified_cor(r=0.8, n=50)

    # 2次元データオブジェクトの作成
    d = Data2d(x=x, y=y)

    # 散布図と回帰直線を描画
    fig, ax = viz.fig_ax(figsize=(8, 6))
    plot_scatter(ax, d)
    plot_regression_line(ax, d)

    plt.show()


if __name__ == '__main__':
    main()

data2d_scatter_and_regresson_line

Metadata

Release files for arekore 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arekore 0.2.0
File Size Uploaded Provenance
arekore-0.2.0.tar.gz 6.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for arekore 0.2.0
File Interpreter ABI Platform
arekore-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.4 kB

Release files / arekore-0.2.0.tar.gz

Download URL arekore-0.2.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0f10409a797a9772eb8d0630a9519e983500394f4ca813ed51324998a62468b0
BLAKE2b-256 checksum
How to use checksums
a6a9a618835c64b82650bbab6251be305f3af9c69c942a8e3c065262c2b0a4d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.13 Darwin/21.6.0

Release files / arekore-0.2.0-py3-none-any.whl

Download URL arekore-0.2.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b74928f6a57c63337892a72d5f1aaaf96bd37e4c464bc464f2445c96bd008bc
BLAKE2b-256 checksum
How to use checksums
34547e96dc96fb72292f84700b80e05b080afa352182efaa5cfa21e9539ed103
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.13 Darwin/21.6.0

Security for arekore 0.2.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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page