상속: global::System.IDisposable
예제 #1
0
 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();
     }
 }
예제 #2
0
        /*********************************************************************/

        /* 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));
        }
예제 #3
0
파일: neural_net.cs 프로젝트: ktoosiu/MSI
 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();
     }
 }
예제 #4
0
 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();
     }
 }
예제 #5
0
 /* 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);
     }
 }
예제 #6
0
        /* 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);
            }
        }
예제 #7
0
파일: neural_net.cs 프로젝트: ktoosiu/MSI
        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);
        }
예제 #8
0
 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();
 }
예제 #9
0
 internal TrainingData(training_data other)
 {
     InternalData = other;
 }
예제 #10
0
 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();
 }
예제 #11
0
        /* 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);
        }
예제 #12
0
 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;
 }
예제 #13
0
        /* Constructor: TrainingData

            Default constructor creates an empty training data.
            Use <ReadTrainFromFile>, <SetTrainData> or <CreateTrainFromCallback> to initialize.
        */
        public TrainingData()
        {
            InternalData = new FannWrapperFixed.training_data();
        }
예제 #14
0
        /*********************************************************************/
        /* 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));
        }
예제 #15
0
 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();
 }
예제 #16
0
 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;
 }
예제 #17
0
 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);
 }
예제 #18
0
 /* Constructor: TrainingData
  *
  *  Default constructor creates an empty training data.
  *  Use <ReadTrainFromFile>, <SetTrainData> or <CreateTrainFromCallback> to initialize.
  */
 public TrainingData()
 {
     InternalData = new FannWrapperFixed.training_data();
 }
예제 #19
0
 /* 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);
 }