MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.param.tft.DataTemporalParameter Class Reference

Specifies the parameters for the DataTemporalLayer (used in TFT models).
More...

Inheritance diagram for MyCaffe.param.tft.DataTemporalParameter:
MyCaffe.param.LayerParameterBase MyCaffe.basecode.BaseParameter MyCaffe.basecode.IBinaryPersist

Public Types

enum  SOURCE_TYPE { PATH_NPY_FILE , SQL_DB }
 Defines the type of source data. More...
 
- Public Types inherited from MyCaffe.param.LayerParameterBase
enum  LABEL_TYPE { NONE , SINGLE , MULTIPLE , ONLY_ONE }
 Defines the label type. More...
 

Public Member Functions

 DataTemporalParameter ()
 Constructor for the parameter. More...
 
override object Load (System.IO.BinaryReader br, bool bNewInstance=true)
 Load the parameter from a binary reader. More...
 
override void Copy (LayerParameterBase src)
 Copy on parameter to another. More...
 
override LayerParameterBase Clone ()
 Creates a new copy of this instance of the parameter. More...
 
override RawProto ToProto (string strName)
 Convert the parameter into a RawProto. More...
 
- Public Member Functions inherited from MyCaffe.param.LayerParameterBase
 LayerParameterBase ()
 Constructor for the parameter. More...
 
virtual string PrepareRunModelInputs ()
 This method gives derivative classes a chance specify model inputs required by the run model. More...
 
virtual void PrepareRunModel (LayerParameter p)
 This method gives derivative classes a chance to prepare the layer for a run-model. More...
 
void Save (BinaryWriter bw)
 Save this parameter to a binary writer. More...
 
abstract object Load (BinaryReader br, bool bNewInstance=true)
 Load the parameter from a binary reader. More...
 
- Public Member Functions inherited from MyCaffe.basecode.BaseParameter
 BaseParameter ()
 Constructor for the parameter. More...
 
virtual bool Compare (BaseParameter p)
 Compare this parameter to another parameter. More...
 

Static Public Member Functions

static DataTemporalParameter FromProto (RawProto rp)
 Parses the parameter from a RawProto. More...
 
- Static Public Member Functions inherited from MyCaffe.basecode.BaseParameter
static double ParseDouble (string strVal)
 Parse double values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static bool TryParse (string strVal, out double df)
 Parse double values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static float ParseFloat (string strVal)
 Parse float values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 
static bool TryParse (string strVal, out float f)
 Parse doufloatble values using the US culture if the decimal separator = '.', then using the native culture, and if then lastly trying the US culture to handle prototypes containing '.' as the separator, yet parsed in a culture that does not use '.' as a decimal. More...
 

Properties

bool enable_debug_output [getset]
 Optionally, specifies to output debug information (slower) on each pass. More...
 
string debug_output_path [getset]
 Specifies the debug output path where debug images are placed when enable_debug_output = true. More...
 
bool output_target_historical [getset]
 Optionally, specifies to output a top containing the target historical data. More...
 
Phaseforced_phase [getset]
 Optionally, specifies the phase to use when loading data. More...
 
bool shuffle_data [getset]
 Specifies to randomly select from the data (default = true). More...
 
uint chunk_count [getset]
 Specifies the number of items to load per cycle when background loading (default = 1024). More...
 
uint? seed [getset]
 Specifies the random seed used to shuffle the data. When not specified, the default seed is used. More...
 
double max_load_percent [getset]
 Specifies the maximum percent of data rows to load (default = 1.0 = 100%). More...
 
int drip_refresh_rate_in_sec [getset]
 Specifies rate the drip refresh occurs in seconds (default = 0, disabled). More...
 
SOURCE_TYPE source_type [getset]
 Specifies the type of source data. More...
 
string source [getset]
 Specifies the data source.
More...
 
virtual uint batch_size [getset]
 Specifies the batch size of the data. More...
 
uint num_historical_steps [getset]
 Specifies the number of historical steps More...
 
uint num_future_steps [getset]
 Specifies the number of future steps More...
 

Detailed Description

Specifies the parameters for the DataTemporalLayer (used in TFT models).

See also
Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting by Bryan Lim, Sercan O. Arik, Nicolas Loeff, and Tomas Pfister, 2019, arXiv 1912.09363
Github - PlaytikaOSS/tft-torch by Playtika Research, 2021.

Definition at line 19 of file DataTemporalParameter.cs.

Member Enumeration Documentation

◆ SOURCE_TYPE

Defines the type of source data.

Enumerator
PATH_NPY_FILE 

Specifies the source is a path to a set of *.npy files where a npy file exists for the following: name_[type]_schema.xml - schema data for the data set files. [type]_known_num.npy - known numeric data (used in past and future) [type]_known_cat.npy - known categorical data (used in past and future) [type]_observed_num.npy - observed numeric data (used in past and one used for target) [type]_observed_cat.npy - observed categorical data (used in past) [type]_static_num.npy - static numeric data (used in static) [type]_static_cat.npy - static categorical data (used in static) Where 'type' = 'test', 'train' or 'validation'

All data files contain data streams for time and category ID and all data streams are in the same order: category ID, field, time and contain 'float' types. The schema.xml file defines the fields contained within each file as well as the target field within the observed_num.npy file. In addition, the schema.xml file contains lookup tables for all categorical data and for the the category ID.
For the category ID, the lookup table also contains the start and end index of valid data in each data stream. If one of the npy files above does not exist, not data for that class of data exists. NOTE: TIME and ID fields are only used for reference and debugging and are not used as input data.

