The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Creating Memory ExampleSet
Hi,
I am reading an SQL table to create an ExampleSet and also trying to create a matching ExampleSet in memory.
First a question about the sql generated set.
SimpleExampleSet:
59 examples,
8 regular attributes,
special attributes = {
label = #9: RNK (nominal/single_value)/values=[A, B, C, D, E]
id = #8: inc (integer/single_value)
}
SimpleAttributes: sl3, sl5, sl8, sl13, sl21, mvv, hl, mvp, label := RNK, id := inc
Where did the id come from? I manipulated the id so that it became the sql key by adding inc and by placing it next to the label. Before I did this, the double mvp was not a regular expression, it seemed to be left out, becoming id. Could this be a bug?
This is my Memory Example set that has a null pointer exception.
SimpleExampleSet:
59 examples,
8 regular attributes,
special attributes = {
label = #8: RNK (nominal/single_value)/values=[A, B, C, D, E]
}
SimpleAttributes: sl3, sl5, sl8, sl13, sl21, mvv, hl, mvp, label := RNK
I am reading an SQL table to create an ExampleSet and also trying to create a matching ExampleSet in memory.
First a question about the sql generated set.
When I run this on my SQL generated ExampleSet I see in 4.6
System.out.println(exampleSet.toResultString());
Attributes tributes = exampleSet.getAttributes();
System.out.println(tributes.toString());
SimpleExampleSet:
59 examples,
8 regular attributes,
special attributes = {
label = #9: RNK (nominal/single_value)/values=[A, B, C, D, E]
id = #8: inc (integer/single_value)
}
SimpleAttributes: sl3, sl5, sl8, sl13, sl21, mvv, hl, mvp, label := RNK, id := inc
Where did the id come from? I manipulated the id so that it became the sql key by adding inc and by placing it next to the label. Before I did this, the double mvp was not a regular expression, it seemed to be left out, becoming id. Could this be a bug?
This is my Memory Example set that has a null pointer exception.
SimpleExampleSet:
59 examples,
8 regular attributes,
special attributes = {
label = #8: RNK (nominal/single_value)/values=[A, B, C, D, E]
}
SimpleAttributes: sl3, sl5, sl8, sl13, sl21, mvv, hl, mvp, label := RNK
0
Answers
how did you create the exampleset resulting from the sql query? Did you use the DatabaseExamplesetSource? Please provide the process or code fragment where the exampleset is created. Otherwise I can't see your parameter settings...
The same applies to the second question. Without having the stack trace, the fragment creating the exampleset and the lines, where the null pointer exception occurs, I cannot give you any reasonable advise.
Greetings,
Sebastian
you are setting the same parameter "id_attribute" again and again, each time overwriting it's previous value. So if you remove the line of code, setting inc as id attribute, the line before will be set the parameter to its final value and hence this mvp becomes id_attribute.
Greetings,
Sebastian