linear mixed-effects model (fitlme) add array variable

조회 수: 1 (최근 30일)
P. Dodo
P. Dodo 2023년 1월 24일
댓글: Jeff Miller 2023년 1월 25일
Hello community!
I would like to run a linear mixed-effect model using fitlme and include one fixed effect which instead of having one value per observations has an array (i.e., a reflectance spectrum) for each observation. The other fixed (and random) effect are instead single values.
I want to understand the variance contribution from the entire array (i.e., full spectrum) on my response variable rather than from its individual elements (i.e., reflectance at single wavelengths). How to modify the fitlme synthax for this?
Thank you in advance for any suggestion.

답변 (2개)

Jeff Miller
Jeff Miller 2023년 1월 24일
I'm pretty sure the predictors have to be single values, so you can't feed in an array as a single unified predictor. You could feed in the individual elements, but you say you don't want to do that.
The only other possibility would be to use a single categorical predictor to represent the whole spectrum array for each case. For example, if you had only two spectrum patterns across your whole dataset, then you could use a predictor variable coding them as type A and type B (or whatever). Something like this would work if you can group the different spectrum arrays into a small-ish number of categories; otherwise, I have no idea.
  댓글 수: 2
P. Dodo
P. Dodo 2023년 1월 25일
Thank you for your answer Jeff. The categorical predictor approach would not work because spectra are very variable and cannot be grouped into types, but I see your point.
Jeff Miller
Jeff Miller 2023년 1월 25일
Too bad. In that case, the PCA approach suggested by @the cyclist seems the most promising.
Just out of curiousity, can you describe what sort of output you would hope to get if you could get fitlme to handle a vector-type predictor? I'm having trouble envisioning just what is meant by the "variance contribution from the entire array" as opposed to the individual elements. If you mean contributions due to (say) products of pairs of elements, products of triples, etc, then you could form those in advance and feed them into the equation as further individual predictors, like in polynomial regression.

댓글을 달려면 로그인하십시오.


the cyclist
the cyclist 2023년 1월 25일
I am by no means an expert on image processing, but one possibility is to preprocess your images to extract individual "features" that can then be used in a regression model. If you have an m-by-n array (of some kind of reflectance measure), then you have m*n features in the original data space. That will capture a certain amount of noise, but if you do some kind of dimensional reduction technique (such as PCA), then you might be able to extract a smaller number of more meaningful features (e.g. things like "overall reflectance", or "left-brighter-than-right") that could be predictors of the response.
You will not have one fit coefficent for "fixed effect of image", but you may end up with just a few.

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by