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
public SurvivalInfo(double t, int e) - 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
public int getNumberVariables()- Returns:
-
getVariable
- Parameters:
variable
-- Returns:
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SurvivalInfo>
-
getOffset
public double getOffset()- Returns:
- the offset
-
setOffset
public void setOffset(double offset) - Parameters:
offset
- the offset to set
-
getWeight
public double getWeight()- Returns:
- the weight
-
setWeight
public void setWeight(double weight) - Parameters:
weight
- the weight to set
-
getStrata
public int getStrata()- Returns:
- the strata
-
setStrata
public void setStrata(int strata) - Parameters:
strata
- the strata to set
-
getScore
public double getScore()- Returns:
- the score
-
setScore
public void setScore(double score) - Parameters:
score
- the score to set
-
getLinearPredictor
public double getLinearPredictor()- Returns:
- the linearPredictor
-
setLinearPredictor
public void setLinearPredictor(double linearPredictor) - Parameters:
linearPredictor
- the linearPredictor to set
-
getResidual
public double getResidual()- Returns:
- the residual
-
setResidual
public void setResidual(double residual) - 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
public int getOrder()- Returns:
- the order
-
setOrder
public void setOrder(int order) - Parameters:
order
- the order to set
-
getTime
public double getTime()- Returns:
- the time
-
setTime
public void setTime(double time) - Parameters:
time
- the time to set
-
getStatus
public int getStatus()- Returns:
- the status
-
setStatus
public void setStatus(int status) - Parameters:
status
- the status to set
-