Package 'plskit'

Title: PLS Regression with Modern Inference
Description: PLS regression with modern inference: the 'split_exact' and 'split_nb' confirmatory tests and rotation-invariant subsampling confidence intervals. R wrapper around the Rust 'plskit' engine via 'extendr'.
Authors: Paweł Lenartowicz [aut, cre]
Maintainer: PaweÅ‚ Lenartowicz <[email protected]>
License: GPL (>= 3)
Version: 0.7.0
Built: 2026-10-11 20:32:47 UTC
Source: https://github.com/pawlenartowicz/plskit

Help Index


Confirmatory test of a PLS1 signal

Description

R binding of pls1_confirmatory_test. Arguments, defaults and result fields are documented once, in the canonical reference: section "3.1 Confirmatory omnibus test" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls1_confirmatory_test(
  X,
  y,
  k = 1L,
  test_method = "auto",
  args = NULL,
  ci = FALSE,
  n_boot = NULL,
  m_rate = NULL,
  level = NULL,
  max_failure_rate = NULL,
  pre_standardized = FALSE,
  seed = NULL,
  verbose = FALSE,
  weights = NULL,
  max_skip_rate = NULL
)

Arguments

X, y, k, test_method, args, ci, n_boot, m_rate, level, max_failure_rate, pre_standardized, seed, verbose, weights, max_skip_rate

See the canonical reference.

Value

A list of class c("confirmatory_test_result", "plskit_result").


Choose k for PLS1 by cross-validation or BIC

Description

R binding of pls1_find_k_optimal. Arguments, defaults and result fields are documented once, in the canonical reference: section "2.3 K-selection" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls1_find_k_optimal(
  X,
  y,
  k_max,
  selector = "r2_se",
  diagnostic = NULL,
  args = NULL,
  pre_standardized = FALSE,
  seed = NULL,
  verbose = FALSE,
  weights = NULL
)

Arguments

X, y, k_max, selector, diagnostic, args, pre_standardized, seed, verbose, weights

See the canonical reference.

Value

A list of class c("find_k_optimal_result", "plskit_result").


Choose k for PLS1 by sequential testing

Description

R binding of pls1_find_k_sequence. Arguments, defaults and result fields are documented once, in the canonical reference: section "2.3 K-selection" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls1_find_k_sequence(
  X,
  y,
  k_max,
  test_method = "auto",
  alpha = NULL,
  args = NULL,
  pre_standardized = FALSE,
  seed = NULL,
  verbose = FALSE,
  weights = NULL
)

Arguments

X, y, k_max, test_method, alpha, args, pre_standardized, seed, verbose, weights

See the canonical reference.

Value

A list of class c("find_k_sequence_result", "plskit_result").


Fit a PLS1 model

Description

R binding of pls1_fit. Arguments, defaults and result fields are documented once, in the canonical reference: section "2.1 Fit" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls1_fit(
  X,
  y,
  k = 1L,
  k_max = NULL,
  find_k_args = NULL,
  pre_standardized = FALSE,
  seed = NULL,
  weights = NULL
)

Arguments

X, y, k, k_max, find_k_args, pre_standardized, seed, weights

See the canonical reference.

Value

A list of class c("pls1_result", "plskit_result").


Dual coefficients of PLS1 fits from a Gram matrix

Description

R binding of pls1_perm_alpha. Arguments, defaults and result fields are documented once, in the canonical reference: section "3.5 Dual coefficients from a Gram matrix" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls1_perm_alpha(gram, Y, k = 1L, n_features)

Arguments

gram, Y, k, n_features

See the canonical reference.

Value

A list of class c("perm_alpha_result", "plskit_result").


Permutation null of PLS1 coefficients

Description

R binding of pls1_perm_null. Arguments, defaults and result fields are documented once, in the canonical reference: section "3.3 Permutation-null engine" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls1_perm_null(
  X,
  y,
  k,
  n_perm = NULL,
  return_perm_matrix = FALSE,
  pre_standardized = FALSE,
  seed = NULL,
  verbose = FALSE,
  weights = NULL
)

