[Categorical Support] Day 0

43 views
Skip to first unread message

Lokesh Sharma

unread,
May 22, 2016, 9:14:29 AM5/22/16
to Sameer Deshmukh, Victor Shepelev, Alexej Gossmann, sciru...@googlegroups.com
Hello mentors

The coding period begins tomorrow and I'll be starting with implementing Daru::CategoricalIndex.

Firstly, what name would you suggest? Is CategoricalIndex fine or is CategoryIndex better?

Second, how should the development proceed? Should I create a separate branch and push commits on it until CategoricalIndex is implemented and then propose a PR?

Tomorrow I will begin by implementing the high level specs for Categorical Index.

Keeping in mind the aim of having CategoricalIndex is effectively store and retrieve categorical index, I have planned to use two data structures-
  • Hash-Table: to enable retrieval of all elements which belong to a certain category in constant time.
  • Array: to find each category of every element in constant time.

For example if the index is [:a,   :b,   :a,   :c,   :b,   :b] with categories :a, :b and :c, the hash table would be ​{a: [0, 2], b: [1, 4, 5], c: [3]} ​and array would be [0, 1, 0, 2, 1, 1].

Any thoughts?

Regards

Lokesh

Sameer Deshmukh

unread,
May 22, 2016, 9:23:39 AM5/22/16
to Lokesh Sharma, Victor Shepelev, Alexej Gossmann, sciru...@googlegroups.com
Replies inline:

Regards,
Sameer Deshmukh

On Sun, May 22, 2016 at 6:44 PM, Lokesh Sharma <lokeshh...@gmail.com> wrote:
Hello mentors

The coding period begins tomorrow and I'll be starting with implementing Daru::CategoricalIndex.

Firstly, what name would you suggest? Is CategoricalIndex fine or is CategoryIndex better?

CategoricalIndex IMO. 

Second, how should the development proceed? Should I create a separate branch and push commits on it until CategoricalIndex is implemented and then propose a PR?
 
Make a branch on your fork and send a WIP PR to v0dro/daru so that everyone can easily see progress. Don't squash commits until the feature is done.
 

Tomorrow I will begin by implementing the high level specs for Categorical Index.

Yep :)
 

Keeping in mind the aim of having CategoricalIndex is effectively store and retrieve categorical index, I have planned to use two data structures-
  • Hash-Table: to enable retrieval of all elements which belong to a certain category in constant time.
  • Array: to find each category of every element in constant time.

For example if the index is [:a,   :b,   :a,   :c,   :b,   :b] with categories :a, :b and :c, the hash table would be ​{a: [0, 2], b: [1, 4, 5], c: [3]} ​and array would be [0, 1, 0, 2, 1, 1].

Any thoughts?

This is as per what  you've suggested in your proposal, I believe. We've already given the go-ahead for this. 

Regards

Lokesh


Reply all
Reply to author
Forward
0 new messages