Skip to main content

An ecosystem for data analysis

Project description

  • Đây là công cụ giúp so sánh phân bố giữa 2 dataset theo từng biến riêng rẽ. Tất cả các hình vẽ ssau đó sẽ được lưu lại trong directory mặc định là 'your_current_working_directory/data1_data2/picture/'

Ví dụ

from ngocbien_analysis import DistributionPlot
plot = DistributionPlot(data1, data2).plot2data()

Với câu lệnh trên, tất cả các biến sẽ đc so sánh, visualize và lưu vào directory như trên.

from ngocbien_analysis import DistributionPlot
DistributionPlot(data1, data2, nmax=9, label=['data1', 'data2'], is_save=True).plot2data()

Ta có một số key paramater như sau:

  • nmax : Số hình vẽ tối đa trong 1 khung hình, ở đây 9 tức ta sẽ có 3x3 hình trong 1 pictures. Nếu bạn có quá nhiều biến bạn có thể chọn là 16, hay chọn là 3 trong trường hợp ngược lại.
  • is_save : Mặc định là True để lưu hình vẽ vào folder trên.
  • label: mặc định là data1 và data2, bạn có thể thay đổi để phù hợp, ví dụ good, bad, các label này được dùng làm legend trong hình vẽ và tạo ra tên folder chứa các hình vẽ đó.
  • Ngoài ra, ta có thể chỉnh độ sáng, màu sắc, và nhiều lựa chọn khác cho các hình vẽ này bằng cách chỉnh các tham số dưới đây.
class DistributionPlot:
    def __init__(self, data1, data2=None, is_save=True,  **kwargs):
        self.data1 = data1
        self.data2 = data2
        self.nmax = 9
        self.label = ['data1', 'data2']
        self.num_types = ['float32', 'float64', 'int16', 'int32', 'int64', 'bool', 'int8']
        self.is_save = is_save
        self.alpha = [.6, .4]
        self.width = .9
        self.wspace = .15
        self.hspace = .25
        self.disable_xticks = False
        self.disable_yticks = True
  • Như vậy ta có thể thay đổi các tham số mặc định, ví dụ như:
from ngocbien_analysis import DistributionPlot
plot = DistributionPlot(data1=data1, data2=data2)
plot.label = ['good', 'bad']
plot.nmax = 4
plot.plot2data()

Các dự định tiếp theo:

  • Visualize đơn biến cho 1 dataset.
  • Xây dựng 1 hàm để lựa chọn ra top các features có phân bố khác biệt nhất giữa 2 tập data set. Việc này giúp quá trình phân tích tốt hơn trong trường hợp có quá nhiều features.
  • Xây dựng một số các công cụ phân tích đa biến. Công cụ này có thể tích hợp công hợp công cụ test để chỉ lọc ra các phân tích giá trị để visualize, giúp các phân tích có chất lượng tốt hơn.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ngocbien_analysis-0.3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file ngocbien_analysis-0.3-py3-none-any.whl.

File metadata

  • Download URL: ngocbien_analysis-0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

File hashes

Hashes for ngocbien_analysis-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 947c2159b607c8adb6e770a961d82e04ef80f4aae71883fb6cad8a4445ca3082
MD5 a28ad8964b1af2923429dfcc6d538453
BLAKE2b-256 734b95fba7ad837079b636b044161a0aaa3a266b8005037adb4688251f23867b

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