Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Parameters:
X : DataFrame object or List or numpy array of predictors (n x p) in Numeric format
T : DataFrame object or List or numpy array of times to event or censoring (n). Should be floats
E : DataFrame object or List or numpy array of event indicators (n). E[i] = 1 <=> T[i] is the time of an event, else censoring time
T_val : DataFrame object or List or validation-set times, in Numeric format if any
E_val : DataFrame object or List or validation-set event idicators, in Numeric format if any
"""
X = check_array(X)
if X_val is not None:
X_val = check_array(X_val)
return super().fit(
X,
Y_from_censored(T, E),
X_val=X_val,
Y_val=Y_from_censored(T_val, E_val),
**kwargs,
)
T : DataFrame object or List or numpy array of times to event or censoring (n). Should be floats
E : DataFrame object or List or numpy array of event indicators (n). E[i] = 1 <=> T[i] is the time of an event, else censoring time
T_val : DataFrame object or List or validation-set times, in Numeric format if any
E_val : DataFrame object or List or validation-set event idicators, in Numeric format if any
"""
X = check_array(X)
if X_val is not None:
X_val = check_array(X_val)
return super().fit(
X,
Y_from_censored(T, E),
X_val=X_val,
Y_val=Y_from_censored(T_val, E_val),
**kwargs,
)
def score(self, Y):
return super().score(Y_from_censored(Y))
def d_score(self, Y):
return super().d_score(Y_from_censored(Y))