c_dim_cat_1 or c_dim_cat_2 for 2 bytes category dimention

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

c_dim_cat_1 or c_dim_cat_2 for 2 bytes category dimention

sbmandal
Hi,

The dim of the category, tip nc_dim_cat_, for 2 bytes dimentions (0...500) how should it be?
nc_dim_cat_1 or nc_dim_cat_2? Code in the nanocube-binning-csv like this.

        for c in self.catcol:
            h += 'field: %s nc_dim_cat_1\n'%(c.replace(' ',"_"))
            for k in self.valname[c]:
                h+='valname: %s %d %s\n'%(c.replace(' ',"_"),
                                          self.valname[c][k],k)

Thanks S. Burak MANDAL
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Nanocubes-discuss] c_dim_cat_1 or c_dim_cat_2 for 2 bytes category dimention

salivian
In the csv script it's currently hard coded to be 1 byte for cat, 2 bytes for time, 4 bytes for counts...  as they are the default configurations for the binaries.  (You would need to build new binaries eg nc_q25_c2_u2_u4 for cat with 2 bytes)

I am interested in making the size of the variables as options later.

For now, you may want to build the new binaries, and hack the script to use nc_dim_cat_2, 

"data[c] = data[c].astype('<u1');" -> "data[c] = data[c].astype('<u2');"


Thanks!

Horace

On Tue, Feb 24, 2015 at 8:19 AM, sbmandal <[hidden email]> wrote:
Hi,

The dim of the category, tip nc_dim_cat_, for 2 bytes dimentions (0...500)
how should it be?
nc_dim_cat_1 or nc_dim_cat_2? Code in the nanocube-binning-csv like this.

        for c in self.catcol:
            h += 'field: %s nc_dim_cat_1\n'%(c.replace(' ',"_"))
            for k in self.valname[c]:
                h+='valname: %s %d %s\n'%(c.replace(' ',"_"),
                                          self.valname[c][k],k)

Thanks S. Burak MANDAL



--
View this message in context: http://nanocubes-discuss.64146.x6.nabble.com/c-dim-cat-1-or-c-dim-cat-2-for-2-bytes-category-dimention-tp154.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: [Nanocubes-discuss] c_dim_cat_1 or c_dim_cat_2 for 2 bytes category dimention

sbmandal
I tried it, but didn't work.
I got "Invalid Path Error" from FlatTree.hh. When I close that error exception it works but result of "http://localhost:29550/count.a("test2",dive([],1))" is

 "{ "layers":[ "anchor:test2" ], "root":{ "children":[ { "path":[58072], "val":2.61725e+09 }, { "path":[58058], "val":2.81857e+09 }, { "path":[58046], "val":1.5435e+09 }, { "path":[27700], "val":1.84549e+08 }, { "path":[58002], "val":3.6071e+09 }, { "path":[57962], "val":3.85876e+08 }, { "path":[57933], "val":9.0597e+08 }, { "path":[57857], "val":248 }, { "path":[57835], "val":1.20796e+09 }, { "path":[27489], "val":8.72498e+08 }, { "path":[57817], "val":2.53336e+09 }, { "path":[12298], "val":2.38245e+09 },..".

As you can see val is not valid. If I change  nc_dim_cat_2 to nc_dim_cat_1, it works partially. Val is from 0 to 256.


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

Re: [Nanocubes-discuss] c_dim_cat_1 or c_dim_cat_2 for 2 bytes category dimention

salivian
Val is the count ...

the main concern is the number inside path [], for cat2 it should go from 0 to 256.  Have you changed the data[c].astype('<u2')  ?


Horace

On Wed, Mar 4, 2015 at 7:41 AM, sbmandal <[hidden email]> wrote:
I tried it, but didn't work.
I got "Invalid Path Error" from FlatTree.hh. When I close that error
exception it works but result of
"http://localhost:29550/count.a("test2",dive([],1))" is

 "{ "layers":[ "anchor:test2" ], "root":{ "children":[ { "path":[58072],
"val":2.61725e+09 }, { "path":[58058], "val":2.81857e+09 }, {
"path":[58046], "val":1.5435e+09 }, { "path":[27700], "val":1.84549e+08 }, {
"path":[58002], "val":3.6071e+09 }, { "path":[57962], "val":3.85876e+08 }, {
"path":[57933], "val":9.0597e+08 }, { "path":[57857], "val":248 }, {
"path":[57835], "val":1.20796e+09 }, { "path":[27489], "val":8.72498e+08 },
{ "path":[57817], "val":2.53336e+09 }, { "path":[12298], "val":2.38245e+09
},..".

As you can see val is not valid. If I change  nc_dim_cat_2 to nc_dim_cat_1,
it works partially. Val is from 0 to 256.


Thanks.



--
View this message in context: http://nanocubes-discuss.64146.x6.nabble.com/c-dim-cat-1-or-c-dim-cat-2-for-2-bytes-category-dimention-tp154p156.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: [Nanocubes-discuss] c_dim_cat_1 or c_dim_cat_2 for 2 bytes category dimention

sbmandal
Yes, I changed the data[c].astype('<u2').
Loading...