maxkferg / matlab-pmml

Gaussian Process Model PMML Adapter for MATLAB
Other
1 stars 1 forks source link

Tables are not fully supported in Matlab 2012b and prior #1

Open miguelan11 opened 7 years ago

miguelan11 commented 7 years ago

First, apologies if this is not the right place to post it.

I'm trying to read in MATLAB a pmml file made from a different modeller. Unfortunately I always get the same errors:

Error using pmml.GaussianProcess/parse>getChild (line 283) Could not find element GaussianProcessModel Error in pmml.GaussianProcess/parse (line 24) model = getChild(document,GPMODEL_TAG); Error in pmml.GaussianProcess/fromFile (line 170) [hyper,inf,mean,cov,lik,x,y] = self.parse(filename); Error in pmml.GaussianProcess (line 53) [hyp, inf, mean, cov, lik, x, y] = self.fromFile(hyp);

Even following the example on this repository (https://github.com/maxkferg/matlab-pmml) and trying to load again the file output.pmml produces errors:

Error using table (line 57) Invalid table input. Try: table(hAxis, '', ''); Error in pmml.GaussianProcess/parse (line 36) records(:,i) = table(zeros(nrows,1)); Error in pmml.GaussianProcess/fromFile (line 170) [hyper,inf,mean,cov,lik,x,y] = self.parse(filename); Error in pmml.GaussianProcess (line 53) [hyp, inf, mean, cov, lik, x, y] = self.fromFile(hyp);

Any clue as to how to solve these issues would be highly appreciated.

Best regards,

Miguel

maxkferg commented 7 years ago

Miguel,

Currently this PMML package only supports a few different model types, with GaussianProcessModel being the best supported. Please let me know what PMML model type (Neural net, Logistic regression, ect) you are trying to support, and we can work together to add support for it.

miguelan11 commented 7 years ago

Hi Max,

The PMML model is based on an Artificial Neural Network model.

However, with my current MATLAB release (R2012a) still I encounter errors when I follow the example on the github page (https://github.com/maxkferg/matlab-pmml) to generate a model and try to read the model again with the command p = pmml.GaussianProcess(‘output.pmml’).

Best regards,

Miguel


Miguel A. Palacios, PhD Medical Physicist Radiotherapy

VU Medisch Centrum Postbus 7057 1007 MB Amsterdam Tel.:+31-20-4441618

From: Max Ferguson [mailto:notifications@github.com] Sent: Wednesday, January 11, 2017 08:02 To: maxkferg/matlab-pmml Cc: Palacios, Miguel; Author Subject: Re: [maxkferg/matlab-pmml] Error in MATLAB when using function pmml.GaussianProcess (#1)

Miguel,

Currently this PMML package only supports a few different model types, with GaussianProcessModel being the best supported. Please let me know what PMML model type (Neural net, Logistic regression, ect) you are trying to support, and we can work together to add support for it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/maxkferg/matlab-pmml/issues/1#issuecomment-271793985, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJWjszGSQvW4LR-Vq6s5CAi0KNMQiImNks5rRH5xgaJpZM4LdvlL.

maxkferg commented 7 years ago

I opened https://github.com/maxkferg/matlab-pmml/issues/2 to track support for Artificial Neural Networks.

The error you are receiving with example.m is happening because tables were only introduces in MATLAB in 2012. This PMML package uses tables extensively, and may not work well with 2012a and 2012b. To test table support with your version please run:

table(zeros(5,1)); array2table(zeros(5,1));

On my version (Mac 2016a), both lines return the same result. If the second line works in 2012a, we could modify the code to fix this issue in 2012a

miguelan11 commented 7 years ago

Hallo Max,

Thank you for the feedback. It would be great if Artifical Neural Networks are supported.

None of both commands work on the MATLAB release I use at work (7.14.0.739, R2012a). “array2table” is command not recognized and “table(zeros(5,1))” produces errors as well: Error using table (line 57) Invalid table input. Try: table(hAxis, '', '');

Best regards,

Miguel


Miguel A. Palacios, PhD Medical Physicist Radiotherapy

VU Medisch Centrum Postbus 7057 1007 MB Amsterdam Tel.:+31-20-4441618

From: Max Ferguson [mailto:notifications@github.com] Sent: Friday, January 20, 2017 23:32 To: maxkferg/matlab-pmml Cc: Palacios, Miguel; Author Subject: Re: [maxkferg/matlab-pmml] Error in MATLAB when using function pmml.GaussianProcess (#1)

I opened #2https://github.com/maxkferg/matlab-pmml/issues/2 to track support for Artificial Neural Networks.

The error you are receiving with example.m is happening because tables were only introduces in MATLAB in 2012. This PMML package uses tables extensively, and may not work well with 2012a and 2012b. To test table support with your version please run:

table(zeros(5,1)); array2table(zeros(5,1));

On my version (Mac 2016a), both lines return the same result. If the second line works in 2012a, we could modify the code to fix this issue in 2012a

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/maxkferg/matlab-pmml/issues/1#issuecomment-274197602, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJWjsxu2V9lBRpzDxFRB9WrZ9Xn1VBwLks5rUTXEgaJpZM4LdvlL.