Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document group-wise tests on non-grouped rotations #60

Open
snotskie opened this issue Jan 31, 2024 · 0 comments
Open

document group-wise tests on non-grouped rotations #60

snotskie opened this issue Jan 31, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@snotskie
Copy link
Owner

snotskie commented Jan 31, 2024

Add an example page, like cross validation, to document how to perform group-wise tests on non-grouped rotations, like SVD, as well as say in a sentence why these tests are not automatically run (because the rotation does not know what to group by)

This can be based on how it's done in AbstractGroupDifference already

import HypothesisTests: KruskalWallisTest, VarianceEqualityTest
import EpistemicNetworkAnalysis: GroupwiseCoregistrationTest, test!
function addGroupedTests!(model, groupVar)

    # Parameters used by EpistemicNetworkAnalysis.jl to determine which version of test! to run
    M = typeof(model)
    trainmodel = model
    testmodel = model
    tests = [GroupwiseCoregistrationTest, KruskalWallisTest, VarianceEqualityTest]

    # Find group labels
    groups = sort(unique(trainmodel.metadata[!, groupVar]))

    # Run tests on each axis
    for i in 1:nrow(testmodel.embedding)
        for test in tests
            test!(M, trainmodel, testmodel, test, dim=i, groupVar=groupVar, groups=groups)
        end
    end
end
@snotskie snotskie added the documentation Improvements or additions to documentation label Jan 31, 2024
@snotskie snotskie added this to the 0.8.0 milestone Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant