fitrgp with censored data
6 次查看(过去 30 天)
显示 更早的评论
% 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!
.
0 个评论
回答(1 个)
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.
3 个评论
Aditya Patil
2021-4-7
fitrgp is intended for regression, but you can consider classification as regression with target variable being probability.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Gaussian Process Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!