IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.SampledDataSet Class Reference

Sampled data consisting of elements of which each contains vector of input parameters and output values. More...

Classes

class  ComparerInputDistance
 Comparer that compares two data elements of type SampledDataElement according to the distance of their input parameter vectors to a specified reference point (vector) in the input parameter space. More...
 
class  ComparerOutputDistance
 Comparer that compares two data elements of type SampledDataElement according to the distance of their output values vectors to a specified reference point (vector) in the output values space. More...
 

Public Member Functions

 SampledDataSet ()
 
 SampledDataSet (int inputLength, int outputLength)
 
List< SampledDataElementGetElementList ()
 
void UpdateElementIndices ()
 Updates indices of sampled data elements contained in the current sampled set in such a way that they correspond with their (current) sequential position in the set. More...
 
List< SampledDataElementGetElementListCopy ()
 Returna a copy of the list of data elements. More...
 
List< SampledDataElementGetSortedElemetnList (IComparer< SampledDataElement > comparer)
 Creates and returns a list of all sampled data elemets of the current object that are sorted according to the specified comparer object (that implements the IComparer{SampledDataElement} interface). More...
 
List< SampledDataElementGetInputDistanceSortedElemetnList (IVector referencePoint, DistanceDelegate distanceFunction)
 Creates and returns a list of all sampled data elemets of the current object that are sorted according to distance between input parameters and a specified reference point. More...
 
List< SampledDataElementGetOutputDistanceSortedElemetnList (IVector referencePoint, DistanceDelegate distanceFunction)
 Creates and returns a list of all sampled data elemets of the current object that are sorted according to distance between output values and a specified reference point in the output values space. More...
 
virtual void Clear ()
 
void AddElement (SampledDataElement element)
 Adda a new element to sampled data. More...
 
void Add (SampledDataSet addedSet)
 Adds elements of another sampled data ser to the current sampled data. Only references are copied. More...
 
void Add (params SampledDataElement[] addedSet)
 Adds array of sampled data elements to teh current sampled data set. Only references are copied. More...
 
IVector GetInputParameters (int which)
 Returns the vector of input parameters of the specified element of the sampled data set. More...
 
void SetInputParameters (int which, IVector parameters)
 Sets the vector of input parameters of the specified element of the sampled data set. More...
 
virtual IVector GetOutputValues (int which)
 Returns the vector of output values of the specified element of the sampled data set. More...
 
void SetOutputValues (int which, IVector values)
 Sets the vector of output values of the specified element of the sampled data set. More...
 
void GetInputRange (ref IBoundingBox bounds)
 Calculates range of input parameters of the current sampled data set, and stores it to the specified bounding box. More...
 
void GetOutputRange (ref IBoundingBox bounds)
 Calculates range of output values of the current sampled data set, and stores it to the specified bounding box. More...
 
void ExtractInputs (ref IVector[] extracted)
 Extracts vectors of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). More...
 
void ExtractInputs (IndexList filterIndices, ref IVector[] extracted)
 Extracts the specified vectors of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors to extract (i.e. which data elements to exclude). More...
 
void ExtractInputsComplement (IndexList filterIndices, ref IVector[] extracted)
 Extracts the specified vectors (complement of the index list) of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors NOT to extract (i.e. which data elements to include). More...
 
void ExtractOutputs (ref IVector[] extracted)
 Extracts vectors of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). More...
 
void ExtractOutputs (IndexList filterIndices, ref IVector[] extracted)
 Extracts the specified vectors of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors to extract (i.e. which data elements to exclude). More...
 
void ExtractOutputsComplement (IndexList filterIndices, ref IVector[] extracted)
 Extracts the specified vectors (complement of the index list) of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors NOT to extract (i.e. which data elements to include). More...
 
void CopyInputs (ref IVector[] extracted)
 Copies vectors of input parameters from the current sampled data set, and stores them to the specified array. References of the extracted vectors aer stored (no deep copying performed). More...
 
void CopyInputs (IndexList filterIndices, ref IVector[] extracted)
 Copies the specified vectors of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors to extract (i.e. which sampled elements to exclude). More...
 
void CopyInputsComplement (IndexList filterIndices, ref IVector[] extracted)
 Copies the specified vectors (complement of the index list) of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors NOT to extract (i.e. which data elements to include). More...
 
void CopyOutputs (ref IVector[] extracted)
 Copies vectors of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). More...
 
void CopyOutputs (IndexList filterIndices, ref IVector[] extracted)
 Copies the specified vectors of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors to extract (i.e. which data elements to exclude). More...
 
void CopyOutputsComplement (IndexList filterIndices, ref IVector[] extracted)
 Copies the specified vectors (complement of the index list) of output values from the current data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors NOT to extract (i.e. which sampled data elements to include). More...
 
void ExtractFilteredData (IndexList filterIndices, ref IVector[] extracted, bool complement, bool outputData, bool copyValues)
 Extract extracts. More...
 
int GetNumNullElemets ()
 Returns number of null elements of the current sampled data set. More...
 
int GetNumInputDuplicates ()
 Returns number of elements of the current sampled data set with duplicated input parameters. More...
 
void RemoveInputDuplicates ()
 Removes elements with duplibated input parameters from the current sampled data set, leaving only a single element with specified input parameters. Elements that are null are also removed. More...
 
delegate double DistanceDelegate (IVector v1, IVector v2)
 
override string ToString ()
 

Static Public Member Functions

static void SaveBinary (SampledDataSet sampledData, string filePath)
 Saves the specified sempled data to the specified file in binary format. The file is owerwritten if it exists. More...
 
static void LoadBinary (string filePath, ref SampledDataSet dataDefRestored)
 Restores sampled data from the specified file in binary format. More...
 
static void SaveJson (SampledDataSet sampledData, string filePath)
 Saves the specified sempled data to the specified JSON file. The file is owerwritten if it exists. More...
 
static void LoadJson (string filePath, ref SampledDataSet dataDefRestored)
 Restores sampled data from the specified file in JSON format. More...
 
static void LoadSampledDataCombinedOutputsJSON (ref SampledDataSet sampledDat, string directoryPath, params string[] fileNames)
 Loads sampled data and Definition data from multible CSV files. Sampled data consist of one output and multiple input parameters. Input parameters are the same in all files, output parameter are different. More...
 
static void LoadSampledDataCombinedOutputsJSON (ref SampledDataSet sampledData, params string[] fileNames)
 Loads sampled data and Definition data from multiple CSV files. Sampled data consist of one output and multiple input parameters. Input parameters are the same in all files but output parameter should be different. More...
 
static void SaveSampledDataJson (string filePath, SampledDataSet sampledData)
 Saves network's sampled data to the specified JSON file. File is owerwritten if it exists. More...
 
static void SaveDefinitionDataJson (string filePath, InputOutputDataDefiniton definitionData)
 Saves network's definition data to the specified JSON file. File is owerwritten if it exists. More...
 
static void LoadSampledDataJson (string filePath, ref SampledDataSet sampledData)
 Restores sampled data from the specified file in JSON format. More...
 
static void LoadSampledDataCSVinOneLine (string filePath, int inputLenght, int outputLenght, bool namesSpecified, bool descriptionSpecified, bool titleSpecified, ref SampledDataSet sampledData, ref InputOutputDataDefiniton definitionData)
 Loads sampled data and definition data from single CSV file. More...
 
static void LoadSampledDataCSV (string filePath, int inputLenght, int outputLenght, bool namesSpecified, bool titleSpecified, bool descriptionSpecified, ref SampledDataSet sampledData, ref InputOutputDataDefiniton definitionData)
 Loads sampled data and definition data from single CSV file. More...
 
static void LoadDefinitionDataCSV (string filePath, int inputLenght, int outputLenght, ref InputOutputDataDefiniton definitionData)
 Loads definition data from CSV file. More...
 
static void SaveSampledDataCSVinOneLine (string filePath, SampledDataSet sampledData, bool namesSpecified, bool titleSpecified, bool descriptionSpecified, InputOutputDataDefiniton definitionData)
 Saves sampled data and Definition data to single CSV file. More...
 
static void SaveSampledDataCSV (string filePath, SampledDataSet sampledData, bool namesSpecified, bool titlesSpecified, bool descriptionSpecified, InputOutputDataDefiniton definitionData)
 Saves sampled data and Definition data to single CSV file. More...
 
static void SaveDefinitionDataCSV (string filePath, InputOutputDataDefiniton definitionData)
 Saves definition data to CSV file. More...
 
static void SampledDataCombineOutputs (ref SampledDataSet result, params SampledDataSet[] individualSets)
 Loads sampled data and Definition data from multible CSV files. Sampled data consist of one output and multiple input parameters. Input parameters are the same in all files, output parameter are different. More...
 
static int GetNumNullElemets (SampledDataSet sampledDataSet)
 Returns number of null elements of the specified sampled data set. More...
 
static int GetNumInputDuplicates (SampledDataSet sampledSet)
 Returns the number of elements of the specified sampled data set with duplicated input parameters. More...
 
static void RemoveInputDuplicates (SampledDataSet sampledSet)
 Removes elements with duplicated input parameters, leaving only a single element with specified input parameters. Elements that are null are also removed. More...
 
static SampledDataSet CreateExampleLinear (int inputLength, int outputLength, int numElements)
 Craates and returns a sample data set object where input parameters are calculated randomly in a box-like domain, and output parameters are calculated by quadratic functions with random coefficients. Domain where sampling points are generated is a cartesian product of intervals [-1, 1]. More...
 
static SampledDataSet CreateExampleLinear (int inputLength, int outputLength, int numElements, IBoundingBox region)
 Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by quadratic functions with random coefficients. More...
 
static SampledDataSet CreateExampleLinear (int inputLength, int outputLength, int numElements, IBoundingBox region, IRandomGenerator rand)
 Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by quadratic functions with random coefficients. More...
 
static SampledDataSet CreateExampleQuadratic (int inputLength, int outputLength, int numElements)
 Craates and returns a sample data set object where input parameters are calculated randomly in a box-like domain, and output parameters are calculated by quadratic functions with random coefficients. Domain where sampling points are generated is a cartesian product of intervals [-1, 1]. More...
 
static SampledDataSet CreateExampleQuadratic (int inputLength, int outputLength, int numElements, IBoundingBox region)
 Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by quadratic functions with random coefficients. More...
 
static SampledDataSet CreateExampleQuadratic (int inputLength, int outputLength, int numElements, IBoundingBox region, IRandomGenerator rand)
 Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by quadratic functions with random coefficients. More...
 
static SampledDataSet CreateExample (int inputLength, int outputLength, int numElements, IBoundingBox region, IScalarFunctionUntransformed[] functions, IRandomGenerator rand)
 Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by the specified scalar functions. More...
 
static SampledDataSet CreateExampleSimple (int inputLength, int outputLength, int numElements)
 Craates and returns a sample object of the encompassing class. More...
 

Protected Attributes

int _inputLength = -1
 
int _outputLength = -1
 

Properties

SampledDataElement[] Data [get, set]
 Gets or sets sampled data, as an array of data elements. More...
 
int Length [get]
 Gets the number of sampled data elements (input/output pairs) contained by the current sampled data set. More...
 
int InputLength [get, set]
 Number of input parameters in sampled data elements. Less than 0 means unspecified. More...
 
int OutputLength [get, set]
 Number of output values in sampled data elements. Less than 0 means unspecified. More...
 
SampledDataElement this[int which] [get, set]
 Gets or sets specific data element. More...
 

Detailed Description

Sampled data consisting of elements of which each contains vector of input parameters and output values.

NOT thread safe.

$A Igor Jun08;

Constructor & Destructor Documentation

IG.Num.SampledDataSet.SampledDataSet ( )
inline
IG.Num.SampledDataSet.SampledDataSet ( int  inputLength,
int  outputLength 
)
inline

Member Function Documentation

List<SampledDataElement> IG.Num.SampledDataSet.GetElementList ( )
inline
void IG.Num.SampledDataSet.UpdateElementIndices ( )
inline

Updates indices of sampled data elements contained in the current sampled set in such a way that they correspond with their (current) sequential position in the set.

In this way, element indices can be used to directly access sampled data elements (without a search).

References IG.Num.SampledDataElement.UpdateElemetIndices().

List<SampledDataElement> IG.Num.SampledDataSet.GetElementListCopy ( )
inline

Returna a copy of the list of data elements.

WARNING:

List returned is a copy of the internal list, therefore changes performed on the list are not reflected on internal state of the data set object, but changes performed on its elements are.

List<SampledDataElement> IG.Num.SampledDataSet.GetSortedElemetnList ( IComparer< SampledDataElement comparer)
inline

Creates and returns a list of all sampled data elemets of the current object that are sorted according to the specified comparer object (that implements the IComparer{SampledDataElement} interface).

Parameters
comparerComparer that is used for sorting the returned list.
List<SampledDataElement> IG.Num.SampledDataSet.GetInputDistanceSortedElemetnList ( IVector  referencePoint,
DistanceDelegate  distanceFunction 
)
inline

Creates and returns a list of all sampled data elemets of the current object that are sorted according to distance between input parameters and a specified reference point.

Parameters
referencePointReference point, sampled data elements are sorted according to the distance to this point.
distanceFunctionDelegate that definines distance between two vectors for the purpose of sorting.
List<SampledDataElement> IG.Num.SampledDataSet.GetOutputDistanceSortedElemetnList ( IVector  referencePoint,
DistanceDelegate  distanceFunction 
)
inline

Creates and returns a list of all sampled data elemets of the current object that are sorted according to distance between output values and a specified reference point in the output values space.

Parameters
referencePointReference point, sampled data elements are sorted according to the distance to this point.
distanceFunctionDelegate that definines distance between two vectors for the purpose of sorting.
virtual void IG.Num.SampledDataSet.Clear ( )
inlinevirtual
void IG.Num.SampledDataSet.AddElement ( SampledDataElement  element)
inline

Adda a new element to sampled data.

Parameters
elementData element that is added to the sampled data set. If element is null then nothing is added (but no exception thrown).

References IG.Num.SampledDataElement.InputLength, and IG.Num.SampledDataElement.OutputLength.

Referenced by IG.Num.SampledDataSet.CreateExample(), IG.Num.SampledDataSet.CreateExampleSimple(), IG.Script.LoadableScriptShellNeuralBase.ParSimAddResults(), and IG.Script.LoadableScriptShellNeuralBase.ParSimRunJob().

void IG.Num.SampledDataSet.Add ( SampledDataSet  addedSet)
inline

Adds elements of another sampled data ser to the current sampled data. Only references are copied.

Parameters
addedSetSampled data whose elements are added to the current sampled data.

References IG.Num.SampledDataSet.Length.

Referenced by IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData(), and IG.Num.NeuralApproximatorBase.SetTrainingAndVerificationData().

void IG.Num.SampledDataSet.Add ( params SampledDataElement[]  addedSet)
inline

Adds array of sampled data elements to teh current sampled data set. Only references are copied.

