Strong validation on R Wrapper
Closed this issue · 1 comments
manuparra commented
Validate all fault points:
In this example:
ro.r("""
dataset = read.csv(file="{0}", header = TRUE)
resultfit = lm(formula="{1}", data=dataset,{2})
save(resultfit, file="{3}")
... Add PMML GENERATE...
""".format(dataset, formula, inputparameters, output))
Possible fault points are:
- Reading the
DataSet
(rememberdc://
path ):- What if
dataset
is not available - What if
dataset
has not HEADER, - What if
formula
doesn't contain columns in the dataset, - more ...
- What if
- LM function
lm(....
:Formula
is not correctFormula
contains fields not in datasetFunction
lm
return ERROR ? or OKAY (a model)?- more ...
- Save result and PMML generate:
resultfit
is OKAY (a model) or is an error?file
is okay and can be stored ?- more ...
Mancuerna commented
Done.