Package org.biojava.nbio.survival.cox
Class SurvivalInfo
java.lang.Object
org.biojava.nbio.survival.cox.SurvivalInfo
- All Implemented Interfaces:
Comparable<SurvivalInfo>
Data class to represent a single sample where time and event/censor status is required
Additionally each variable and data associated with that variable.
The code handles figuring out if a variables is continuous or categorical. If categorical will
convert to numerical values.
- Author:
- Scooter Willis
-
Constructor Summary
ConstructorDescriptionSurvivalInfo
(double t, int e) SurvivalInfo
(double t, int e, String variable, double d) SurvivalInfo
(double t, int e, LinkedHashMap<String, Double> d) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addContinuousVariable
(String variable, Double value) void
addUnknownDataTypeVariable
(String variable, String value) int
getContinuousVariable
(String variable) getGroupCategories
(String groupName) getId()
double
int
double
int
getOrder()
getOriginalMetaData
(String variable) double
getResidualVariable
(String variable) double
getScore()
int
int
double
getTime()
getUnknownDataTypeVariable
(String variable) getVariable
(String variable) double
void
setClusterValue
(String clusterValue) void
void
setLinearPredictor
(double linearPredictor) void
setOffset
(double offset) void
setOrder
(int order) void
setResidual
(double residual) void
setResidualVariable
(String variable, Double value) Set the residual value for the variable for this sample.void
setScore
(double score) void
setStatus
(int status) void
setStrata
(int strata) void
setTime
(double time) void
setWeight
(double weight) toString()
void
updateContinousVariable
(String variable, Double value)
-
Constructor Details
-
SurvivalInfo
- Parameters:
t
-e
-
-
SurvivalInfo
- Parameters:
t
-e
-d
-
-
SurvivalInfo
- Parameters:
t
-e
-variable
-d
-
-
-
Method Details
-
setResidualVariable
Set the residual value for the variable for this sample. Called from CoxScore.java- Parameters:
variable
-value
-
-
getResidualVariable
- Parameters:
variable
-- Returns:
-
getUnknownDataTypeVariable
- Parameters:
variable
-- Returns:
-
getOriginalMetaData
- Parameters:
variable
-- Returns:
-
addUnknownDataTypeVariable
- Parameters:
variable
-value
-
-
updateContinousVariable
- Parameters:
variable
-value
-
-
addContinuousVariable
- Parameters:
variable
-value
-
-
getContinuousVariable
- Parameters:
variable
-- Returns:
-
getGroupCategories
- Parameters:
groupName
-- Returns:
-
getDataVariables
- Returns:
-
getNumberVariables
- Returns:
-
getVariable
- Parameters:
variable
-- Returns:
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SurvivalInfo>
-
getOffset
- Returns:
- the offset
-
setOffset
- Parameters:
offset
- the offset to set
-
getWeight
- Returns:
- the weight
-
setWeight
- Parameters:
weight
- the weight to set
-
getStrata
- Returns:
- the strata
-
setStrata
- Parameters:
strata
- the strata to set
-
getScore
- Returns:
- the score
-
setScore
- Parameters:
score
- the score to set
-
getLinearPredictor
- Returns:
- the linearPredictor
-
setLinearPredictor
- Parameters:
linearPredictor
- the linearPredictor to set
-
getResidual
- Returns:
- the residual
-
setResidual
- Parameters:
residual
- the residual to set
-
getClusterValue
- Returns:
- the clusterValue
-
setClusterValue
- Parameters:
clusterValue
- the clusterValue to set
-
getId
- Returns:
- the id
-
setId
- Parameters:
id
- the id to set
-
getOrder
- Returns:
- the order
-
setOrder
- Parameters:
order
- the order to set
-
getTime
- Returns:
- the time
-
setTime
- Parameters:
time
- the time to set
-
getStatus
- Returns:
- the status
-
setStatus
- Parameters:
status
- the status to set
-