Parameters
addedSetSampled data whose elements are added to the current sampled data set.
void IG.Num.SampledDataSet.SetInputParameters ( int  which,
IVector  parameters 
)
inline

Sets the vector of input parameters of the specified element of the sampled data set.

Parameters
whichIndex of the sampled data element within the sampled data set.
parametersVector of input parameters to be set.

References IG.Num.SampledDataElement.InputParameters.

void IG.Num.SampledDataSet.SetOutputValues ( int  which,
IVector  values 
)
inline

Sets the vector of output values of the specified element of the sampled data set.

Parameters
whichIndex of the data element within the sampled data set.
valuesVector of output values to be set.

References IG.Num.SampledDataElement.OutputValues.

void IG.Num.SampledDataSet.GetInputRange ( ref IBoundingBox  bounds)
inline

Calculates range of input parameters of the current sampled data set, and stores it to the specified bounding box.

Parameters
boundsBounding box wehere bounds on input parameters are stored.

Referenced by IG.Num.NeuralTrainingParameters.CopyFrom(), IG.Num.NeuralApproximatorBase.RecalculateInputDataBounds(), and IG.Num.InputOutputDataDefiniton.SupplementDataDefinition().

void IG.Num.SampledDataSet.GetOutputRange ( ref IBoundingBox  bounds)
inline

Calculates range of output values of the current sampled data set, and stores it to the specified bounding box.

Parameters
boundsBounding box wehere bounds on output values are stored.

Referenced by IG.Num.NeuralTrainingParameters.CopyFrom(), IG.Neural.NeuralTadej.ExampleStore(), IG.Num.NeuralApproximatorBase.RecalculateOutputDataBounds(), and IG.Num.InputOutputDataDefiniton.SupplementDataDefinition().

void IG.Num.SampledDataSet.ExtractInputs ( ref IVector[]  extracted)
inline

Extracts vectors of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed).

Parameters
extractedTable where extracted vectors are stored.
void IG.Num.SampledDataSet.ExtractInputs ( IndexList  filterIndices,
ref IVector[]  extracted 
)
inline

Extracts the specified vectors of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors to extract (i.e. which data elements to exclude).

Parameters
extractedTable where extracted vectors are stored.
filterIndicesList of indices of those elements of the current sampled data set that are extracted.
void IG.Num.SampledDataSet.ExtractInputsComplement ( IndexList  filterIndices,
ref IVector[]  extracted 
)
inline

Extracts the specified vectors (complement of the index list) of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors NOT to extract (i.e. which data elements to include).

Parameters
extractedTable where extracted vectors are stored.
filterIndicesList of indices of those elements of the current sampled data set that are extracted.
void IG.Num.SampledDataSet.ExtractOutputs ( ref IVector[]  extracted)
inline

Extracts vectors of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed).

Parameters
extractedTable where extracted vectors are stored.
void IG.Num.SampledDataSet.ExtractOutputs ( IndexList  filterIndices,
ref IVector[]  extracted 
)
inline

Extracts the specified vectors of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors to extract (i.e. which data elements to exclude).

Parameters
extractedTable where extracted vectors are stored.
filterIndicesList of indices of those elements of the current sampled data set that are extracted.
void IG.Num.SampledDataSet.ExtractOutputsComplement ( IndexList  filterIndices,
ref IVector[]  extracted 
)
inline

Extracts the specified vectors (complement of the index list) of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors NOT to extract (i.e. which data elements to include).

Parameters
extractedTable where extracted vectors are stored.
filterIndicesList of indices of those elements of the current sampled data set that are extracted.
void IG.Num.SampledDataSet.CopyInputs ( ref IVector[]  extracted)
inline

Copies vectors of input parameters from the current sampled data set, and stores them to the specified array. References of the extracted vectors aer stored (no deep copying performed).

Parameters
extractedTable where extracted vectors are stored.
void IG.Num.SampledDataSet.CopyInputs ( IndexList  filterIndices,
ref IVector[]  extracted 
)
inline

Copies the specified vectors of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors to extract (i.e. which sampled elements to exclude).

Parameters
extractedTable where extracted vectors are stored.
filterIndicesList of indices of those elements of the current sampled data set that are extracted.
void IG.Num.SampledDataSet.CopyInputsComplement ( IndexList  filterIndices,
ref IVector[]  extracted 
)
inline

Copies the specified vectors (complement of the index list) of input parameters from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors NOT to extract (i.e. which data elements to include).

Parameters
extractedTable where extracted vectors are stored.
filterIndicesList of indices of those elements of the current sampled data set that are extracted.
void IG.Num.SampledDataSet.CopyOutputs ( ref IVector[]  extracted)
inline

Copies vectors of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed).

Parameters
extractedTable where extracted vectors are stored.
void IG.Num.SampledDataSet.CopyOutputs ( IndexList  filterIndices,
ref IVector[]  extracted 
)
inline

Copies the specified vectors of output values from the current sampled data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors to extract (i.e. which data elements to exclude).

Parameters
extractedTable where extracted vectors are stored.
filterIndicesList of indices of those elements of the current sampled data set that are extracted.
void IG.Num.SampledDataSet.CopyOutputsComplement ( IndexList  filterIndices,
ref IVector[]  extracted 
)
inline

