Skip to content

Constant input warning in partial correlation reconstructor #201

Open

Description

@sdmccabe

From the tests:

tests/test_reconstruction.py::test_graph_size
tests/test_reconstruction.py::test_partial_correlation
  /home/main/.pyenv/versions/miniconda3-latest/lib/python3.6/site-packages/scipy/stats/stats.py:3399: PearsonRConstantInputWarning: An input array is constant; the correlation coefficent is not defined.
    warnings.warn(PearsonRConstantInputWarning())

Don't recall seeing this before, maybe a new warning in scipy? Plausible that the warning is nothing, but should explore further.

Activity

  1. sdmccabe commented on May 22, 2019

    @sdmccabe
    CollaboratorAuthor

    I didn't get this warning in an IPython session.

    G = nx.ring_of_cliques(4, 16)
    TS = netrd.dynamics.SherringtonKirkpatrickIsing().simulate(G, 1000)
    H = netrd.reconstruction.PartialCorrelationMatrix().fit(TS)
    
  2. added this to the 1.0 milestone on Oct 29, 2019
  3. admercs commented on Nov 26, 2019

    @admercs

    This simply occurs when one of the input arrays contains constant values:

    pearsonr([0,1,2,3], [0,0,0,0])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions