cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Mariana_Aguilar
Level III

Spectral data + PLS-DA

Hello everyone!

I'm reaching out to see if someone can guide me through the basic steps for performing PLS-DA.

Below is an example of the raw data table I'm using in order to construct the classification method. I'm working with spectral FTIR data, and my objective with the classification method is to see if I can classify samples according to the treatment they have received.

When I proceed with the model, I invariably get that 0 factors are the minimizing number of factors, and hence I cannot classify anything. 

I thought this is puzzling, since I've already performed curve fitting analysis of the spectra in question, and with that analysis, there are clear differences between the samples treated and those untreated. Furthermore, I've graphed the treated and untreated spectra and there are clear visual differences... hence, I suspect that I'm doing something wrong.

My questions are:

For the classification variables, I'm using binary code, 0 when samples didn't receive that treatment and 1 for those that did. Is this ok, or should another setting be used?

Any other suggestions on how to improve the classification performance of this dataset? (I forgot to say that all spectra has been SNV normalized previous to the analysis to account for noise).

Thanks in advance! Any suggestion would be greatly appreciated

 

Mariana_Aguilar_0-1745542884147.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Spectral data + PLS-DA

Hi @Mariana_Aguilar ,

 

Sure, find the file attached. You could try and do the groupings from the Score values (in Save Columns > Save Scores) and take those scores to try and group together - I've made a simple example with Graph Builder (scripted on the table) and you could explore some of the clustering methods available in Analyze>Clustering to see if you can get meaningful grouping. It's also worth having a play with the settings in the PLS method for centering, scaling and Standardize X, as changes to these can improve the model fit (as well as removing non-important VIP variables and re-running the model).

 

Thanks,

Ben

“All models are wrong, but some are useful”

View solution in original post

7 REPLIES 7

Re: Spectral data + PLS-DA

Hi @Mariana_Aguilar ,

 

Is it possible for you to provide the dataset to look at? 

 

PLS-DA is only possible through JMP Pro, is that what you are using? For the binary code that should not matter for the classification, as JMP Pro will analyze the data accordingly. If you are using Pro, it may also be worth running the data through Functional Data Explorer, this will give you a functional PCA plot that you can use to quickly see if there is a distinction between the shapes of the curves in each category.

 

 

There are some good resources for spectral analysis with JMP here, here and here

 

Thanks,

Ben

“All models are wrong, but some are useful”
Mariana_Aguilar
Level III

Re: Spectral data + PLS-DA

Dear Ben, 

Thank you for you kind reply. I've attached the file with the dataset. 

I've used the functional data explorer, but unfortunately, with PCA, I wasn't able to properly separate my samples according to the treatment received. I read that perhaps a supervised method like PLS-DA would be more helpful in discriminating between the subtle differences.

Thanks in advance.

Mariana

Re: Spectral data + PLS-DA

Hi @Mariana_Aguilar,

 

I've had a look at the data, and I think that the binary approach of just looking at the treatment is one of the reasons that your modelling approaches are struggle, when I look with FDE (Unconstrained MCR) and PLS-DA and there is a significant effect from the treatment and the protein type used to the spectra - if you are only relating to treatment the model is not going to be able to land on a suitable model as you're missing half of the story. 

 

Thanks,

Ben

 

“All models are wrong, but some are useful”
Mariana_Aguilar
Level III

Re: Spectral data + PLS-DA

Dear Ben, thank you again for your reply.

I'll continue to explore my dataset as you've suggested. If you don't mind my asking... would it be possible to share with me the data Script you've used? I just want to make sure I'm following the appropriate steps in the model specification (image 1).

And one last question if I may. Once I've arrived to the score plot (as in the image 2), do you have any suggestion on how can I include eclipses to show groupings? I can only think of K means but I don't know if it's a bit redundant after PLS-DA.

 

Thank you!!

Mariana_Aguilar_0-1745862795716.png

Mariana_Aguilar_1-1745863031934.png

 

 

 

 

Re: Spectral data + PLS-DA

Hi @Mariana_Aguilar ,

 

Sure, find the file attached. You could try and do the groupings from the Score values (in Save Columns > Save Scores) and take those scores to try and group together - I've made a simple example with Graph Builder (scripted on the table) and you could explore some of the clustering methods available in Analyze>Clustering to see if you can get meaningful grouping. It's also worth having a play with the settings in the PLS method for centering, scaling and Standardize X, as changes to these can improve the model fit (as well as removing non-important VIP variables and re-running the model).

 

Thanks,

Ben

“All models are wrong, but some are useful”
Mariana_Aguilar
Level III

Re: Spectral data + PLS-DA

Thank you Ben, your support has been very helpful. I know I said last question but, may I ask one more? From the PLS-DA models I'm constructing, I'd like to include some statistic related to cross validation error or perform any permutation test to test for the model's validity.

I haven't had any luck finding any of such values on the menu under the red triangle in the PLS-DA window... would you mind pointing me out in the right direction to perform this tests?

Thanks again for your kind help.

Mariana 

Re: Spectral data + PLS-DA

Hi @Mariana_Aguilar ,

 

The Cross Validation report will provide you with details on how the model has performed with the training data, I would recommend looking at this page (and looking at some of the links for things like Root mean press and How X2 is calculated) to learn more.

 

Thanks,

Ben

“All models are wrong, but some are useful”

Recommended Articles