Copies the specified vectors (complement of the index list) of output values from the current data set, and stores them to the specified table. References of the extracted vectors aer stored (no deep copying performed). An index list determines which vectors NOT to extract (i.e. which sampled data elements to include).

Parameters
extractedTable where extracted vectors are stored.
filterIndicesList of indices of those elements of the current data set that are extracted.
void IG.Num.SampledDataSet.ExtractFilteredData ( IndexList  filterIndices,
ref IVector[]  extracted,
bool  complement,
bool  outputData,
bool  copyValues 
)
inline

Extract extracts.

Extract the specified input or output vectors from the current set, and stored them in the specified array of vectors.

Parameters
filterIndicesList of filter indices that specify which element to extract from or omit. Can be null, in this case it is taken that there are no filter indices.
extractedArray where the extracted vectors are stored.
complementIf true then vectors are extracted from those elements whose indices are NOT contained in filterIndices list. If false then vectors are extracted from those elements whose indices ARE i nthe filterIndices list.
outputDataIf true then vectors of output values are extracted, otherwise vectors of input parameters are extracted.
copyValuesIf true then extracted vectors are copied component-wise. If false then only references of extracted vectors are copied.

References IG.Num.VectorBase.Copy(), and IG.Lib.SortedUniqueItemList< Type >.Length.

int IG.Num.SampledDataSet.GetNumNullElemets ( )
inline

Returns number of null elements of the current sampled data set.

$A Igor Feb12;

Referenced by IG.Script.LoadableScriptShellNeuralBase.GatherParallelResults().

int IG.Num.SampledDataSet.GetNumInputDuplicates ( )
inline

Returns number of elements of the current sampled data set with duplicated input parameters.

Vectors of input parameters are considered the same if both are null or all components are the same (i.e., comparison is performed component-wise rather than by reference).

elements that are null are not counted as duplicates.

For each group of n elements with the same input parameters, n-1 is added to the returned number.

$A Igor Feb12;

Referenced by IG.Script.LoadableScriptShellNeuralBase.GatherParallelResults().

void IG.Num.SampledDataSet.RemoveInputDuplicates ( )
inline

Removes elements with duplibated input parameters from the current sampled data set, leaving only a single element with specified input parameters. Elements that are null are also removed.

$A Igor Feb12;

Referenced by IG.Script.LoadableScriptShellNeuralBase.GatherParallelResults().

delegate double IG.Num.SampledDataSet.DistanceDelegate ( IVector  v1,
IVector  v2 
)
static void IG.Num.SampledDataSet.SaveBinary ( SampledDataSet  sampledData,
string  filePath 
)
inlinestatic

Saves the specified sempled data to the specified file in binary format. The file is owerwritten if it exists.

Parameters
sampledDataObject that is saved to a file.
filePathPath to the file where sampled data is saved.

References IG.Lib.UtilSystem.SaveBinary().

static void IG.Num.SampledDataSet.LoadBinary ( string  filePath,
ref SampledDataSet  dataDefRestored 
)
inlinestatic

Restores sampled data from the specified file in binary format.

Parameters
filePathFile from which sampled data is restored.
dataDefRestoredSampled data that is restored.

References IG.Lib.UtilSystem.LoadBinary().

static void IG.Num.SampledDataSet.SaveJson ( SampledDataSet  sampledData,
string  filePath 
)
inlinestatic

Saves the specified sempled data to the specified JSON file. The file is owerwritten if it exists.

Parameters
sampledDataObject that is saved to a file.
filePathPath to the file where sampled data is saved.

Referenced by IG.Script.LoadableScriptShellNeuralBase.CreateDistortedModelData(), IG.Script.LoadableScriptShellNeuralBase.GatherParallelResults(), and IG.Script.LoadableScriptShellNeuralBase.ParSimRunJob().

static void IG.Num.SampledDataSet.LoadJson ( string  filePath,
ref SampledDataSet  dataDefRestored 
)
inlinestatic

Restores sampled data from the specified file in JSON format.

Parameters
filePathFile from which sampled data is restored.
dataDefRestoredSampled data that is restored by deserialization.

Referenced by IG.Script.ScriptAppBase.DataStructuresFunctionTestCsvWriteDefinitionAndData(), IG.Script.LoadableScriptShellNeuralBase.ParSimAddResults(), IG.Num.InputOutputDataDefiniton.SupplementDataDefinition(), and IG.Script.LoadableScriptShellNeuralBase.TrainANN().

static void IG.Num.SampledDataSet.LoadSampledDataCombinedOutputsJSON ( ref SampledDataSet  sampledDat,
string  directoryPath,
params string[]  fileNames 
)
inlinestatic

Loads sampled data and Definition data from multible CSV files. Sampled data consist of one output and multiple input parameters. Input parameters are the same in all files, output parameter are different.

Parameters
sampledDatSampled data set.
directoryPathPath to the file where sampled data are saved.
fileNamesName of the files where sampled data are saved.

$A Tako78 Mar11;