Arguments

X, y, k, n_perm, return_perm_matrix, pre_standardized, seed, verbose, weights

See the canonical reference.

Value

A list of class c("perm_null_result", "plskit_result").


Predict from a fitted PLS1 model

Description

R binding of pls1_predict. Arguments, defaults and result fields are documented once, in the canonical reference: section "2.2 Predict" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls1_predict(model, X_new)

Arguments

model, X_new

See the canonical reference.

Value

A numeric vector.


Rotation-stability diagnostic for PLS1

Description

R binding of pls1_rotation_stability. Arguments, defaults and result fields are documented once, in the canonical reference: section "4.2 Rotation-stability diagnostic" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls1_rotation_stability(
  X,
  y,
  k,
  rotation_method = "varimax",
  rotation_args = NULL,
  L = NULL,
  n_boot = NULL,
  m_rate = NULL,
  level = NULL,
  pre_standardized = FALSE,
  seed = NULL,
  verbose = FALSE,
  weights = NULL,
  max_skip_rate = NULL
)

Arguments

X, y, k, rotation_method, rotation_args, L, n_boot, m_rate, level, pre_standardized, seed, verbose, weights, max_skip_rate

See the canonical reference.

Value

A list of class c("rotation_stability_result", "plskit_result").


Confirmatory test of a PLS3 signal

Description

R binding of pls3_confirmatory_test. Arguments, defaults and result fields are documented once, in the canonical reference: section "3.4 Confirmatory PLS3 omnibus test" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls3_confirmatory_test(
  X,
  Y,
  k = 1L,
  test_method = "auto",
  args = NULL,
  pre_standardized_X = FALSE,
  pre_standardized_Y = FALSE,
  seed = NULL,
  verbose = FALSE
)

Arguments

X, Y, k, test_method, args, pre_standardized_X, pre_standardized_Y, seed, verbose

See the canonical reference.

Value

A list of class c("confirmatory_test_result", "plskit_result").


Fit a PLS3 (PLS-SVD) model

Description

R binding of pls3_fit. Arguments, defaults and result fields are documented once, in the canonical reference: section "2c.1 Fit" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls3_fit(
  X,
  Y,
  k = 1L,
  pre_standardized_X = FALSE,
  pre_standardized_Y = FALSE,
  weights = NULL
)

Arguments

X, Y, k, pre_standardized_X, pre_standardized_Y, weights

See the canonical reference.

Value

A list of class c("pls3_result", "plskit_result").


Project new data onto a fitted PLS3 model

Description

R binding of pls3_transform. Arguments, defaults and result fields are documented once, in the canonical reference: section "2c.2 Transform" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

pls3_transform(model, X_new = NULL, Y_new = NULL, which = "both")

Arguments

model, X_new, Y_new, which

See the canonical reference.

Value

A list of class c("pls3_scores", "plskit_result").


Fit a PLS-SVD model (alias of pls3_fit)

Description

R binding of plssvd_fit. Arguments, defaults and result fields are documented once, in the canonical reference: section "2c.1 Fit" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

plssvd_fit(
  X,
  Y,
  k = 1L,
  pre_standardized_X = FALSE,
  pre_standardized_Y = FALSE,
  weights = NULL
)

Arguments

X, Y, k, pre_standardized_X, pre_standardized_Y, weights

See the canonical reference.

Value

A list of class c("pls3_result", "plskit_result").


Project new data onto a fitted PLS-SVD model

Description

R binding of plssvd_transform. Arguments, defaults and result fields are documented once, in the canonical reference: section "2c.2 Transform" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

plssvd_transform(model, X_new = NULL, Y_new = NULL, which = "both")

Arguments

model, X_new, Y_new, which

See the canonical reference.

Value

A list of class c("pls3_scores", "plskit_result").


Standardize X and Y

Description

R binding of preprocess. Arguments, defaults and result fields are documented once, in the canonical reference: section "1. Preprocessing" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