SQL_DB 

Specifies the source path is the name of a data source within the SQL (or SQL Express) database.

Definition at line 39 of file DataTemporalParameter.cs.

Constructor & Destructor Documentation

◆ DataTemporalParameter()

MyCaffe.param.tft.DataTemporalParameter.DataTemporalParameter ( )

Constructor for the parameter.

Definition at line 68 of file DataTemporalParameter.cs.

Member Function Documentation

◆ Clone()

override LayerParameterBase MyCaffe.param.tft.DataTemporalParameter.Clone ( )
virtual

Creates a new copy of this instance of the parameter.

Returns
A new instance of this parameter is returned.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 256 of file DataTemporalParameter.cs.

◆ Copy()

override void MyCaffe.param.tft.DataTemporalParameter.Copy ( LayerParameterBase  src)
virtual

Copy on parameter to another.

Parameters
srcSpecifies the parameter to copy.

Implements MyCaffe.param.LayerParameterBase.

Definition at line 232 of file DataTemporalParameter.cs.

◆ FromProto()

static DataTemporalParameter MyCaffe.param.tft.DataTemporalParameter.FromProto ( RawProto  rp)
static

Parses the parameter from a RawProto.

Parameters
rpSpecifies the RawProto to parse.
Returns
A new instance of the parameter is returned.

Definition at line 302 of file DataTemporalParameter.cs.

◆ Load()

override object MyCaffe.param.tft.DataTemporalParameter.Load ( System.IO.BinaryReader  br,
bool  bNewInstance = true 
)

Load the parameter from a binary reader.

Parameters
brSpecifies the binary reader.
bNewInstanceWhen true a new instance is created (the default), otherwise the existing instance is loaded from the binary reader.
Returns
Returns an instance of the parameter.

Definition at line 220 of file DataTemporalParameter.cs.

◆ ToProto()

override RawProto MyCaffe.param.tft.DataTemporalParameter.ToProto ( string  strName)
virtual

Convert the parameter into a RawProto.

Parameters
strNameSpecifies the name to associate with the RawProto.
Returns
The new RawProto is returned.

Implements MyCaffe.basecode.BaseParameter.

Definition at line 268 of file DataTemporalParameter.cs.

Property Documentation

◆ batch_size

virtual uint MyCaffe.param.tft.DataTemporalParameter.batch_size
getset

Specifies the batch size of the data.

Definition at line 193 of file DataTemporalParameter.cs.

◆ chunk_count

uint MyCaffe.param.tft.DataTemporalParameter.chunk_count
getset

Specifies the number of items to load per cycle when background loading (default = 1024).

Note the chunk count must be larger than the batch size.

Definition at line 130 of file DataTemporalParameter.cs.

◆ debug_output_path

string MyCaffe.param.tft.DataTemporalParameter.debug_output_path
getset

Specifies the debug output path where debug images are placed when enable_debug_output = true.

Definition at line 87 of file DataTemporalParameter.cs.

◆ drip_refresh_rate_in_sec

int MyCaffe.param.tft.DataTemporalParameter.drip_refresh_rate_in_sec
getset

Specifies rate the drip refresh occurs in seconds (default = 0, disabled).

Definition at line 160 of file DataTemporalParameter.cs.

◆ enable_debug_output

bool MyCaffe.param.tft.DataTemporalParameter.enable_debug_output
getset

Optionally, specifies to output debug information (slower) on each pass.

When true, the 'debug_output_path' must be specified.

Definition at line 78 of file DataTemporalParameter.cs.

◆ forced_phase

Phase? MyCaffe.param.tft.DataTemporalParameter.forced_phase
getset

Optionally, specifies the phase to use when loading data.

Definition at line 107 of file DataTemporalParameter.cs.

◆ max_load_percent

double MyCaffe.param.tft.DataTemporalParameter.max_load_percent
getset

Specifies the maximum percent of data rows to load (default = 1.0 = 100%).

Definition at line 150 of file DataTemporalParameter.cs.

◆ num_future_steps

uint MyCaffe.param.tft.DataTemporalParameter.num_future_steps
getset

Specifies the number of future steps

Definition at line 213 of file DataTemporalParameter.cs.

◆ num_historical_steps

uint MyCaffe.param.tft.DataTemporalParameter.num_historical_steps
getset

Specifies the number of historical steps

Definition at line 203 of file DataTemporalParameter.cs.

◆ output_target_historical

bool MyCaffe.param.tft.DataTemporalParameter.output_target_historical
getset

Optionally, specifies to output a top containing the target historical data.

Definition at line 97 of file DataTemporalParameter.cs.

◆ seed

uint? MyCaffe.param.tft.DataTemporalParameter.seed
getset

Specifies the random seed used to shuffle the data. When not specified, the default seed is used.

Definition at line 140 of file DataTemporalParameter.cs.

◆ shuffle_data

bool MyCaffe.param.tft.DataTemporalParameter.shuffle_data
getset

Specifies to randomly select from the data (default = true).

Definition at line 117 of file DataTemporalParameter.cs.

◆ source

string MyCaffe.param.tft.DataTemporalParameter.source
getset

Specifies the data source.

When the source type is equal to PATH_NPY_FILE, the 'source' value is a path pointing the data *.npy data files.

Definition at line 183 of file DataTemporalParameter.cs.

◆ source_type

SOURCE_TYPE MyCaffe.param.tft.DataTemporalParameter.source_type
getset

Specifies the type of source data.

Definition at line 170 of file DataTemporalParameter.cs.


The documentation for this class was generated from the following file: