Coder Social home page Coder Social logo

Comments (4)

dimalvovs avatar dimalvovs commented on September 23, 2024

related #78

from cogaps.

dimalvovs avatar dimalvovs commented on September 23, 2024

confirmed warning in threshold = "cut"

test_that("patternMarkers work with threshold = 'cut' yields no warning", {
    #set up
    data(GIST)
    res <- CoGAPS(GIST.data_frame, nIterations=1000,
                  seed=1, messages=FALSE)

    test <- patternMarkers(res, threshold = "cut")
    expect_no_warning(length(test$PatternMarkers), 0)
})

from cogaps.

dimalvovs avatar dimalvovs commented on September 23, 2024

confirmed empty markers with threshold = 'all'

test_that("patternMarkers work with threshold = 'all' for general mode", {
    #set up
    data(GIST)
    res <- CoGAPS(GIST.data_frame, nIterations=1000,
                  seed=1, messages=FALSE)

    test <- patternMarkers(res, threshold = "all")
    marker_lengths <- sapply(test$PatternMarkers, length)
    expect_equal(sum(marker_lengths > 0), length(marker_lengths))
})

from cogaps.

dimalvovs avatar dimalvovs commented on September 23, 2024

the problem with warnings generated in case of threshold='cut' comes from the non-matching dimensions of As and Ps during the scaling and sweeping . For the testdata trained on nPatterns=7, the dimensions of A and P that are fed into here

As <- sweep(As, 2, pscale, FUN="*")
are:

[1] 1363    7
[1] 9 7

from cogaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.