How to use a category with >1000 values

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to use a category with >1000 values

jamjamjam
Hi I am having troubles to run a cube where the category has more than 2^8 different values.
I was thinking of modifying the Makefile.am to include another variable_type

original code:
nc_q25_c1_u2_u8_LDFLAGS  = $(AM_LDFLAGS)
nc_q25_c1_u2_u8_CXXFLAGS = $(AM_CXXFLAGS) \
    -D_GLIBCXX_USE_NANOSLEEP \
    -D_GLIBCXX_USE_SCHED_YIELD \
    -DLIST_DIMENSION_NAMES=q25,c1 \
    -DLIST_VARIABLE_TYPES=u2,u8 \
    -DVERSION=\"$(VERSION)\"
nc_q25_c1_u2_u8_SOURCES =\
    $(nc_SOURCES)

modified code:
nc_q25_c1_u2_u16_LDFLAGS  = $(AM_LDFLAGS)
nc_q25_c1_u2_u16_CXXFLAGS = $(AM_CXXFLAGS) \
    -D_GLIBCXX_USE_NANOSLEEP \
    -D_GLIBCXX_USE_SCHED_YIELD \
    -DLIST_DIMENSION_NAMES=q25,c1 \
    -DLIST_VARIABLE_TYPES=u2,u16 \
    -DVERSION=\"$(VERSION)\"
nc_q25_c1_u2_u16_SOURCES =\
    $(nc_SOURCES)

but it seems I can't just replace the u8 with something like u16?
Is there a certain limit on the number of possible values a category can take and that can't be exceeded?

Thanks a lot.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Nanocubes-discuss] How to use a category with >1000 values

laurolins
You should use c2 to indicate a categorical dimension of 2 bytes.

nc_q25_c2_u2_u8_LDFLAGS  = $(AM_LDFLAGS)
nc_q25_c2_u2_u8_CXXFLAGS = $(AM_CXXFLAGS) \
   -D_GLIBCXX_USE_NANOSLEEP \
   -D_GLIBCXX_USE_SCHED_YIELD \
   -DLIST_DIMENSION_NAMES=q25,c2 \
   -DLIST_VARIABLE_TYPES=u2,u8 \
   -DVERSION=\"$(VERSION)\"
nc_q25_c2_u2_u8_SOURCES =\
   $(nc_SOURCES)

A c1 category can hold values from 0 to 254     (the value 255 is reserved for the root node)
A c2 category can hold values from 0 to 65534 (the value 65535 is reserved for the root node)

The second to last u2 means an unsigned integer of 2 bytes to time (timestamp should range from 0 to 65535)
The last u8 means an unsigned integer of 8 bytes for counts (the maximum count value is 2^64 - 1)

Lauro

> On Apr 16, 2015, at 10:41 AM, jamjamjam <[hidden email]> wrote:
>
> Hi I am having troubles to run a cube where the category has more than 2^8
> different values.
> I was thinking of modifying the Makefile.am to include another variable_type
>
> original code:
> nc_q25_c1_u2_u8_LDFLAGS  = $(AM_LDFLAGS)
> nc_q25_c1_u2_u8_CXXFLAGS = $(AM_CXXFLAGS) \
>    -D_GLIBCXX_USE_NANOSLEEP \
>    -D_GLIBCXX_USE_SCHED_YIELD \
>    -DLIST_DIMENSION_NAMES=q25,c1 \
>    -DLIST_VARIABLE_TYPES=u2,u8 \
>    -DVERSION=\"$(VERSION)\"
> nc_q25_c1_u2_u8_SOURCES =\
>    $(nc_SOURCES)
>
> modified code:
> nc_q25_c1_u2_u16_LDFLAGS  = $(AM_LDFLAGS)
> nc_q25_c1_u2_u16_CXXFLAGS = $(AM_CXXFLAGS) \
>    -D_GLIBCXX_USE_NANOSLEEP \
>    -D_GLIBCXX_USE_SCHED_YIELD \
>    -DLIST_DIMENSION_NAMES=q25,c1 \
>    -DLIST_VARIABLE_TYPES=u2,u16 \
>    -DVERSION=\"$(VERSION)\"
> nc_q25_c1_u2_u16_SOURCES =\
>    $(nc_SOURCES)
>
> but it seems I can't just replace the u8 with something like u16?
> Is there a certain limit on the number of possible values a category can
> take and that can't be exceeded?
>
> Thanks a lot.
>
>
>
> --
> View this message in context: http://nanocubes-discuss.64146.x6.nabble.com/How-to-use-a-category-with-1000-values-tp171.html
> Sent from the nanocubes-discuss mailing list archive at Nabble.com.
>
> _______________________________________________
> Nanocubes-discuss mailing list
> [hidden email]
> http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net


_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to use a category with >1000 values

Harry Jie
In reply to this post by jamjamjam
Hi, the same question bothers me, but my Makefile.am is like below:
========================
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS  = -I m4

SUBDIRS = src scripts

# add autogen on distribution
EXTRA_DIST = bootstrap
========================
There is no content as you described, so I try to append your code to the file. However, it seems no work.

So, I wonder how to modify the default Makefile.am.
BTW, my nanocube verison is 3.2.1

Thanks!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Nanocubes-discuss] How to use a category with >1000 values

Harry Jie
In reply to this post by laurolins
Hi, the same question bothers me, but my Makefile.am is like below:
========================
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS  = -I m4

SUBDIRS = src scripts

# add autogen on distribution
EXTRA_DIST = bootstrap
========================
There is no content as you described, so I try to append your code to the file. However, it seems no work.

So, I wonder how to modify the default Makefile.am.
BTW, my nanocube verison is 3.2.1

Thanks!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Nanocubes-discuss] How to use a category with >1000 values

salivian
In reply to this post by Harry Jie
If you use the nanocube-csv-binning script

Please try the --catbytes parameter, the argument can be 1 2 or 4.


Horace

On Mon, Sep 28, 2015 at 5:13 AM, Harry Jie <[hidden email]> wrote:
Hi, the same question bothers me, but my Makefile.am is like below:
========================
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGSĀ  = -I m4

SUBDIRS = src scripts

# add autogen on distribution
EXTRA_DIST = bootstrap
========================
There is no content as you described, so I try to append your code to the
file. However, it seems no work.

So, I wonder how to modify the default Makefile.am.
BTW, my nanocube verison is 3.2.1

Thanks!!



--
View this message in context: http://nanocubes-discuss.64146.x6.nabble.com/How-to-use-a-category-with-1000-values-tp171p178.html
Sent from the nanocubes-discuss mailing list archive at Nabble.com.

_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net


_______________________________________________
Nanocubes-discuss mailing list
[hidden email]
http://mailman.nanocubes.net/mailman/listinfo/nanocubes-discuss_mailman.nanocubes.net
Loading...