| IGLib 1.4 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | Properties

# IG::Num::SampledDataSet Class Reference

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

List of all members.

## 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. Measure of distance is defined by the DistanceDelegate delegate.Beside its basic comparison function, this class also contains a number of methods for calculation of distance between vectors or data elemets according to definition by the distacnce calculation delegate. 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. Measure of distance is defined by the DistanceDelegate delegate.Beside its basic comparison function, this class also contains a number of methods for calculation of distance between vectors or data elemets according to definition by the distacnce calculation delegate. More...
## Public Member Functions
| SampledDataSet ()
| SampledDataSet (int inputLength, int outputLength)
List< SampledDataElement > | GetElementList ()
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. In this way, element indices can be used to directly access sampled data elements (without a search).
List< SampledDataElement > | GetElementListCopy ()
| 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 > | GetSortedElemetnList (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).
List< SampledDataElement > | GetInputDistanceSortedElemetnList (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.
List< SampledDataElement > | GetOutputDistanceSortedElemetnList (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.
virtual void | Clear ()
void | AddElement (SampledDataElement element)
| Adda a new element to sampled data.
void | Add (SampledDataSet addedSet)
| Adds elements of another sampled data ser to the current sampled data. Only references are copied.
void | Add (params SampledDataElement[] addedSet)
| Adds array of sampled data elements to teh current sampled data set. Only references are copied.
IVector | GetInputParameters (int which)
| Returns the vector of input parameters of the specified element of the sampled data set.
void | SetInputParameters (int which, IVector parameters)
| Sets the vector of input parameters of the specified element of the sampled data set.
virtual IVector | GetOutputValues (int which)
| Returns the vector of output values of the specified element of the sampled data set.
void | SetOutputValues (int which, IVector values)
| Sets the vector of output values of the specified element of the sampled data set.
void | GetInputRange (ref IBoundingBox bounds)
| Calculates range of input parameters of the current sampled data set, and stores it to the specified bounding box.
void | GetOutputRange (ref IBoundingBox bounds)
| Calculates range of output values of the current sampled data set, and stores it to the specified bounding box.
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).
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).
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).
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).
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).
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).
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).
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).
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).
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).
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).
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).
void | ExtractFilteredData (IndexList filterIndices, ref IVector[] extracted, bool complement, bool outputData, bool copyValues)
| Extract extracts.
int | GetNumNullElemets ()
| Returns number of null elements of the current sampled data set.
int | GetNumInputDuplicates ()
| 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.
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.
delegate double | DistanceDelegate (IVector v1, IVector v2)
override string | ToString ()
## Static Public Member Functions
static void | SaveJson (SampledDataSet sampledData, string filePath)
| Saves the specified sempled data to the specified JSON file. The file is owerwritten if it exists.
static void | LoadJson (string filePath, ref SampledDataSet dataDefRestored)
| Restores sampled data from the specified file in JSON format.
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.
static void | LoadSampledDataCombinedOutputsJSON (ref SampledDataSet sampledData, 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 but output parameter should be different.
static void | SaveSampledDataJson (string filePath, SampledDataSet sampledData)
| Saves network's sampled data to the specified JSON file. File is owerwritten if it exists.
static void | SaveDefinitionDataJson (string filePath, InputOutputDataDefiniton sampledData)
| Saves network's definition data to the specified JSON file. File is owerwritten if it exists.
static void | LoadSampledDataJson (string filePath, ref SampledDataSet sampledData)
| Restores sampled data from the specified file in JSON format.
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. Parameters:
  filePath | Path to the file where sampled data are saved.
  inputLenght | Lenght of input parameters.
  outputLenght | Lenght of output parameters.
  namesSpecified | Flag if names are specified in the file.
  descriptionSpecified | Flag if definitions (descriptions, defaultValue, boundDefiner, minValue, maxValue) are specified in the file.
  trainingData | Sampled data set.
  definitionData | Definition data set.
$A Tako78 Mar11; June27;.
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. Parameters:
  filePath | Path to the file where sampled data are saved.
  inputLenght | Lenght of input parameters.
  outputLenght | Lenght of output parameters.
  namesSpecified | Flag if names are specified in the file.
  descriptionSpecified | Flag if descriptions are specified in the file.
  trainingData | Sampled data set.
  definitionData | Definition data set.
$A Tako78 Apr11, June24;.
static void | LoadDefinitionDataCSV (string filePath, int inputLenght, int outputLenght, ref InputOutputDataDefiniton definitionData)
| Loads definition data from CSV file.
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.
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.
static void | SaveDefinitionDataCSV (string filePath, InputOutputDataDefiniton definitionData)
| Saves definition data to CSV file.
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.
static int | GetNumNullElemets (SampledDataSet sampledDataSet)
| Returns number of null elements of the specified sampled data set.
static int | GetNumInputDuplicates (SampledDataSet sampledSet)
| 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.
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. 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).
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].
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.
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.
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].
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.
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.
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.
static SampledDataSet | CreateExampleSimple (int inputLength, int outputLength, int numElements)
| Craates and returns a sample object of the encompassing class.
## Protected Attributes
internal List< SampledDataElement > | ElementList = new List<SampledDataElement>()
int | _inputLength = -1
int | _outputLength = -1
## Properties
SampledDataElement[] | Data`[get, set]`
| Gets or sets sampled data, as an array of data elements.
int | Length`[get]`
| Gets the number of sampled data elements (input/output pairs) contained by the current sampled data set.
int | InputLength`[get, set]`
| Number of input parameters in sampled data elements. Less than 0 means unspecified.
int | OutputLength`[get, set]`
| Number of output values in sampled data elements. Less than 0 means unspecified.
SampledDataElement | this [int which]`[get, set]`
| Gets or sets specific data element.

