Attached (Qn002 - VIF Node hits an exception.knar (122.2 KB)) consists of:
9-column ‘Qn002.csv’, “CSV Reader” Node and “Variance Inflation Factor (VIF)” Node. VIF Node hits an error when executed:
WARN Java Snippet 5:2:0:36 Evaluation of java snippet failed for row “Row28”.The exception is caused by line 42 of the snippet. Exception message (NullPointerException): Cannot invoke “java.lang.Double.doubleValue()” because “this.c_VIF” is null*
ERROR Java Snippet 5:2:0:36 Execute failed: An error occured in an expression with output flow variables.*
Let’s say, I would need to use all the 9 column data.
My bad, I should have put down more information about the csv file.
It has 9 columns and the data is all numeric; either Integer or Double data type. There is no missing or null value in the file.
It appeared to me that the only function of that Java Snippet was to simply compare the VIF vs the Max VIF and notate when above or below and format the result in HTML to be viewed in the Interactive View. I tried to clean up the HTML code for a bit, but why use it at all for something this basic? You may want to check to verify that there wasn’t something that I missed in the original code, but it looks like a simple if statement to flag above and below the threshold.
I love the Interactive View as much as anyone else for flexibility and interactivity, but this seems like a needless error prone formatting step that requires extra clicks. I simplified it by just adding a flag column to the output table. Take a look and see if this is what you were expecting.
I have just begun on an end-user’s course using Knime since the middle of Oct 2023 and have not reached the developer’s skill where I can look into a Component. I really wish, like you can, as I progress. It is interesting to see/study the internal parts of a Component.
The “Variance Inflation Factor (VIF)” Component which you corrected in “Qn002.knwf” is what I take in with trust. Is it now how to tell my teacher that this Component is not taken from the original (“Variance Inflation Factor (VIF) – KNIME Community Hub”) but from the forum contributor, iCFO, who came to my assistance. Let me sort this out.
It’s okie we can go without the “Interactive View” after all, the “Outport 1” is giving the necessary data.
Another, there are ‘?’ symbols in the VIF column:
May the numeric values be revealed too? It is more for cosmetic touch up when looking at the table.