public final class TrendAlgorithm extends AbstractAlgorithm
null) values (see compute(org.protempa.proposition.Segment<org.protempa.proposition.PrimitiveParameter>, org.protempa.AlgorithmArguments)
below), but does not handle nan yet.| Constructor and Description |
|---|
TrendAlgorithm(Algorithms algorithms,
String id) |
| Modifier and Type | Method and Description |
|---|---|
Value |
compute(Segment<PrimitiveParameter> segment,
AlgorithmArguments args)
Computes whether the slope of a linear regression line drawn through the
values of a time sequence segment is above and/or below a specified
value.
|
close, createDataSourceConstraint, finalize, getAdvanceRowSkipEnd, getId, getInValueType, getMaximumNumberOfValues, getMinimumNumberOfValues, getParameters, initialize, parameter, setAdvanceRowSkipEnd, setInValueType, setMaximumNumberOfValues, setMinimumNumberOfValues, setParameters, toStringpublic TrendAlgorithm(Algorithms algorithms, String id)
public Value compute(Segment<PrimitiveParameter> segment, AlgorithmArguments args)
compute in interface Algorithmcompute in class AbstractAlgorithmsegment - a Segment object.Value if the slope of the segment is
above and/or below the specified thresholds, null
otherwise. If any of the values of segment are
null, this methods also returns null.org.protempa.AbstractAlgorithm#compute(org.protempa.proposition.Segment)Copyright © 2012–2017 Emory University. All rights reserved.