Skip to content

Replace reduce by mapreduce for kernelproduct #92

@theogf

Description

@theogf

Typically

    return mapreduce(hadamard, kernels(κ)) do kernel
        kernelmatrix(kernel, X; obsdim = obsdim)
    end

should be more efficient since as the documentation says

mapreduce is functionally equivalent to calling reduce(op, map(f, itr); init=init), but will in general execute faster since no intermediate collection needs to be created.

Originally posted by @devmotion in https://github.com/_render_node/MDIzOlB1bGxSZXF1ZXN0UmV2aWV3VGhyZWFkMjU3MDk2NjA5OnYy/pull_request_review_threads/discussion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions