フィルターのクリア

fitrgp with censored data

6 ビュー (過去 30 日間)
Gordie Howe
Gordie Howe 2021 年 3 月 31 日
コメント済み: Gordie Howe 2021 年 4 月 8 日
% 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 Center および File ExchangeGaussian Process Regression についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by