Skip to main content

A library providing frequently used functions in data analysis for YESlab members and other researchers

Project description

yescarpenter

This library provides some frequent used functions for YESlab members and other researchers, including data processing and analyses

Installation

From PyPI

Once the package is uploaded to PyPI, users can install it using pip:

pip install yescarpenter

Functions

perform_pca

This function leverages scikit-learn along with other popular data science libraries.

Usage:

import pandas as pd
from yescarpenter import perform_pca

# Create a sample DataFrame
data = pd.DataFrame({
    'feature1': [1, 2, 3, 4],
    'feature2': [2, 3, 4, 5],
    'feature3': [3, 4, 5, 6]
})

# Perform PCA with 2 components
loadings, explained_variance, components = perform_pca(data, n_components=2)

print("Loadings:\n", loadings)
print("Explained Variance:\n", explained_variance)
print("Components:\n", components)

construct_RDM

For IS-RSA. Construct the Representational Dissimilarity Matrix(RDM) from the data.

Usage:

construct_RDM(data, n_target, method = "cityblock")

do_rsa

Calculate the Spearman correlation between two RDMs(lower triangle) and do permutation

Usage:

do_RSA(rdm1, rdm2, n_perm=1000)

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

yescarpenter-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

yescarpenter-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file yescarpenter-0.1.1.tar.gz.

File metadata

  • Download URL: yescarpenter-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for yescarpenter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 966092339d430d3d3ad732409bb7e94f81dc9ebf2fe44fe35b12affccc4a4e62
MD5 3d31b2e106ea508d48688b535b536ccf
BLAKE2b-256 3966712610c3213a8b862aa7b6f7b3b152dbba807842aa9f319b232f503fd3f2

See more details on using hashes here.

File details

Details for the file yescarpenter-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: yescarpenter-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for yescarpenter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e42bcd552ea589591a0d4e7fbb96426f053c1b9828cd9efda0f663a7e4b5676b
MD5 01c4fa43778d94cebd5cd27c805bfa92
BLAKE2b-256 d83b009895a19a545cceb062240617c5837cf01fd946b7e7ff28e9b3ddc548de

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