Esempio n. 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="length">The dimensionality of the datapoints</param>
 /// <param name="modifier">The modifier to apply to the value at a dimension</param>
 /// <param name="chooseRandomly">Whether to choose dimensions randomly, or in a round-robin manner.</param>
 public UnaryFeatureFactory(int length, OutputModifier modifier, bool chooseRandomly)
 {
     _length = length;
     _possibleFeatureCount = _length;
     _modifier             = modifier;
     _random = chooseRandomly;
 }
Esempio n. 2
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);
 }
Esempio n. 3
0
 public Multiply(
     int index1, int index2,
     OutputModifier modifier
     )
     : base(index1, index2, modifier)
 {
 }
Esempio n. 4
0
 public Divide(
     int index1, int index2,
     OutputModifier modifier
     )
     : base(index1, index2, modifier)
 {
 }
Esempio n. 5
0
 public Log(
     int index1, int index2,
     OutputModifier modifier
     )
     : base(index1, index2, modifier)
 {
 }
Esempio n. 6
0
 public Subtract(
     int index1, int index2,
     OutputModifier modifier
     )
     : base(index1, index2, modifier)
 {
 }
Esempio n. 7
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="boxRows">Number of rows in the box around a point in the image that can be used</param>
 /// <param name="boxColumns">Number of columns in the box around a point in the image that can be used</param>
 /// <param name="numChannels">Number of channels in the image to choose from</param>
 /// <param name="modifier">Modifier to apply to the output of the feature</param>
 public UnaryImageFeatureFactory(int boxRows, int boxColumns, int numChannels, OutputModifier modifier)
 {
     _boxRows              = boxRows;
     _boxColumns           = boxColumns;
     _numChannels          = numChannels;
     _possibleFeatureCount = (2 * _boxRows + 1) * (2 * _boxColumns + 1) * _numChannels;
     _modifier             = modifier;
 }
Esempio n. 8
0
 public UnaryFeature(int row, int column, int channel, OutputModifier modifier)
 {
     _row              = row;
     _column           = column;
     _channel          = channel;
     _useLog           = (modifier & OutputModifier.Log) == OutputModifier.Log;
     _useAbsoluteValue = (modifier & OutputModifier.AbsoluteValue) == OutputModifier.AbsoluteValue;
 }
Esempio n. 9
0
 public Multiply(
     int row1, int column1, int channel1,
     int row2, int column2, int channel2,
     OutputModifier modifier
     )
     : base(row1, row2, channel1, row2, column2, channel2, modifier)
 {
 }
Esempio n. 10
0
 public Divide(
     int row1, int column1, int channel1,
     int row2, int column2, int channel2,
     OutputModifier modifier
     )
     : base(row1, row2, channel1, row2, column2, channel2, modifier)
 {
 }
Esempio n. 11
0
 public Subtract(
     int row1, int column1, int channel1,
     int row2, int column2, int channel2,
     OutputModifier modifier
     )
     : base(row1, row2, channel1, row2, column2, channel2, modifier)
 {
 }
Esempio n. 12
0
 public BinaryFeature(
     int index1, int index2,
     OutputModifier modifier
     )
 {
     _index1        = index1;
     _index2        = index2;
     _absoluteValue = (modifier & OutputModifier.AbsoluteValue) == OutputModifier.AbsoluteValue;
 }
Esempio n. 13
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;
        }
Esempio n. 14
0
 public BinaryFeature(
     int row1, int column1, int channel1,
     int row2, int column2, int channel2,
     OutputModifier modifier
     )
 {
     _row1          = row1;
     _row2          = row2;
     _column1       = column1;
     _column2       = column2;
     _channel1      = channel1;
     _channel2      = channel2;
     _absoluteValue = (modifier & OutputModifier.AbsoluteValue) == OutputModifier.AbsoluteValue;
 }
Esempio n. 15
0
 public UnaryFeature(int index, OutputModifier modifier)
 {
     _index            = index;
     _useLog           = (modifier & OutputModifier.Log) == OutputModifier.Log;
     _useAbsoluteValue = (modifier & OutputModifier.AbsoluteValue) == OutputModifier.AbsoluteValue;
 }