MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The MyCaffeStreamDatabase provides a streaming data input source to MyCaffe gyms used as input for dynamic, reinforcement learning. More...
Public Member Functions | |
MyCaffeStreamDatabase (Log log) | |
The constructor. More... | |
MyCaffeStreamDatabase (IContainer container) | |
The constructor. More... | |
void | Initialize (QUERY_TYPE qt, string strSchema) |
The Initialize method initializes the streaming database component, preparing it for data queries. More... | |
void | Shutdown () |
Shutdonw the streaming database. More... | |
void | AddDirectQuery (IXCustomQuery iqry) |
Add a custom query directly to the streaming database. More... | |
SimpleDatum | Query (int nWait) |
Query the next data in the streaming database. More... | |
int[] | QuerySize () |
Returns the query size of the data in the form: [0] = channels [1] = height [2] = width. More... | |
Dictionary< string, float > | QueryInfo () |
The Query information returns information about the data queried such as header information. More... | |
void | Reset (int nStartOffset=0) |
Reset the query to the start date used in Initialize, optionally with an offset from the start. More... | |
byte[] | ConvertOutput (float[] rg, out string type) |
Converts the output values into the native type used by the first CustomQuery. More... | |
Public Member Functions inherited from System.ComponentModel.Component | |
Component () | |
The MyCaffeStreamDatabase provides a streaming data input source to MyCaffe gyms used as input for dynamic, reinforcement learning.
Definition at line 19 of file MyCaffeStreamDatabase.cs.
MyCaffe.db.stream.MyCaffeStreamDatabase.MyCaffeStreamDatabase | ( | Log | log | ) |
The constructor.
log | Specifies the output log. |
Definition at line 29 of file MyCaffeStreamDatabase.cs.
MyCaffe.db.stream.MyCaffeStreamDatabase.MyCaffeStreamDatabase | ( | IContainer | container | ) |
The constructor.
container | Specifies the container. |
Definition at line 39 of file MyCaffeStreamDatabase.cs.
void MyCaffe.db.stream.MyCaffeStreamDatabase.AddDirectQuery | ( | IXCustomQuery | iqry | ) |
Add a custom query directly to the streaming database.
By default, the streaming database looks in the
folder relative to the streaming database assembly to look for CustomQuery DLL's that implement the IXCustomQuery interface. When found, these assemblies are added to the list accessible via the schema. Alternatively, custom queries may be added directly using this method.
iqry | Specifies the custom query to add. |
Definition at line 121 of file MyCaffeStreamDatabase.cs.
byte[] MyCaffe.db.stream.MyCaffeStreamDatabase.ConvertOutput | ( | float[] | rg, |
out string | type | ||
) |
Converts the output values into the native type used by the first CustomQuery.
rg | Specifies the raw output data. |
type | Returns the output type. |
Definition at line 177 of file MyCaffeStreamDatabase.cs.
void MyCaffe.db.stream.MyCaffeStreamDatabase.Initialize | ( | QUERY_TYPE | qt, |
string | strSchema | ||
) |
The Initialize method initializes the streaming database component, preparing it for data queries.
qt | Specifies the query type to use (see remarks). |
strSchema | Specifies the query schema to use. |
Additional settings for each query type are specified in the 'strSettings' parameter as a set of key=value pairs for each of the settings. The following are the query specific settings that are expected for each QUERY_TYPE.
qt = TIME: 'QueryCount' - Specifies the number of items to include in each query. 'Start' - Specifies the start date of the stream. 'TimeSpanInMs' - Specifies the time increment between data items in the stream in milliseconds. 'SegmentSize' - Specifies the segment size of data queried from the database. 'MaxCount' - Specifies the maximum number of items to load into memory for each custom query.
qt = GENERAL: none at this time.
The database schema defines the number of custom queries to use along with their names. A simple key=value; list defines the streaming database schema using the following format:
"ConnectionCount=2; Connection0_CustomQueryName=Test1; Connection0_CustomQueryParam=param_string1 Connection1_CustomQueryName=Test2; Connection1_CustomQueryParam=param_string2"
Each param_string specifies the parameters of the custom query and may include the database connection string, database table, and database fields to query.
Implements MyCaffe.db.stream.IXStreamDatabase.
Definition at line 83 of file MyCaffeStreamDatabase.cs.
SimpleDatum MyCaffe.db.stream.MyCaffeStreamDatabase.Query | ( | int | nWait | ) |
Query the next data in the streaming database.
nWait | Specfies the maximum amount of time (in ms.) to wait for data. |
Implements MyCaffe.db.stream.IXStreamDatabase.
Definition at line 131 of file MyCaffeStreamDatabase.cs.
Dictionary< string, float > MyCaffe.db.stream.MyCaffeStreamDatabase.QueryInfo | ( | ) |
The Query information returns information about the data queried such as header information.
Implements MyCaffe.db.stream.IXStreamDatabase.
Definition at line 157 of file MyCaffeStreamDatabase.cs.
int[] MyCaffe.db.stream.MyCaffeStreamDatabase.QuerySize | ( | ) |
Returns the query size of the data in the form: [0] = channels [1] = height [2] = width.
Implements MyCaffe.db.stream.IXStreamDatabase.
Definition at line 143 of file MyCaffeStreamDatabase.cs.
void MyCaffe.db.stream.MyCaffeStreamDatabase.Reset | ( | int | nStartOffset = 0 | ) |
Reset the query to the start date used in Initialize, optionally with an offset from the start.
nStartOffset | Optionally, specifies the offset from the start to use (default = 0). |
Implements MyCaffe.db.stream.IXStreamDatabase.
Definition at line 166 of file MyCaffeStreamDatabase.cs.
void MyCaffe.db.stream.MyCaffeStreamDatabase.Shutdown | ( | ) |
Shutdonw the streaming database.
Implements MyCaffe.db.stream.IXStreamDatabase.
Definition at line 105 of file MyCaffeStreamDatabase.cs.