MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.descriptors.ResultDescriptor Class Reference

The ResultDescriptor class describes the results of a run. More...

Inheritance diagram for MyCaffe.basecode.descriptors.ResultDescriptor:
MyCaffe.basecode.descriptors.BaseDescriptor

Public Member Functions

 ResultDescriptor (int nID, string strName, string strOwner, int nIdx, int nLabel, int nResultCount, byte[] rgResults, int nSrcId, DateTime dt)
 The ResultDescriptor constructor. More...
 
override string ToString ()
 Creates the string representation of the descriptor. More...
 
- Public Member Functions inherited from MyCaffe.basecode.descriptors.BaseDescriptor
 BaseDescriptor (int nID, string strName, string strOwner)
 The BaseDescriptor constructor. More...
 
 BaseDescriptor (BaseDescriptor b)
 The BaseDescriptor constructor. More...
 
void Copy (BaseDescriptor b)
 Copy another BaseDescriptor into this one. More...
 

Static Public Member Functions

static byte[] CreateResults (List< Result > rgResults, bool bInvert)
 The CreateResults function converts the list of (int nLabel, double dfResult) pairs into a array of bytes. More...
 
static List< ResultGetResults (byte[] rgData)
 Extract the results from the binary data. More...
 
static List< ResultGetResults (BinaryReader br)
 Extract the results from the binary data. More...
 
static byte[] CreateResults (List< Tuple< SimpleDatum, List< Result > > > rgrgResults)
 The CreateResults function converts the batch of lists of (int nLabel, double dfResult) pairs into a array of bytes. More...
 
static List< Tuple< SimpleDatum, List< Result > > > GetResults (int nBatchCount, byte[] rgData)
 Extracts the raw image result batch from the result binary data. More...
 

Properties

int Index [get]
 Returns the index of the results. More...
 
int Label [get]
 Returns the expected label of the result. More...
 
int ResultCount [get]
 Returns the number of items (classes) participating in the results. More...
 
List< KeyValuePair< int, double > > Results [get]
 Returns the raw result data that is converted into the full list of (int nLabel, double dfResult) pairs from the run. More...
 
int SourceID [get]
 Returns the data source ID. More...
 
DateTime TimeStamp [get]
 Returns the time-stamp of the result. More...
 
- Properties inherited from MyCaffe.basecode.descriptors.BaseDescriptor
int ID [getset]
 Get/set the database ID of the item. More...
 
string Name [getset]
 Get/set the name of the item. More...
 
string Owner [getset]
 Get/set the owner of the item. More...
 

Detailed Description

The ResultDescriptor class describes the results of a run.

Definition at line 14 of file ResultDescriptor.cs.

Constructor & Destructor Documentation

◆ ResultDescriptor()

MyCaffe.basecode.descriptors.ResultDescriptor.ResultDescriptor ( int  nID,
string  strName,
string  strOwner,
int  nIdx,
int  nLabel,
int  nResultCount,
byte[]  rgResults,
int  nSrcId,
DateTime  dt 
)

The ResultDescriptor constructor.

Parameters
nIDSpecifies the database ID of the item.
strNameSpecifies the name of the item.
strOwnerSpecifies the identifier of the item's owner.
nIdxSpecifies the index of the results.
nLabelSpecifies the expected label of the result.
nResultCountSpecifies the number of items (classes) participating in the results.
rgResultsSpecifies the raw result data that is converted into the full list of (int nLabel, double dfResult) pairs from the run.
nSrcIdSpecifiesthe data source ID.
dtSpecifies the Timestamp of the result.

Definition at line 34 of file ResultDescriptor.cs.

Member Function Documentation

◆ CreateResults() [1/2]

static byte[] MyCaffe.basecode.descriptors.ResultDescriptor.CreateResults ( List< Result rgResults,
bool  bInvert 
)
static

The CreateResults function converts the list of (int nLabel, double dfResult) pairs into a array of bytes.

Parameters
rgResultsSpecifies the list of (int nLabel, double dfResult) result data.
bInvertSpecifies whether or not to invert the value by subtracting it from the maximum value within the result pairs.
Returns
A byte array containing the result data is returned.

Definition at line 98 of file ResultDescriptor.cs.

◆ CreateResults() [2/2]

static byte[] MyCaffe.basecode.descriptors.ResultDescriptor.CreateResults ( List< Tuple< SimpleDatum, List< Result > > >  rgrgResults)
static

The CreateResults function converts the batch of lists of (int nLabel, double dfResult) pairs into a array of bytes.

Parameters
rgrgResultsSpecifies the batch of lists of (int nLabel, double dfResult) result data.
Returns
A byte array containing the result data is returned.

Definition at line 182 of file ResultDescriptor.cs.

◆ GetResults() [1/3]

static List< Result > MyCaffe.basecode.descriptors.ResultDescriptor.GetResults ( BinaryReader  br)
static

Extract the results from the binary data.

Parameters
brSpecifies the binary reader.
Returns
The list of results is returned.

Definition at line 159 of file ResultDescriptor.cs.

◆ GetResults() [2/3]

static List< Result > MyCaffe.basecode.descriptors.ResultDescriptor.GetResults ( byte[]  rgData)
static

Extract the results from the binary data.

Parameters
rgDataSpecifies the binary data holding the results.
Returns
The list of results is returned.

Definition at line 143 of file ResultDescriptor.cs.

◆ GetResults() [3/3]

static List< Tuple< SimpleDatum, List< Result > > > MyCaffe.basecode.descriptors.ResultDescriptor.GetResults ( int  nBatchCount,
byte[]  rgData 
)
static

Extracts the raw image result batch from the result binary data.

Parameters
nBatchCountSpecifies the number of results in the batch.
rgDataSpecifies the binary batch data.
Returns
An array of tuples containing SimpleDatum/Result pairs is returned.

Definition at line 208 of file ResultDescriptor.cs.

◆ ToString()

override string MyCaffe.basecode.descriptors.ResultDescriptor.ToString ( )

Creates the string representation of the descriptor.

Returns
The string representation of the descriptor is returned.

Definition at line 264 of file ResultDescriptor.cs.

Property Documentation

◆ Index

int MyCaffe.basecode.descriptors.ResultDescriptor.Index
get

Returns the index of the results.

Definition at line 47 of file ResultDescriptor.cs.

◆ Label

int MyCaffe.basecode.descriptors.ResultDescriptor.Label
get

Returns the expected label of the result.

Definition at line 55 of file ResultDescriptor.cs.

◆ ResultCount

int MyCaffe.basecode.descriptors.ResultDescriptor.ResultCount
get

Returns the number of items (classes) participating in the results.

Definition at line 63 of file ResultDescriptor.cs.

◆ Results

List<KeyValuePair<int, double> > MyCaffe.basecode.descriptors.ResultDescriptor.Results
get

Returns the raw result data that is converted into the full list of (int nLabel, double dfResult) pairs from the run.

Definition at line 71 of file ResultDescriptor.cs.

◆ SourceID

int MyCaffe.basecode.descriptors.ResultDescriptor.SourceID
get

Returns the data source ID.

Definition at line 79 of file ResultDescriptor.cs.

◆ TimeStamp

DateTime MyCaffe.basecode.descriptors.ResultDescriptor.TimeStamp
get

Returns the time-stamp of the result.

Definition at line 87 of file ResultDescriptor.cs.


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