I would like to specify bin edges for discretization. The following is my code:
vector<double> vctEdge;
vctEdge.push_back(21.0);
vctEdge.push_back(31.0);
vctEdge.push_back(41.0);
vctEdge.push_back(51.0);
vctEdge.push_back(61.0);
vctEdge.push_back(66.0);
vctEdge.push_back(71.0);
vctEdge.push_back(76.0);
vctEdge.push_back(81.0);
vctEdge.push_back(86.0);
vctEdge.push_back(91.0);
dataset.Discretize(1,DSL_dataset::DiscretizeAlgorithm::UniformWidth,12,"ss",vctEdge);
The above code gives me errors:
Assertion failed: output.empty(), file discretizer.cxx, line 18
However, in Genie, one can really modify the bin edges for discretization. I am wondering how can I do that in Smile/arn. Thanks.
How to specify bin edges for discretization
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: How to specify bin edges for discretization
The bug you've found will be fixed in the upcoming SMILE release; in the meantime the only way to discretize is through DSL_discretizer class (that's what GeNIe uses).However, in Genie, one can really modify the bin edges for discretization. I am wondering how can I do that in Smile/arn. Thanks.
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: How to specify bin edges for discretization
One more thing: SMILearn does not provide any means for explicit bin edges; the DSL_discretizer class calculates these. The actual assignment of values into bins is not available in SMILearn (as it's quite simple to perform).
Re: How to specify bin edges for discretization
Thanks, shooltz.
Could you please also provide any hints on how Genie allow users to modify bin edges for discretization? I really need to specify the bin edges manually rather than automatically by DSL_discretizer. Thanks.
Could you please also provide any hints on how Genie allow users to modify bin edges for discretization? I really need to specify the bin edges manually rather than automatically by DSL_discretizer. Thanks.
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: How to specify bin edges for discretization
I'm not sure I understand this part of your question - are you asking about the GUI implementation details (the Win32/MFC specific stuff)?petcai wrote:Could you please also provide any hints on how Genie allow users to modify bin edges for discretization?
At this time there's no SMILearn entrypoint for that. If you know the edges, then simply iterate over the entries in the data column and assign each float value into appropriate bin defined by the edges.I really need to specify the bin edges manually rather than automatically by DSL_discretizer.
Re: How to specify bin edges for discretization
Thanks, shooltz. I am asking the functionalities rather than the gui. Now I understand how to do it.