Exemplo n.º 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="length">The dimensionality of the data points</param>
 /// <param name="combo">How to combine two different dimensions</param>
 /// <param name="modifier">Which modification to apply to the result</param>
 public BinaryFeatureFactory(int length, BinaryCombination combo, OutputModifier modifier)
 {
     _length               = length;
     _modifier             = modifier;
     _combo                = combo;
     _possibleFeatureCount = length * (length - 1);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="boxRows">Rows in the box around a data point to sample points</param>
        /// <param name="boxColumns">Rows in the box around a data point to sample points</param>
        /// <param name="numChannels">Number of channels to sample from</param>
        /// <param name="combo">Which binary combination to use</param>
        /// <param name="mixChannels">Whether to mix one channel with another, or to choose both points from the same channel</param>
        /// <param name="modifier">Modifier on the output of the feature</param>
        public BinaryImageFeatureFactory(int boxRows, int boxColumns, int numChannels, BinaryCombination combo, bool mixChannels, OutputModifier modifier)
        {
            _boxRows     = boxRows;
            _boxColumns  = boxColumns;
            _numChannels = numChannels;
            _mixChannels = mixChannels;
            _modifier    = modifier;
            _combo       = combo;
            int numOperands       = (2 * boxRows + 1) * (2 * boxColumns + 1);
            int channelMultiplier = mixChannels ? numChannels * numChannels : numChannels;

            _possibleFeatureCount = numOperands * numOperands * channelMultiplier;
        }