Class SurvivalInfo

java.lang.Object
org.biojava.nbio.survival.cox.SurvivalInfo
All Implemented Interfaces:
Comparable<SurvivalInfo>

public class SurvivalInfo extends Object implements 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 Details

    • SurvivalInfo

      public SurvivalInfo(double t, int e)
      Parameters:
      t -
      e -
    • SurvivalInfo

      public SurvivalInfo(double t, int e, LinkedHashMap<String,Double> d)
      Parameters:
      t -
      e -
      d -
    • SurvivalInfo

      public SurvivalInfo(double t, int e, String variable, double d)
      Parameters:
      t -
      e -
      variable -
      d -
  • Method Details

    • setResidualVariable

      public void setResidualVariable(String variable, Double value)
      Set the residual value for the variable for this sample. Called from CoxScore.java
      Parameters:
      variable -
      value -
    • getResidualVariable

      public Double getResidualVariable(String variable)
      Parameters:
      variable -
      Returns:
    • getUnknownDataTypeVariable

      public String getUnknownDataTypeVariable(String variable)
      Parameters:
      variable -
      Returns:
    • getOriginalMetaData

      public String getOriginalMetaData(String variable)
      Parameters:
      variable -
      Returns:
    • addUnknownDataTypeVariable

      public void addUnknownDataTypeVariable(String variable, String value)
      Parameters:
      variable -
      value -
    • updateContinousVariable

      public void updateContinousVariable(String variable, Double value)
      Parameters:
      variable -
      value -
    • addContinuousVariable

      public void addContinuousVariable(String variable, Double value)
      Parameters:
      variable -
      value -
    • getContinuousVariable

      public Double getContinuousVariable(String variable)
      Parameters:
      variable -
      Returns:
    • getGroupCategories

      public ArrayList<String> getGroupCategories(String groupName)
      Parameters:
      groupName -
      Returns:
    • getDataVariables

      public ArrayList<String> getDataVariables()
      Returns:
    • getNumberVariables

      public int getNumberVariables()
      Returns:
    • getVariable

      public Double getVariable(String variable)
      Parameters:
      variable -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(SurvivalInfo o)
      Specified by:
      compareTo in interface Comparable<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

      public String getClusterValue()
      Returns:
      the clusterValue
    • setClusterValue

      public void setClusterValue(String clusterValue)
      Parameters:
      clusterValue - the clusterValue to set
    • getId

      public String getId()
      Returns:
      the id
    • setId

      public void setId(String id)
      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