public training_data(training_data data) : this(fannfixedPINVOKE.new_training_data__SWIG_1(training_data.getCPtr(data)), true) { if (fannfixedPINVOKE.SWIGPendingException.Pending) { throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); } }
/*********************************************************************/ /* Method: CreateTrainFromCallback * Creates the training data from a user supplied function. * As the training data are numerable (data 1, data 2...), the user must write * a function that receives the number of the training data set (input,output) * and returns the set. * * Parameters: * dataCount - The number of training data * inputCount - The number of inputs per training data * outputCount - The number of ouputs per training data * callback - The user suplied delegate * * Parameters for the user delegate: * number - The number of the training data set * inputCount - The number of inputs per training data * outputCount - The number of ouputs per training data * input - The set of inputs * output - The set of desired outputs * * See also: * <ReadTrainFromFile>, <NeuralNet::TrainOnData>, * <fann_create_train_from_callback at http://libfann.github.io/fann/docs/files/fann_train-h.html#fann_create_train_from_callback> * * This function appears in FANN >= 2.1.0 */ public void CreateTrainFromCallback(uint dataCount, uint inputCount, uint outputCount, DataCreateCallback callback) { InternalData = new FannWrapperFixed.training_data(); Callback = callback; RawCallback = new data_create_callback(InternalCallback); fannfixedPINVOKE.training_data_create_train_from_callback(training_data.getCPtr(this.InternalData), dataCount, inputCount, outputCount, Marshal.GetFunctionPointerForDelegate(RawCallback)); }
public void init_weights(training_data data) { fannfixedPINVOKE.neural_net_init_weights(swigCPtr, training_data.getCPtr(data)); if (fannfixedPINVOKE.SWIGPendingException.Pending) { throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); } }
public void merge_train_data(training_data data) { fannfixedPINVOKE.training_data_merge_train_data(swigCPtr, training_data.getCPtr(data)); if (fannfixedPINVOKE.SWIGPendingException.Pending) { throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); } }
/* Constructor: TrainingData * Reads a file that stores training data. * * See also: * <ReadTrainFromFile>, <SetTrainData> or <CreateTrainFromCallback> */ public TrainingData(string filename) { InternalData = new FannWrapperFixed.training_data(); ReadTrainFromFile(filename); if (!ReadTrainFromFile(filename)) { throw new ArgumentException("Cannot read data from \"{0}\"", filename); } }
/* Constructor: TrainingData Reads a file that stores training data. See also: <ReadTrainFromFile>, <SetTrainData> or <CreateTrainFromCallback> */ public TrainingData(string filename) { InternalData = new FannWrapperFixed.training_data(); ReadTrainFromFile(filename); if (!ReadTrainFromFile(filename)) { throw new ArgumentException("Cannot read data from \"{0}\"", filename); } }
public float test_data(training_data data) { float ret = fannfixedPINVOKE.neural_net_test_data(swigCPtr, training_data.getCPtr(data)); if (fannfixedPINVOKE.SWIGPendingException.Pending) { throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public void merge_train_data(training_data data) { fannfixedPINVOKE.training_data_merge_train_data(swigCPtr, training_data.getCPtr(data)); if (fannfixedPINVOKE.SWIGPendingException.Pending) throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); }
internal TrainingData(training_data other) { InternalData = other; }
public void init_weights(training_data data) { fannfixedPINVOKE.neural_net_init_weights(swigCPtr, training_data.getCPtr(data)); if (fannfixedPINVOKE.SWIGPendingException.Pending) throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); }
/* Constructor: TrainingData Copy constructor constructs a copy of the training data. Corresponds to the C API <fann_duplicate_train_data at http://libfann.github.io/fann/docs/files/fann_train-h.html#fann_duplicate_train_data> function. */ public TrainingData(TrainingData data) { InternalData = new FannWrapperFixed.training_data(data.InternalData); }
public float test_data(training_data data) { float ret = fannfixedPINVOKE.neural_net_test_data(swigCPtr, training_data.getCPtr(data)); if (fannfixedPINVOKE.SWIGPendingException.Pending) throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); return ret; }
/* Constructor: TrainingData Default constructor creates an empty training data. Use <ReadTrainFromFile>, <SetTrainData> or <CreateTrainFromCallback> to initialize. */ public TrainingData() { InternalData = new FannWrapperFixed.training_data(); }
/*********************************************************************/ /* Method: CreateTrainFromCallback Creates the training data from a user supplied function. As the training data are numerable (data 1, data 2...), the user must write a function that receives the number of the training data set (input,output) and returns the set. Parameters: dataCount - The number of training data inputCount - The number of inputs per training data outputCount - The number of ouputs per training data callback - The user suplied delegate Parameters for the user delegate: number - The number of the training data set inputCount - The number of inputs per training data outputCount - The number of ouputs per training data input - The set of inputs output - The set of desired outputs See also: <ReadTrainFromFile>, <NeuralNet::TrainOnData>, <fann_create_train_from_callback at http://libfann.github.io/fann/docs/files/fann_train-h.html#fann_create_train_from_callback> This function appears in FANN >= 2.1.0 */ public void CreateTrainFromCallback(uint dataCount, uint inputCount, uint outputCount, DataCreateCallback callback) { InternalData = new FannWrapperFixed.training_data(); Callback = callback; RawCallback = new data_create_callback(InternalCallback); fannfixedPINVOKE.training_data_create_train_from_callback(training_data.getCPtr(this.InternalData), dataCount, inputCount, outputCount, Marshal.GetFunctionPointerForDelegate(RawCallback)); }
public training_data(training_data data) : this(fannfixedPINVOKE.new_training_data__SWIG_1(training_data.getCPtr(data)), true) { if (fannfixedPINVOKE.SWIGPendingException.Pending) throw fannfixedPINVOKE.SWIGPendingException.Retrieve(); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(training_data obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(training_data obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
/* Constructor: TrainingData * * Default constructor creates an empty training data. * Use <ReadTrainFromFile>, <SetTrainData> or <CreateTrainFromCallback> to initialize. */ public TrainingData() { InternalData = new FannWrapperFixed.training_data(); }
/* Constructor: TrainingData * * Copy constructor constructs a copy of the training data. * Corresponds to the C API <fann_duplicate_train_data at http://libfann.github.io/fann/docs/files/fann_train-h.html#fann_duplicate_train_data> function. */ public TrainingData(TrainingData data) { InternalData = new FannWrapperFixed.training_data(data.InternalData); }