static void IG.Num.SampledDataSet.LoadSampledDataCombinedOutputsJSON ( ref SampledDataSet  sampledData,
params string[]  fileNames 
)
inlinestatic

Loads sampled data and Definition data from multiple CSV files. Sampled data consist of one output and multiple input parameters. Input parameters are the same in all files but output parameter should be different.

Parameters
fileNamesPath to the file where sampled data are saved.
sampledDataSampled data set.

$A Tako78 Mar11;

static void IG.Num.SampledDataSet.SaveSampledDataJson ( string  filePath,
SampledDataSet  sampledData 
)
inlinestatic

Saves network's sampled data to the specified JSON file. File is owerwritten if it exists.

Parameters
filePathPath to the file where sampled data is saved.
sampledDataSampled data to be saved to a JSON file.

$A Tako78 Mar11;

static void IG.Num.SampledDataSet.SaveDefinitionDataJson ( string  filePath,
InputOutputDataDefiniton  definitionData 
)
inlinestatic

Saves network's definition data to the specified JSON file. File is owerwritten if it exists.

Parameters
filePathPath to the file where definition data is saved.
definitionDataDefinition data to be saved to a JSON file.

$A Tako78 Maj31;

static void IG.Num.SampledDataSet.LoadSampledDataJson ( string  filePath,
ref SampledDataSet  sampledData 
)
inlinestatic

Restores sampled data from the specified file in JSON format.

Parameters
filePathFile from which sampled data is restored.
sampledDataSampled data to be loaded.

$A Tako78 Mar11;

Referenced by IG.Num.TestClass.LoadSampledDataCombinedOutputsJSON().

static void IG.Num.SampledDataSet.LoadSampledDataCSVinOneLine ( string  filePath,
int  inputLenght,
int  outputLenght,
bool  namesSpecified,
bool  descriptionSpecified,
bool  titleSpecified,
ref SampledDataSet  sampledData,
ref InputOutputDataDefiniton  definitionData 
)
inlinestatic

Loads sampled data and definition data from single CSV file.

Parameters
filePathPath to the file where sampled data are saved.
inputLenghtLenght of input parameters.
outputLenghtLenght of output parameters.
namesSpecifiedFlag if names are specified in the file.
descriptionSpecifiedFlag if definitions (descriptions, defaultValue, boundDefiner, minValue, maxValue) are specified in the file.
titleSpecifiedSpecifies whether title is specified in the file.
sampledDataSampled data set.
definitionDataDefinition data set.

$A Tako78 Mar11; June27;

References IG.Num.InputOutputElementDefinition.BoundsDefined, IG.Num.InputElementDefinition.DefaultValue, IG.Num.InputOutputElementDefinition.MaximalValue, and IG.Num.InputOutputElementDefinition.MinimalValue.

static void IG.Num.SampledDataSet.LoadSampledDataCSV ( string  filePath,
int  inputLenght,
int  outputLenght,
bool  namesSpecified,
bool  titleSpecified,
bool  descriptionSpecified,
ref SampledDataSet  sampledData,
ref InputOutputDataDefiniton  definitionData 
)
inlinestatic

Loads sampled data and definition data from single CSV file.

Parameters
filePathPath to the file where sampled data are saved.
inputLenghtLenght of input parameters.
outputLenghtLenght of output parameters.
namesSpecifiedFlag if names are specified in the file.
titleSpecifiedDetermines whether title is specified in the file.
descriptionSpecifiedFlag if descriptions are specified in the file.
sampledDataSampled data set.
definitionDataDefinition data set.

$A Tako78 Apr11, June24;

Referenced by IG.Neural.NeuralAllpicationCommands.cmdTestSerializationNeuralCSV().

static void IG.Num.SampledDataSet.LoadDefinitionDataCSV ( string  filePath,
int  inputLenght,
int  outputLenght,
ref InputOutputDataDefiniton  definitionData 
)
inlinestatic

Loads definition data from CSV file.

Parameters
filePathPath to the file where definition data are saved.
inputLenghtLenght of input parameters.
outputLenghtLenght of output parameters.
definitionDataDefinition data set.

$A Tako78 Mar11; June24;

References IG.Num.InputOutputElementDefinition.BoundsDefined, IG.Num.InputElementDefinition.DefaultValue, IG.Num.InputOutputElementDefinition.MaximalValue, and IG.Num.InputOutputElementDefinition.MinimalValue.

static void IG.Num.SampledDataSet.SaveSampledDataCSVinOneLine ( string  filePath,
SampledDataSet  sampledData,
bool  namesSpecified,
bool  titleSpecified,
bool  descriptionSpecified,
InputOutputDataDefiniton  definitionData 
)
inlinestatic

Saves sampled data and Definition data to single CSV file.

Parameters
filePathPath to the file where sampled data will be saved.
sampledDataSampled data set.
namesSpecifiedFlag if names will be written in the file.
titleSpecifiedWhether title will be written.
descriptionSpecifiedFlag if descriptions (descriptions, defaultValue, boundDefiner, minValue, maxValue) will be written in the file.
definitionDataDefinition data set.

$A Tako78 Mar11; June27;

References IG.Num.InputOutputElementDefinition.BoundsDefined, IG.Num.InputElementDefinition.DefaultValue, IG.Num.InputOutputElementDefinition.Description, IG.Num.InputOutputDataDefiniton.GetInputElement(), IG.Num.SampledDataSet.GetInputParameters(), IG.Num.InputOutputDataDefiniton.GetOutputElement(), IG.Num.SampledDataSet.GetOutputValues(), IG.Num.SampledDataSet.InputLength, IG.Num.SampledDataSet.Length, IG.Num.InputOutputElementDefinition.MaximalValue, IG.Num.InputOutputElementDefinition.MinimalValue, IG.Num.InputOutputElementDefinition.Name, IG.Num.SampledDataSet.OutputLength, and IG.Num.InputOutputElementDefinition.Title.

static void IG.Num.SampledDataSet.SaveSampledDataCSV ( string  filePath,
SampledDataSet  sampledData,
bool  namesSpecified,
bool  titlesSpecified,
bool  descriptionSpecified,
InputOutputDataDefiniton  definitionData 
)
inlinestatic

Saves sampled data and Definition data to single CSV file.

Parameters
filePathPath to the file where sampled data will be saved.
sampledDataSampled data set.
namesSpecifiedFlag if names will be written in the file.
titlesSpecifiedWhether title will be written to the file.
descriptionSpecifiedFlag if descriptions will be written in the file.
definitionDataDefinition data set.

$A Tako78 Mar11; June27;

References IG.Num.InputOutputElementDefinition.Description, IG.Num.InputOutputDataDefiniton.GetInputElement(), IG.Num.SampledDataSet.GetInputParameters(), IG.Num.InputOutputDataDefiniton.GetOutputElement(), IG.Num.SampledDataSet.GetOutputValues(), IG.Num.SampledDataSet.InputLength, IG.Num.SampledDataSet.Length, IG.Num.InputOutputElementDefinition.Name, IG.Num.SampledDataSet.OutputLength, and IG.Num.InputOutputElementDefinition.Title.

Referenced by IG.Neural.NeuralAllpicationCommands.cmdTestSerializationNeuralCSV().

static void IG.Num.SampledDataSet.SampledDataCombineOutputs ( ref SampledDataSet  result,
params SampledDataSet[]  individualSets 
)
inlinestatic

Loads sampled data and Definition data from multible CSV files. Sampled data consist of one output and multiple input parameters. Input parameters are the same in all files, output parameter are different.

Parameters
resultSampled data set with combined outputs.
individualSetsDifferent sampled data sets with the same inputs and different outputs.

$A Tako78 Mar11;

References IG.Num.SampledDataSet.GetInputParameters(), IG.Num.SampledDataSet.GetOutputValues(), IG.Num.SampledDataSet.InputLength, IG.Num.SampledDataSet.Length, and IG.Num.SampledDataSet.OutputLength.

Referenced by IG.Num.TestClass.LoadSampledDataCombinedOutputsJSON().

static int IG.Num.SampledDataSet.GetNumNullElemets ( SampledDataSet  sampledDataSet)
inlinestatic

Returns number of null elements of the specified sampled data set.

Parameters
sampledDataSetSampled set for which number of null elements is returned.

$A Igor Feb12;

References IG.Num.SampledDataSet.Length.

static int IG.Num.SampledDataSet.GetNumInputDuplicates ( SampledDataSet  sampledSet)
inlinestatic

Returns the number of elements of the specified sampled data set with duplicated input parameters.

Vectors of input parameters are considered the same if both are null or all components are the same (i.e., comparison is performed component-wise rather than by reference).

elements that are null are not counted as duplicates.

For each group of n elements with the same input parameters, n-1 is added to the returned number.

Parameters
sampledSetSampled data set for which number of duplicated input parameters is returned.

$A Igor Feb12;

References IG.Num.VectorBase.Compare(), IG.Num.SampledDataElement.Index, IG.Num.SampledDataElement.InputParameters, and IG.Num.SampledDataSet.Length.

static void IG.Num.SampledDataSet.RemoveInputDuplicates ( SampledDataSet  sampledSet)
inlinestatic

Removes elements with duplicated input parameters, leaving only a single element with specified input parameters. Elements that are null are also removed.

Vectors of input parameters are considered the same if both are null or all components are the same (i.e., comparison is performed component-wise rather than by reference).

Parameters
sampledSetSampled data set from which elemets with duplicated input parameters are removed.

$A Igor Feb12;

References IG.Num.VectorBase.Compare(), IG.Num.SampledDataElement.Index, IG.Num.SampledDataElement.InputParameters, and IG.Num.SampledDataSet.Length.

static SampledDataSet IG.Num.SampledDataSet.CreateExampleLinear ( int  inputLength,
int  outputLength,
int  numElements 
)
inlinestatic

Craates and returns a sample data set object where input parameters are calculated randomly in a box-like domain, and output parameters are calculated by quadratic functions with random coefficients. Domain where sampling points are generated is a cartesian product of intervals [-1, 1].

Parameters
inputLengthDimension of input data (parameters).
outputLengthNumber of output values.
numElementsNumber of input/output pairs used as sampled data.

