2018-07-01 22:22:12 -07:00
|
|
|
package ca.joeltherrien.randomforest;
|
|
|
|
|
2018-07-05 12:59:29 -07:00
|
|
|
import ca.joeltherrien.randomforest.covariates.Covariate;
|
2018-07-01 22:22:12 -07:00
|
|
|
import lombok.Getter;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
public class CovariateRow {
|
|
|
|
|
2018-07-03 17:00:02 -07:00
|
|
|
private final Map<String, Covariate.Value> valueMap;
|
2018-07-01 22:22:12 -07:00
|
|
|
|
|
|
|
@Getter
|
|
|
|
private final int id;
|
|
|
|
|
2018-07-03 17:00:02 -07:00
|
|
|
public Covariate.Value<?> getCovariateValue(String name){
|
2018-07-01 22:22:12 -07:00
|
|
|
return valueMap.get(name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString(){
|
|
|
|
return "CovariateRow " + this.id;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|