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

Add pairwise #54

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Add pairwise #54

wants to merge 5 commits into from

Commits on Nov 12, 2020

  1. Add pairwise

    It works well overall but there are a few issues:
    - When vectors have different types, `promote_typejoin` is used (via `broadcast`)
      to choose element type. `promote_type` would be more appropriate but there is
      no mechanism to do this in Base.
    - When skipping missing values, inference isn't able to realize that the result
      cannot be `missing`. This problem is fixed if I use a positional argument rather
      than a keyword argument for `skipmissing` but it's far from ideal for users.
    - Since `eachrow(df::DataFrame)` returns a `DataFrameRows` objects which is also
      a table, `pairwise(cor, eachrow(df))` still computes correlation between columns
      rather than between rows. And anyway `DataFrameRow` is not accepted by `cor`
      since it's not an `AbstractVector`. One needs something like
      `(Vector(r) for r in eachrow(df))` to work around this limitation.
    - Since Tables.jl objects can be of any type, we must have single method that
      performs dispatch internally by calling `Tables.istable`. Even `AbstractVector`
      inputs can be either vectors of vectors or row-oriented or column-oriented tables.
      This means the method that returns a named array and the method that returns a
      plain matrix have to live in the same package (which has to depend on NamedArrays).
    nalimilan committed Nov 12, 2020
    Configuration menu
    Copy the full SHA
    999956c View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2020

  1. Enable tests

    nalimilan committed Nov 13, 2020
    Configuration menu
    Copy the full SHA
    f850f5c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ad13045 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    556e3c6 View commit details
    Browse the repository at this point in the history
  4. Fix test deps

    nalimilan committed Nov 13, 2020
    Configuration menu
    Copy the full SHA
    f2d856d View commit details
    Browse the repository at this point in the history