References IG.Num.BoundingBoxBase.Create().

static SampledDataSet IG.Num.SampledDataSet.CreateExampleLinear ( int  inputLength,
int  outputLength,
int  numElements,
IBoundingBox  region 
)
inlinestatic

Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by quadratic functions with random coefficients.

Parameters
inputLengthDimension of input data (parameters).
outputLengthNumber of output values.
numElementsNumber of input/output pairs used as sampled data.
regionBounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.

References IG.Num.RandomGenerator.Global.

static SampledDataSet IG.Num.SampledDataSet.CreateExampleLinear ( int  inputLength,
int  outputLength,
int  numElements,
IBoundingBox  region,
IRandomGenerator  rand 
)
inlinestatic

Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by quadratic functions with random coefficients.

Parameters
inputLengthDimension of input data (parameters).
outputLengthNumber of output values.
numElementsNumber of input/output pairs used as sampled dataa.
regionBounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.
randRandom number generator that is used for sampling.

References IG.Num.IRandomGenerator.NextDouble(), and IG.Num.IVector.SetRandom().

static SampledDataSet IG.Num.SampledDataSet.CreateExampleQuadratic ( int  inputLength,
int  outputLength,
int  numElements 
)
inlinestatic

Craates and returns a sample data set object where input parameters are calculated randomly in a box-like domain, and output parameters are calculated by quadratic functions with random coefficients. Domain where sampling points are generated is a cartesian product of intervals [-1, 1].

Parameters
inputLengthDimension of input data (parameters).
outputLengthNumber of output values.
numElementsNumber of input/output pairs used as sampled data.

References IG.Num.BoundingBoxBase.Create().

Referenced by IG.Neural.NeuralTadej.ExampleQuadratic(), and IG.Num.NeuralApproximatorBase.ExampleQuadratic().

static SampledDataSet IG.Num.SampledDataSet.CreateExampleQuadratic ( int  inputLength,
int  outputLength,
int  numElements,
IBoundingBox  region 
)
inlinestatic

Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by quadratic functions with random coefficients.

Parameters
inputLengthDimension of input data (parameters).
outputLengthNumber of output values.
numElementsNumber of input/output pairs used as sampled data.
regionBounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.

References IG.Num.RandomGenerator.Global.

static SampledDataSet IG.Num.SampledDataSet.CreateExampleQuadratic ( int  inputLength,
int  outputLength,
int  numElements,
IBoundingBox  region,
IRandomGenerator  rand 
)
inlinestatic

Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by quadratic functions with random coefficients.

Parameters
inputLengthDimension of input data (parameters).
outputLengthNumber of output values.
numElementsNumber of input/output pairs used as sampled data.
regionBounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.
randRandom number generator that is used for sampling.

References IG.Num.ScalarFunctionQuadratic.GetNumConstants(), IG.Num.IRandomGenerator.NextDouble(), IG.Num.IMatrix.SetRandom(), IG.Num.IVector.SetRandom(), and IG.Num.MatrixBase.SymmetricPartPlain().

static SampledDataSet IG.Num.SampledDataSet.CreateExample ( int  inputLength,
int  outputLength,
int  numElements,
IBoundingBox  region,
IScalarFunctionUntransformed[]  functions,
IRandomGenerator  rand 
)
inlinestatic

Craates and returns a sample data set object where input parameters are calculated randomly in the specified box-like domain, and output parameters are calculated by the specified scalar functions.

Parameters
inputLengthDimension of input data (parameters).
outputLengthNumber of output values.
numElementsNumber of input/output pairs used as sampled data.
regionBounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.
functionsScalar-valued functions (of vector argument) that are applied to input parameters to produce output values of the sampled data.
randRandom number generator that is used for sampling.

References IG.Num.SampledDataSet.AddElement(), IG.Num.IBoundingBox.Dimension, and IG.Num.IBoundingBox.GetRandomPoint().

static SampledDataSet IG.Num.SampledDataSet.CreateExampleSimple ( int  inputLength,
int  outputLength,
int  numElements 
)
inlinestatic

Craates and returns a sample object of the encompassing class.

Parameters
inputLengthDimension of input data (parameters).
outputLengthNumber of output values.
numElementsNumber of input/output pairs used as sampled data.

References IG.Num.SampledDataSet.AddElement(), IG.Num.SampledDataSet.InputLength, and IG.Num.SampledDataSet.OutputLength.

Referenced by IG.Neural.NeuralAllpicationCommands.cmdTestSerializationNeural(), and IG.Neural.NeuralAllpicationCommands.cmdTestSerializationNeuralCSV().

override string IG.Num.SampledDataSet.ToString ( )
inline

Member Data Documentation

int IG.Num.SampledDataSet._inputLength = -1
protected
int IG.Num.SampledDataSet._outputLength = -1
protected

Property Documentation

SampledDataElement [] IG.Num.SampledDataSet.Data
getset

Gets or sets sampled data, as an array of data elements.

SampledDataElement IG.Num.SampledDataSet.this[int which]
getset

Gets or sets specific data element.

Parameters
whichIndex of data element.

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