public static class TSLagMaker.PeriodicityHandler extends Object implements Serializable
| Constructor and Description |
|---|
TSLagMaker.PeriodicityHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dateInSkipList(Date toCheck)
Checks to see if the supplied date is in the list of time units to skip
(i.e.
|
double |
deltaTime()
Get the delta time of the periodicity being managed
|
long |
getDateTimeStampFinal()
Get the last date timestamp value in the batch training data
|
long |
getDateTimeStampInitial()
Get the first date time stamp value in the batch training data
|
TSLagMaker.Periodicity |
getPeriodicity()
Get periodicity being managed
|
boolean |
isDateBased()
Returns true if the periodicity being managed is date timestamp-based
|
weka.core.Instance |
remapDateTimeStamp(weka.core.Instance inst,
weka.core.Instance previous,
String timeStampName)
Remaps a date timestamp to an integer starting (from the first time stamp
seen in the data) at 0.
|
void |
setDateTimeStampFinal(long tsfinal)
Set the last date timestamp value in the batch training data
|
void |
setDateTimeStampInitial(long tsbase)
Set the first date time stamp value in the batch training data
|
void |
setDeltaTime(double deltaTime)
Set the delta time for the periodicity being managed
|
void |
setIsDateBased(boolean isDateBased)
Set whether the periodicity being managed is date timestamp-based
|
void |
setPeriodicity(TSLagMaker.Periodicity p)
Set periodicity to manage
|
void |
setSkipList(String aList,
String dateFormat)
Set a list of skip entries
|
public TSLagMaker.Periodicity getPeriodicity()
public void setPeriodicity(TSLagMaker.Periodicity p)
p - the periodicity to managepublic void setSkipList(String aList, String dateFormat) throws Exception
aList - a comma separated list of date-based entries. May include
strings such as 'sat' or 'june', specific dates (with optional
format string) such as '2011-08-22@yyyy-MM-dd' or integers
(which get interpreted differently depending on the periodicity)dateFormat - a default date format to use for parsing datesException - if an entry in the list is unparsable or unrecognizedpublic double deltaTime()
public void setDeltaTime(double deltaTime)
deltaTime - the delta time to usepublic long getDateTimeStampInitial()
throws Exception
Exception - if the periodicity being managed is not date
timestamp-basedpublic void setDateTimeStampInitial(long tsbase)
tsbase - the first date time stamp value in the batch training data
as a long (num milliseconds since epoch)public long getDateTimeStampFinal()
throws Exception
Exception - if the periodicity being managed is not date
timestamp-basedpublic void setDateTimeStampFinal(long tsfinal)
tsfinal - the last date timestamp value in the batch training data
as a long (num milliseconds since the epoch).public void setIsDateBased(boolean isDateBased)
isDateBased - true if the periodicity being managed is date
timestamp-basedpublic boolean isDateBased()
public boolean dateInSkipList(Date toCheck)
toCheck - the date to checkpublic weka.core.Instance remapDateTimeStamp(weka.core.Instance inst,
weka.core.Instance previous,
String timeStampName)
throws Exception
inst - the instance containing a date timestamp to be remappedprevious - the immediately previous instance in the sequence (may be
null).timeStampName - the name of the timestamp attributeException - if an error occursCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.