sdols (version 1.3)

latentStructureFit: Compute Fit Summaries for a Latent Structure Estimate

Description

This function computes various summaries of the fit of a clustering or feature allocation based on the expected pairwise allocation matrix.

Usage

latentStructureFit(estimate, expectedPairwiseAllocationMatrix)

Arguments

estimate

A clustering or feature allocation. If estimate is a length n vector, it is taken to be a clustering where items i and j are in the same cluster if and only if estimate[i] == estimate[j]. If estimate is a binary matrix of n rows and an arbitrary number of columns, it is taken to be a feature allocation where items i and j share m features if, for k = 1, 2, ..., the expression estimate[i,k] == estimate[j,k] == 1 is true exactly m times.

expectedPairwiseAllocationMatrix

A n-by-n symmetric matrix whose (i,j) elements gives the estimated expected number of times that items i and j are in the same subset (i.e., cluster or feature).

See Also

expectedPairwiseAllocationMatrix, salso

Examples

Run this code
# NOT RUN {
probabilities <- expectedPairwiseAllocationMatrix(iris.clusterings)
estimate <- salso(probabilities)
latentStructureFit(estimate, probabilities)

expectedCounts <- expectedPairwiseAllocationMatrix(USArrests.featureAllocations)
estimate <- salso(expectedCounts,"featureAllocation")
latentStructureFit(estimate, expectedCounts)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace