Java edit variable with PMML reader

Hi,  

I am currently exploring Anomaly detection application under example server with six dot txt files. 
having finished the time visualization part the result into .csv file,I have started working on AR Deployment under Time Series.

  
In Time Series AR Deployment part under "Linear regression" metanode the first variable is Java edit variable. 

Java Edit Variable node will use the current column name to generate .pmml file. 
After the Java edit variable node gets executed the pmml file though is not generated 

The next node which is a pmml reader node correctly complains that the pmml file is not present. 

 

int i = v_currentColumnName.indexOf("%"); 
if(i > 0) 
   v_currentColumnName = v_currentColumnName.substring(1, i); 
out_path = "C:\\data\\anomaly detection\\models\\ (file:///C://data//anomaly%20detection//models//)" + v_currentColumnName + ".pmml"; 

Here in my workflow i don't have any column name that has "%" character in any part. 
Any ideas how i go about from here please ?

Hi,

if you read the data AlignedData.csv as configured in the File reader node, the last columns have a % in the name. For example [900-1000]+Amp-M1-AC%  So, that part of the code should work fine.

What seems wrong with the code is the way you write the output file path. The output path in the original code was written as:

int i = v_currentColumnName.indexOf("%");
if(i > 0)
   v_currentColumnName = v_currentColumnName.substring(1, i);
out_path = "C:\\data\\anomaly detection\\models\\" + v_currentColumnName + ".pmml";

Let me know if you need more help

-- Rosaria

Hi,

       Got some idea. Thanks for your reply.

 

Regards,

Prasanna