preprocess(X = NULL, Y = NULL, weights = NULL)

Arguments

X, Y, weights

See the canonical reference.

Value

A list of class c("preprocess_result", "plskit_result").


Rotate PLS1 weights or a fitted PLS1 model

Description

R binding of rotate. Arguments, defaults and result fields are documented once, in the canonical reference: section "4.1 Rotation" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

rotate(model_or_W, method = "varimax", L = NULL, args = NULL)

Arguments

model_or_W, method, L, args

See the canonical reference.

Value

A list of class c("rotate_result", "plskit_result"), or c("pls1_result", "plskit_result"), depending on the input.


Query the split_nb auto-gate

Description

R binding of split_nb_gate. Arguments, defaults and result fields are documented once, in the canonical reference: section "3.2 Auto-gate query" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

split_nb_gate(X, weights = NULL)

Arguments

X, weights

See the canonical reference.

Value

A list of class c("split_nb_gate_result", "plskit_result").


Choose k for sPLS1 by cross-validation or BIC

Description

R binding of spls1_find_k_optimal. Arguments, defaults and result fields are documented once, in the canonical reference: section "2b.3 K-selection at fixed keep" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

spls1_find_k_optimal(
  X,
  y,
  k_max,
  keep,
  selector = "r2_se",
  diagnostic = NULL,
  args = NULL,
  pre_standardized = FALSE,
  seed = NULL,
  verbose = FALSE,
  weights = NULL
)

Arguments

X, y, k_max, keep, selector, diagnostic, args, pre_standardized, seed, verbose, weights

See the canonical reference.

Value

A list of class c("find_k_optimal_result", "plskit_result").


Choose k for sPLS1 by sequential testing

Description

R binding of spls1_find_k_sequence. Arguments, defaults and result fields are documented once, in the canonical reference: section "2b.3 K-selection at fixed keep" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

spls1_find_k_sequence(
  X,
  y,
  k_max,
  keep,
  test_method = "auto",
  alpha = NULL,
  args = NULL,
  pre_standardized = FALSE,
  seed = NULL,
  verbose = FALSE,
  weights = NULL
)

Arguments

X, y, k_max, keep, test_method, alpha, args, pre_standardized, seed, verbose, weights

See the canonical reference.

Value

A list of class c("find_k_sequence_result", "plskit_result").


Choose the sPLS1 keep-count by cross-validation

Description

R binding of spls1_find_keep_optimal. Arguments, defaults and result fields are documented once, in the canonical reference: section "2b.2 Keep-count tuning" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

spls1_find_keep_optimal(
  X,
  y,
  k,
  args = NULL,
  seed = NULL,
  verbose = FALSE,
  weights = NULL
)

Arguments

X, y, k, args, seed, verbose, weights

See the canonical reference.

Value

A list of class c("find_keep_optimal_result", "plskit_result").


Fit a sparse PLS1 model

Description

R binding of spls1_fit. Arguments, defaults and result fields are documented once, in the canonical reference: section "2b.1 Sparse fit" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

spls1_fit(X, y, k, keep, pre_standardized = FALSE, weights = NULL)

Arguments

X, y, k, keep, pre_standardized, weights

See the canonical reference.

Value

A list of class c("pls1_result", "plskit_result").


Fit a sparse PLS3 model

Description

R binding of spls3_fit. Arguments, defaults and result fields are documented once, in the canonical reference: section "2c.3 Sparse fit" of https://github.com/pawlenartowicz/plskit/blob/main/_docs/python/api.md.

Usage

spls3_fit(
  X,
  Y,
  k,
  keep_X,
  keep_Y,
  pre_standardized_X = FALSE,
  pre_standardized_Y = FALSE,
  max_iter = NULL,
  tol = NULL,
  weights = NULL
)

Arguments

X, Y, k, keep_X, keep_Y, pre_standardized_X, pre_standardized_Y, max_iter, tol, weights

See the canonical reference.

Value

A list of class c("pls3_result", "plskit_result").