Skip to main content

LMSstat: Automation of statistical tests with an identical data input

Project description

LMSstat_python: Python implementation of LMSstat (https://github.com/daehwankim12/LMSstat)

Installation

pip install lmsstat

Usage

t-test, u-test, ANOVA, and Kruskal-Wallis test

from lmsstat import stat
import pandas as pd

data = pd.read_csv("data.csv")
result = stat.allstats(data)
# result = stat.allstats(data, p_adj=False) # When you don't want to adjust p-value

result.to_csv('result.csv', index=False)  # Save the result as a csv file

Normality test

보정되지 않은 결과이므로 주의.

from lmsstat import stat
import pandas as pd

path = "data.csv"
data = pd.read_csv(path)

result = stat.norm_test(data)
result

Data Standardization

import pandas as pd
from lmsstat import stat

path = "data.csv"
data = pd.read_csv(path)
scaled_data = stat.scaling(data)
scaled_data.to_csv("scaled_data.csv")

scaled_data

PCA

from lmsstat import plot
import pandas as pd

data = pd.read_csv("data.csv")

pca_plt = plot.plot_pca(data)
pca_plt[0].show()
print(f"R2: {pca_plt[1]}, Q2: {pca_plt[2]}")  # R2, Q2

PLS-DA

from lmsstat import plot
import pandas as pd

data = pd.read_csv("data.csv")

plsda_plt = plot.plot_plsda(data)
plsda_plt[0].show()
print(f"R2X: {plsda_plt[1]}, R2Y: {plsda_plt[2]}, Q2: {plsda_plt[3]}")  # R2, Q2

Box plot, Bar plot

각각 현재 작업 디렉토리 밑에 만들어진 boxplot, barplot 폴더에 자동으로 저장됨.

from lmsstat import plot, stat
import pandas as pd

data = pd.read_csv("data.csv")

stats_res = stat.allstats(data)

plot.plot_box(data, stats_res, test_type="t-test")
plot.plot_bar(data, stats_res, test_type="t-test")

Heatmap

from lmsstat import plot
import pandas as pd

data = pd.read_csv("data.csv")

plot.plot_heatmap(data)

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

lmsstat-0.1.0.dev3.tar.gz (971.6 kB view details)

Uploaded Source

Built Distribution

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

lmsstat-0.1.0.dev3-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file lmsstat-0.1.0.dev3.tar.gz.

File metadata

  • Download URL: lmsstat-0.1.0.dev3.tar.gz
  • Upload date:
  • Size: 971.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for lmsstat-0.1.0.dev3.tar.gz
Algorithm Hash digest
SHA256 7e34b3ef0be5a617908235c7aca5aa788364d706543596b173233346ecc1d346
MD5 fff49c78678f7f46801e729eb18df512
BLAKE2b-256 57c6edc32386d4235a4730219911f79a4c361599fc12bf647c4e9f266b9c03a3

See more details on using hashes here.

File details

Details for the file lmsstat-0.1.0.dev3-py3-none-any.whl.

File metadata

  • Download URL: lmsstat-0.1.0.dev3-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for lmsstat-0.1.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 e96a76fc64dacc823265968be28e532ed1652d2903590a46b2ccc3faae141cc8
MD5 ab3da2e6d89980c0b909fb261ffb70c8
BLAKE2b-256 d18215ce17d0f4096b373a2b76cf2c16fbfe54d91b4d297ba48345d20501c28c

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