binary_between_scatter: Calculate Binary Between-Class Scatter Matrix

View source: R/scatter.R

binary_between_scatterR Documentation

Calculate Binary Between-Class Scatter Matrix

Description

For two distinct groups within a dataset, this computes:

S_b = n_1 (m_1 - m)(m_1 - m)^T + n_2 (m_2 - m)(m_2 - m)^T

where \(m_1\) and \(m_2\) are the class means and \(m\) is the mean of both groups combined.

Usage

binary_between_scatter(X, id1, id2)

Arguments

X

A numeric matrix (n x d).

id1

A vector of indices for the first group.

id2

A vector of indices for the second group.

Value

A numeric (d x d) between-class scatter matrix for the two groups.


bbuchsbaum/discursive documentation built on April 14, 2025, 4:57 p.m.