## 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).

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:

  comparer | Comparer 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:

  referencePoint | Reference point, sampled data elements are sorted according to the distance to this point.
  distanceFunction | Delegate 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:

  referencePoint | Reference point, sampled data elements are sorted according to the distance to this point.
  distanceFunction | Delegate that definines distance between two vectors for the purpose of sorting.

virtual void IG::Num::SampledDataSet::Clear | ( |  | ) | `[inline, virtual]`

void IG::Num::SampledDataSet::AddElement | ( | SampledDataElement | element | ) | `[inline]`

Adda a new element to sampled data.

Parameters:

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

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:

  addedSet | Sampled data whose elements are added to the current sampled data.

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:

  addedSet | Sampled data whose elements are added to the current sampled data set.

IVector IG::Num::SampledDataSet::GetInputParameters | ( | int | which | ) | `[inline]`

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

Parameters:

  which | Index of the sampled data element within the 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:

  which | Index of the sampled data element within the sampled data set.
  parameters | Vector of input parameters to be set.

virtual IVector IG::Num::SampledDataSet::GetOutputValues | ( | int | which | ) | `[inline, virtual]`

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

Parameters:

  which | Index of the data element within the sampled set.

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:

  which | Index of the data element within the sampled data set.
  values | Vector of output values to be set.

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:

  bounds | Bounding box wehere bounds on input parameters are stored.

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:

  bounds | Bounding box wehere bounds on output values are stored.

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:

  extracted | Table 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:

  extracted | Table where extracted vectors are stored.
  filterIndices | List 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:

  extracted | Table where extracted vectors are stored.
  filterIndices | List 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:

  extracted | Table 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:

  extracted | Table where extracted vectors are stored.
  filterIndices | List 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:

  extracted | Table where extracted vectors are stored.
  filterIndices | List 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:

  extracted | Table 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:

  extracted | Table where extracted vectors are stored.
  filterIndices | List 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:

  extracted | Table where extracted vectors are stored.
  filterIndices | List 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:

  extracted | Table 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:

  extracted | Table where extracted vectors are stored.
  filterIndices | List 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:

  extracted | Table where extracted vectors are stored.
  filterIndices | List 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:

  filterIndices | List 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.
  extracted | Array where the extracted vectors are stored.
  complement | If 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.
  outputData | If true then vectors of output values are extracted, otherwise vectors of input parameters are extracted.
  copyValues | If true then extracted vectors are copied component-wise. If false then only references of extracted vectors are copied.

