Survival Analysis with Accelerated Failure Time
3 | 74 | 1 | 1 | 90 | 100 | 1175 | N/A | 306 |
3 | 68 | 1 | 0 | 90 | 90 | 1225 | 15 | 455 |
3 | 56 | 1 | 0 | 90 | 90 | N/A | 15 | [1010,+∞) |
5 | 57 | 1 | 1 | 90 | 60 | 1150 | 11 | 210 |
1 | 60 | 1 | 0 | 100 | 90 | N/A | 0 | 883 |
12 | 74 | 1 | 1 | 50 | 80 | 513 | 0 | [1022,+∞) |
7 | 68 | 2 | 2 | 70 | 60 | 384 | 10 | 310 |
Take a close look at the label for the third patient. His label is a range, not a single number. The third patient’s label is said to be censored, because for some reason the experimenters could not get a complete measurement for that label. One possible scenario: the patient survived the first 1010 days and walked out of the clinic on the 1011th day, so his death was not directly observed. Another possibility: The experiment was cut short (since you cannot run it forever) before his death could be observed. In any case, his label is [1010,+∞), meaning his time to death can be any number that’s higher than 1010, e.g. 2000, 3000, or 10000.
There are four kinds of censoring:
Uncensored: the label is not censored and given as a single number.
Right-censored: the label is of form [a,+∞), where a is the lower bound.
Left-censored: the label is of form [0,b], where b is the upper bound.
Interval-censored: the label is of form [a,b], where a and b are the lower and upper bounds, respectively.
Right-censoring is the most commonly used.
⟨w,x⟩ T(x) ]])
dtrain
=
xgb
.
DMatrix
(
X
)
y_lower_bound
=
np
.
array
([
2.0
,
3.0
,
0.0
,
4.0
])
y_upper_bound
=
np
.
array
([
2.0
,
+
np
.
inf
,
4.0
,
5.0
])
dtrain
.
set_float_info
(
'label_lower_bound'
,
y_lower_bound
)
dtrain
.
set_float_info
(
'label_upper_bound'
,
y_upper_bound
)
nrow
=
4
,
ncol
=
2
,
byrow
=
TRUE
)
dtrain
<-
xgb.DMatrix
(
X
)
y_lower_bound
<-
c
(
2
.
,
3
.
,
0
.
,
4
.
)
y_upper_bound
<-
c
(
2
.
,
+
Inf
,
4
.
,
5
.
)
setinfo
(
dtrain
,
'label_lower_bound'
,
y_lower_bound
)
setinfo
(
dtrain
,
'label_upper_bound'
,
y_upper_bound
)
(
params
,
dtrain
,
num_boost_round
=
5
,
evals
=
[(
dtrain
,
'train'
)])
watchlist
<-
list
(
train
=
dtrain
)
bst
<-
xgb.train
(
params
,
dtrain
,
nrounds
=
5
,
watchlist
)
logistic
| (1+ez)2ez |
extreme
| eze−expz |