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/SNUFML/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.tar.gz (971.2 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-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lmsstat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fba9abf941d7c9f510df136533ae687ddcbf4e7e02f1205484417bae712f3ac5
MD5 8286b4db2222685aa95022fad2f309f1
BLAKE2b-256 c179dabb9f186198a52c04553ca366e513dd1b6e608e3039a8b4d603462c2d2c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for lmsstat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 088137af428eca63e94842c12c4c39dcc9f005f472ee4a106d0819519a7f5780
MD5 91ef44970e6f33322f326c473be64460
BLAKE2b-256 5ad2795cfc8b8459d624311d47b95f974ab399e630e911e013a1294996f9af82

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