Skip to content

Oblique Splitting API convergence - Projection Matrix vs Sampling + Transformation  #3

@adam2392

Description

@adam2392

I'm trying to write out the GaborMorfSplitter and I'm wondering if we might converge on a consistent API naming scheme for purposes of generalizing from a Base Oblique Splitter:

We start off with our sample data, X (n_samples, n_dims). Our goal is to generate a new matrix, X' that is (n_samples, proj_dims). where proj_dims dictates the how many projections we'll consider. In my view, there are two distinct "steps" done to get our projected data:

1. sampling a patch: (in the paper, this is called a projection matrix), but I feel like a patch makes more semantic sense. The patch doesn't need to even be contiguous! A patch is just defined as a sub-collection of data points (possibly random, or structured).
2. applying a transformation on said patch: In SPORF, this is linear combination, in MORF this is summation.

This then results in "one" number per data sample, per projected dimension, which can be fed into a splitting criterion across samples (i.e. Gini)

My Questions

  1. instead of calling things a projection matrix, can we split this into "sample patch" and "apply_transform" across the board? Right now in SPORF these are implicitly combined into 1 step (probably for speed)

This will then allow any MORF to inherit from a ORF easily.

For your reference if you want some more details

In SPORF

In SPORF, one is interested in i) sampling a "random patch" and then ii) computing a "transformation" on this patch.

The patch is simply dictated by the sparsity of the projection matrix and is generated randomly. The transformation is then a linear combination of the selected patch.

In naive-MORF

One also generates a patch and then computes a transformation on said patch.

The patch now is dictated by some contiguous patch on the image, and the size/location is generated randomly. The transformation is then the summation of the selected patch.

In Gabor-MORF

Same thing, where I currently:

  • sample a random patch (I use the patch selection procedure in naive-MORF)
  • apply a "transformation": convolve the patch with random Gabor kernel, and take the summation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions