Using PLStoolboox in command line code: how can I index by class to reduce the DSO to only the samples I want.

15 vues (au cours des 30 derniers jours)
I am writing a small script that makes use of a Eigenvector PLS toolbox dataset object (DSO)
I am trying to reduce the size of a dataset object to consist of only data from a particular class. Ideally, I would like to keep all associated information with this DSO and not just the dataset itself. The class data itself is stored as part of the DSO but I cannot use the index function to identify and keep the correct data because it is in class array form.
Further information:
This DSO can store several classes as cell arrays. In my dataset I have up to 5 different classes (e.g. sex, age band, medication etc). The notation to access these classes using the command line is: DSO.class{1,5} where DSO is the full dataset object and you will access the 5th class list for the samples (rows). Any of my standard solutions run into errors because it is a class array. If I use cell2mat to convert it from an array, I still cannot apply this to the dataset.
I have a further problem that even if I find a manual method to reduce the dataset, I don't seem to be able to easily reduce the dataset object in it's entirity with one simple command (ie. not just DSO.data, but keeping all the associated labels, classes and everything else).
Any ideas?

Réponses (1)

Phil Pallokat
Phil Pallokat le 31 Jan 2022
Hi,
the question was asked some time ago, but maybe other people are interested.
There is an entry in the wiki of the developer of the PLS toolbox:
Best regards
Phil

Produits


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by