fitrgp with censored data

6 次查看(过去 30 天)
Gordie Howe
Gordie Howe 2021-3-31
% I can use fitgp to do linear regression without a problem.
m = 0.5;
b = 0.2;
x = [1,2,3,4,5,6,7,8,9,10];
y = m*x + b + 0.1*randn(1,length(x));
% Linear regression can easily be done by maximizing the log likelihood of N(y-(b2*x+b1),sigma)
% I can also use the fitrgp funtion to get the coefficients as well.
gpMod1 = fitrgp(x,y,'Basis','linear','Beta',[1;1],'Sigma',0.1);
% I can also use a custom function for fitrgp
hfcn = @(X) = X;
gpMod2 = fitrgp(x,y,'Basis',hfcn,'Beta',[1;1],'Sigma',0.1);
% However, if I have censored data, I am not sure how to impliment fitrgp or if it is possible. The normal way would be maximizing,
C = [1,1,1,1,1,0,0,0,0,0]; % are my classes for the right and left censored data
logL = @(g) -sum(C.*log(normcdf(y,b2*x+b1,sigma)) + (1-C)*log(1-normcdf(y,b2*x+b1,sigma)));
% or alternatively I could compact it since normcdf(t) = 1-normcdf(-t) so that,
C = [1,1,1,1,1,-1,-1,-1,-1,-1]; % are my classes for the right and left censored data
logL = @(g) -sum(C.*log(normcdf(y,b2*x+b1,sigma)));
% I do not know how to do this with fitrgp or if it is possible since I can't define the likelihood, only the basis. I am aware of other packages out there like GPML but I would like to know if I can do it with fitrgp. Thanks!
.

回答(1 个)

Aditya Patil
Aditya Patil 2021-4-5
fitrgp currently does not support censored data. This might be implemented in any of the future releases.
As a workaround, you might be able to use the tobit models in Toolkit on Econometrics and Economics Teaching. You can also use the Cox Proportional Hazards Model for Censored Data.
Another alternative would be to use mle function to fit custom pdf to the censored data.
  3 个评论
Aditya Patil
Aditya Patil 2021-4-7
fitrgp is intended for regression, but you can consider classification as regression with target variable being probability.
Gordie Howe
Gordie Howe 2021-4-8
So how would you use fitrgp for that? Using my censored data as the class?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Gaussian Process Regression 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by