int IG::Num::SampledDataSet::GetNumNullElemets | ( |  | ) | `[inline]`

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

$A Igor Feb12;

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;

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;

delegate double IG::Num::SampledDataSet::DistanceDelegate | ( | IVector | v1,
|  | IVector | v2
| ) |  |

static void IG::Num::SampledDataSet::SaveJson | ( | SampledDataSet | sampledData,
|  | string | filePath
| ) |  | `[inline, static]`

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

Parameters:

  sampledData | Object that is saved to a file.
  filePath | Path to the file where sampled data is saved.

static void IG::Num::SampledDataSet::LoadJson | ( | string | filePath,
|  | ref SampledDataSet | dataDefRestored
| ) |  | `[inline, static]`

Restores sampled data from the specified file in JSON format.

Parameters:

  filePath | File from which sampled data is restored.
  dataDefRestored | Sampled data that is restored by deserialization.

static void IG::Num::SampledDataSet::LoadSampledDataCombinedOutputsJSON | ( | ref SampledDataSet | sampledDat,
|  | string | directoryPath,
|  | params string[] | fileNames
| ) |  | `[inline, static]`

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:

  sampledDat | Sampled data set.
  directoryPath | Path to the file where sampled data are saved.
  fileNames | Name of the files where sampled data are saved.

$A Tako78 Mar11;

static void IG::Num::SampledDataSet::LoadSampledDataCombinedOutputsJSON | ( | ref SampledDataSet | sampledData,
|  | params string[] | fileNames
| ) |  | `[inline, static]`

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 but output parameter should be different.

Parameters:

  fileNames | Path to the file where sampled data are saved.
  sampledData | Sampled data set.

$A Tako78 Mar11;

static void IG::Num::SampledDataSet::SaveSampledDataJson | ( | string | filePath,
|  | SampledDataSet | sampledData
| ) |  | `[inline, static]`

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

Parameters:

  filePath | Path to the file where sampled data is saved.

$A Tako78 Mar11;

static void IG::Num::SampledDataSet::SaveDefinitionDataJson | ( | string | filePath,
|  | InputOutputDataDefiniton | sampledData
| ) |  | `[inline, static]`

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

Parameters:

  filePath | Path to the file where definition data is saved.

$A Tako78 Maj31;

static void IG::Num::SampledDataSet::LoadSampledDataJson | ( | string | filePath,
|  | ref SampledDataSet | sampledData
| ) |  | `[inline, static]`

Restores sampled data from the specified file in JSON format.

Parameters:

  filePath | File from which sampled data is restored.

$A Tako78 Mar11;

static void IG::Num::SampledDataSet::LoadSampledDataCSVinOneLine | ( | string | filePath,
|  | int | inputLenght,
|  | int | outputLenght,
|  | bool | namesSpecified,
|  | bool | descriptionSpecified,
|  | bool | titleSpecified,
|  | ref SampledDataSet | sampledData,
|  | ref InputOutputDataDefiniton | definitionData
| ) |  | `[inline, static]`

Loads sampled data and definition data from single CSV file.

Parameters:

  filePath | Path to the file where sampled data are saved.
  inputLenght | Lenght of input parameters.
  outputLenght | Lenght of output parameters.
  namesSpecified | Flag if names are specified in the file.
  descriptionSpecified | Flag if definitions (descriptions, defaultValue, boundDefiner, minValue, maxValue) are specified in the file.
  trainingData | Sampled data set.
  definitionData | Definition data set.

$A Tako78 Mar11; June27;.

static void IG::Num::SampledDataSet::LoadSampledDataCSV | ( | string | filePath,
|  | int | inputLenght,
|  | int | outputLenght,
|  | bool | namesSpecified,
|  | bool | titleSpecified,
|  | bool | descriptionSpecified,
|  | ref SampledDataSet | sampledData,
|  | ref InputOutputDataDefiniton | definitionData
| ) |  | `[inline, static]`

Loads sampled data and definition data from single CSV file.

Parameters:

  filePath | Path to the file where sampled data are saved.
  inputLenght | Lenght of input parameters.
  outputLenght | Lenght of output parameters.
  namesSpecified | Flag if names are specified in the file.
  descriptionSpecified | Flag if descriptions are specified in the file.
  trainingData | Sampled data set.
  definitionData | Definition data set.

$A Tako78 Apr11, June24;.

static void IG::Num::SampledDataSet::LoadDefinitionDataCSV | ( | string | filePath,
|  | int | inputLenght,
|  | int | outputLenght,
|  | ref InputOutputDataDefiniton | definitionData
| ) |  | `[inline, static]`

Loads definition data from CSV file.

Parameters:

  filePath | Path to the file where definition data are saved.
  inputLenght | Lenght of input parameters.
  outputLenght | Lenght of output parameters.
  definitionData | Definition data set.

$A Tako78 Mar11; June24;

static void IG::Num::SampledDataSet::SaveSampledDataCSVinOneLine | ( | string | filePath,
|  | SampledDataSet | sampledData,
|  | bool | namesSpecified,
|  | bool | titleSpecified,
|  | bool | descriptionSpecified,
|  | InputOutputDataDefiniton | definitionData
| ) |  | `[inline, static]`

Saves sampled data and Definition data to single CSV file.

Parameters:

  filePath | Path to the file where sampled data will be saved.
  sampledData | Sampled data set.
  namesSpecified | Flag if names will be written in the file.
  descriptionSpecified | Flag if descriptions (descriptions, defaultValue, boundDefiner, minValue, maxValue) will be written in the file.
  definitionData | Definition data set.

$A Tako78 Mar11; June27;

static void IG::Num::SampledDataSet::SaveSampledDataCSV | ( | string | filePath,
|  | SampledDataSet | sampledData,
|  | bool | namesSpecified,
|  | bool | titlesSpecified,
|  | bool | descriptionSpecified,
|  | InputOutputDataDefiniton | definitionData
| ) |  | `[inline, static]`

Saves sampled data and Definition data to single CSV file.

Parameters:

  filePath | Path to the file where sampled data will be saved.
  sampledData | Sampled data set.
  namesSpecified | Flag if names will be written in the file.
  descriptionSpecified | Flag if descriptions will be written in the file.
  definitionData | Definition data set.

$A Tako78 Mar11; June27;

static void IG::Num::SampledDataSet::SaveDefinitionDataCSV | ( | string | filePath,
|  | InputOutputDataDefiniton | definitionData
| ) |  | `[inline, static]`

Saves definition data to CSV file.

Parameters:

  filePath | Path to the file where definition data will be saved.
  definitionData | Definition data set.

$A Tako78 Mar11; June27;

static void IG::Num::SampledDataSet::SampledDataCombineOutputs | ( | ref SampledDataSet | result,
|  | params SampledDataSet[] | individualSets
| ) |  | `[inline, static]`

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:

  result | Sampled data set with combined outputs.
  individualSets | Different sampled data sets with the same inputs and different outputs.

$A Tako78 Mar11;

static int IG::Num::SampledDataSet::GetNumNullElemets | ( | SampledDataSet | sampledDataSet | ) | `[inline, static]`

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

Parameters:

  sampledDataSet | Sampled set for which number of null elements is returned.

$A Igor Feb12;

static int IG::Num::SampledDataSet::GetNumInputDuplicates | ( | SampledDataSet | sampledSet | ) | `[inline, static]`

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:

  sampledSet | Sampled data set for which number of duplicated input parameters is returned.

$A Igor Feb12;

static void IG::Num::SampledDataSet::RemoveInputDuplicates | ( | SampledDataSet | sampledSet | ) | `[inline, static]`

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:

  sampledSet | Sampled data set from which elemets with duplicated input parameters are removed.

$A Igor Feb12;

static SampledDataSet IG::Num::SampledDataSet::CreateExampleLinear | ( | int | inputLength,
|  | int | outputLength,
|  | int | numElements
| ) |  | `[inline, static]`

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:

  inputLength | Dimension of input data (parameters).
  outputLength | Number of output values.
  numElements | Number of input/output pairs used as sampled data.

static SampledDataSet IG::Num::SampledDataSet::CreateExampleLinear | ( | int | inputLength,
|  | int | outputLength,
|  | int | numElements,
|  | IBoundingBox | region
| ) |  | `[inline, static]`

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:

  inputLength | Dimension of input data (parameters).
  outputLength | Number of output values.
  numElements | Number of input/output pairs used as sampled data.
  region | Bounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.

static SampledDataSet IG::Num::SampledDataSet::CreateExampleLinear | ( | int | inputLength,
|  | int | outputLength,
|  | int | numElements,
|  | IBoundingBox | region,
|  | IRandomGenerator | rand
| ) |  | `[inline, static]`

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:

  inputLength | Dimension of input data (parameters).
  outputLength | Number of output values.
  numElements | Number of input/output pairs used as sampled dataa.
  region | Bounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.
  rand | Random number generator that is used for sampling.

static SampledDataSet IG::Num::SampledDataSet::CreateExampleQuadratic | ( | int | inputLength,
|  | int | outputLength,
|  | int | numElements
| ) |  | `[inline, static]`

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:

  inputLength | Dimension of input data (parameters).
  outputLength | Number of output values.
  numElements | Number of input/output pairs used as sampled data.

static SampledDataSet IG::Num::SampledDataSet::CreateExampleQuadratic | ( | int | inputLength,
|  | int | outputLength,
|  | int | numElements,
|  | IBoundingBox | region
| ) |  | `[inline, static]`

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:

  inputLength | Dimension of input data (parameters).
  outputLength | Number of output values.
  numElements | Number of input/output pairs used as sampled data.
  region | Bounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.

static SampledDataSet IG::Num::SampledDataSet::CreateExampleQuadratic | ( | int | inputLength,
|  | int | outputLength,
|  | int | numElements,
|  | IBoundingBox | region,
|  | IRandomGenerator | rand
| ) |  | `[inline, static]`

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:

  inputLength | Dimension of input data (parameters).
  outputLength | Number of output values.
  numElements | Number of input/output pairs used as sampled data.
  region | Bounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.
  rand | Random number generator that is used for sampling.

static SampledDataSet IG::Num::SampledDataSet::CreateExample | ( | int | inputLength,
|  | int | outputLength,
|  | int | numElements,
|  | IBoundingBox | region,
|  | IScalarFunctionUntransformed[] | functions,
|  | IRandomGenerator | rand
| ) |  | `[inline, static]`

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:

  inputLength | Dimension of input data (parameters).
  outputLength | Number of output values.
  numElements | Number of input/output pairs used as sampled data.
  region | Bounding box defining the region in the space (of dimension inputLength) from which samples (input parameters) are taken randomly.
  functions | Scalar-valued functions (of vector argument) that are applied to input parameters to produce output values of the sampled data.
  rand | Random number generator that is used for sampling.

static SampledDataSet IG::Num::SampledDataSet::CreateExampleSimple | ( | int | inputLength,
|  | int | outputLength,
|  | int | numElements
| ) |  | `[inline, static]`

Craates and returns a sample object of the encompassing class.

Parameters:

  inputLength | Dimension of input data (parameters).
  outputLength | Number of output values.
  numElements | Number of input/output pairs used as sampled data.

override string IG::Num::SampledDataSet::ToString | ( |  | ) | `[inline]`

## Member Data Documentation

internal List<SampledDataElement> IG::Num::SampledDataSet::ElementList = new List<SampledDataElement>()`[protected]`

int IG::Num::SampledDataSet::_inputLength = -1`[protected]`

int IG::Num::SampledDataSet::_outputLength = -1`[protected]`

## Property Documentation

SampledDataElement [] IG::Num::SampledDataSet::Data`[get, set]`

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

int IG::Num::SampledDataSet::Length`[get]`

Gets the number of sampled data elements (input/output pairs) contained by the current sampled data set.

int IG::Num::SampledDataSet::InputLength`[get, set]`

Number of input parameters in sampled data elements. Less than 0 means unspecified.

int IG::Num::SampledDataSet::OutputLength`[get, set]`

Number of output values in sampled data elements. Less than 0 means unspecified.

SampledDataElement IG::Num::SampledDataSet::this[int which]`[get, set]`

Gets or sets specific data element.

Parameters:

  which | Index of data element.

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

- SampledData.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events