tensorflow / tensorflow/java

How to create a custom Index that is a function of multiple coordinates/dimensions

Open
#79 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
928
Forks
227
PR merge metrics
No merged PRs in 30d

Description

I'd like to know if a new feature can be added to have Index knowing about not only its Dimension, but also the other dimensions.

I already shared this with @karllessard , but I'd like to see if we can do something about.
Let me explain: I have a float[rows*columns] table with the actual data and an int[rows*columns] table with permutations to sort each column of the data table separately.

Data table:

data = [ 1.34 0.87 2.45 ]
       [ 0.45 1.56 1.66 ]
       [ 1.02 0.98 0.34 ]

permutations = [ 2 0 2 ]
               [ 0 2 1 ]
               [ 1 1 0 ]

This is a way to have both a sorted and an unsorted version of the data table by using permutations in the indexing when the sorted version is needed.

I was thinking to put the float table in a FloatDataBuffer, then wrap it in a FloatNdArray and create an Index that uses the permutations table. But the fact that we need a separate Index instance for each dimension makes the things complicated (impossible?). Is now the only option to implement my own FloatDataBuffer/FloatNdArray?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Index and Dimension abstractions, then inspect FloatDataBuffer and FloatNdArray to understand how each dimension receives its own Index. Compare that design with the described data and permutations tables. Done means determining whether a shared, multi-dimensional Index is feasible or whether a custom FloatDataBuffer/FloatNdArray is required; no specific files or tests are named.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.