public MultiValueSplitSelectorForCategoricalOutcome(
     IDataSplitter categoricalSplitter, 
     IBinaryNumericDataSplitter binarySplitter,
     IBinaryNumericAttributeSplitPointSelector binaryNumericBestSplitPointSelector)
     : base(categoricalSplitter, binarySplitter, binaryNumericBestSplitPointSelector)
 {
 }
示例#2
0
 public MultiValueSplitSelectorForCategoricalOutcome(
     IDataSplitter categoricalSplitter,
     IBinaryNumericDataSplitter binarySplitter,
     IBinaryNumericAttributeSplitPointSelector binaryNumericBestSplitPointSelector)
     : base(categoricalSplitter, binarySplitter, binaryNumericBestSplitPointSelector)
 {
 }
 protected BaseSplitSelectorForCategoricalOutcome(
     IDataSplitter binarySplitter, 
     IBinaryNumericDataSplitter binaryNumericSplitter, 
     IBinaryNumericAttributeSplitPointSelector binaryNumericBestSplitPointSelector)
 {
     CategoricalDataSplitter = binarySplitter;
     BinaryNumericDataSplitter = binaryNumericSplitter;
     BinaryNumericBestSplitingPointSelector = binaryNumericBestSplitPointSelector;
 }
示例#4
0
 protected BaseSplitSelectorForCategoricalOutcome(
     IDataSplitter binarySplitter,
     IBinaryNumericDataSplitter binaryNumericSplitter,
     IBinaryNumericAttributeSplitPointSelector binaryNumericBestSplitPointSelector)
 {
     CategoricalDataSplitter   = binarySplitter;
     BinaryNumericDataSplitter = binaryNumericSplitter;
     BinaryNumericBestSplitingPointSelector = binaryNumericBestSplitPointSelector;
 }
 public BestSplitSelectorsTests()
 {
     ICategoricalImpurityMeasure<string> shannonEntropy = new ShannonEntropy<string>();
     IBinaryDataSplitter binaryDataSplitter = new BinaryDiscreteDataSplitter();
     binaryNumericBestSplitPointSelector = new ClassBreakpointsNumericSplitFinder();
     binaryBestSplitSelector = new BinarySplitSelectorForCategoricalOutcome(binaryDataSplitter, binaryNumericDataSplitter, binaryNumericBestSplitPointSelector);
     categoricalBinarySplitQualityChecker = new InformationGainCalculator<string>(shannonEntropy, shannonEntropy);
     categoricalMultiValueSplitQualityChecker = new InformationGainCalculator<string>(shannonEntropy, shannonEntropy);
     multiValueCategoricalDataSplitter = new MultiValueDiscreteDataSplitter();
     multiValueBestSplitSelector = new MultiValueSplitSelectorForCategoricalOutcome(multiValueCategoricalDataSplitter, binaryNumericDataSplitter, binaryNumericBestSplitPointSelector);
     dynamicProgrammingBestNumericSplitFinder = new DynamicProgrammingNumericSplitFinder();
 }
示例#6
0
        public BestSplitSelectorsTests()
        {
            ICategoricalImpurityMeasure <string> shannonEntropy = new ShannonEntropy <string>();
            IBinaryDataSplitter binaryDataSplitter = new BinaryDiscreteDataSplitter();

            binaryNumericBestSplitPointSelector      = new ClassBreakpointsNumericSplitFinder();
            binaryBestSplitSelector                  = new BinarySplitSelectorForCategoricalOutcome(binaryDataSplitter, binaryNumericDataSplitter, binaryNumericBestSplitPointSelector);
            categoricalBinarySplitQualityChecker     = new InformationGainCalculator <string>(shannonEntropy, shannonEntropy);
            categoricalMultiValueSplitQualityChecker = new InformationGainCalculator <string>(shannonEntropy, shannonEntropy);
            multiValueCategoricalDataSplitter        = new MultiValueDiscreteDataSplitter();
            multiValueBestSplitSelector              = new MultiValueSplitSelectorForCategoricalOutcome(multiValueCategoricalDataSplitter, binaryNumericDataSplitter, binaryNumericBestSplitPointSelector);
            dynamicProgrammingBestNumericSplitFinder = new DynamicProgrammingNumericSplitFinder();
        }
示例#7
0
        public void Setup()
        {
            // Make a fake Transponder Data Receiver
            _fakeIDataSplitter = Substitute.For <IDataSplitter>();
            // Inject the fake TDR
            _uut = new Filter(_fakeIDataSplitter);

            receivedArgs   = null;
            NumberOfEvents = 0;

            _uut.RelevantAirplanesReceivedEvent +=
                (s, a) => {
                receivedArgs = a;
                NumberOfEvents++;
            };
        }
    private void SetConfiguration()
    {
        switch (splitStrategie)
        {
        case SplitStrategy.TakeEverySecond:
            splitter = new TakeEverySecondDataSplitter();
            break;

        case SplitStrategy.TwoParts:
            splitter = new TwoPartsDataSplitter();
            break;

        case SplitStrategy.Interval:
            splitter = new IntervalDataSplitter();
            break;

        default:
            splitter = new TwoPartsDataSplitter();
            break;
        }

        switch (interpolationStrategy)
        {
        case InterpolationStrategy.Linear:
            interpolationFunction = new LinearInterpolationFunction();
            break;

        case InterpolationStrategy.Quadratic:
            interpolationFunction = new QuadraticInterpolationFunction();
            break;

        case InterpolationStrategy.Bezier:
            interpolationFunction = new BezierInterpolationFunction();
            break;

        default:
            interpolationFunction = null;
            break;
        }
    }
示例#9
0
 private CsvFileParser <TestResult> GetParser(string input, IDataSplitter splitter = null)
 => new CsvFileParser <TestResult>(input, splitter ?? _defaultDataSplitter, new CultureInfo("fr-FR"));
 public ValuesController(IRepository repository, IDataSplitter dataSplitter)
 {
     _repository   = repository ?? throw new ControllerException("Repository null");
     _dataSplitter = dataSplitter ?? throw new ControllerException("DataSplitter null");
 }
示例#11
0
 public RebelSplitterTest()
 {
     _rebelSplitter = new RebelSplitter();
 }
示例#12
0
 public ValuesControllerTest()
 {
     _dataSplitter   = new RebelSplitter();
     _fakeRepository = new FileRepository(new FakeFileWriter());
 }
 public void InitTest()
 {
     _verificationObject = CreateByteList();
     _splitter = new RecordSizeDataSplitter();
     _configurationSerializer = new ConfigurationSerializerBase();
 }
示例#14
0
 protected ScheduledStream(IStreamScheduler scheduler)
 {
     dataSplitter    = scheduler.DataSplitter;
     packetProcessor = scheduler.PacketProcessor;
     maxParallelTransfersSemaphore = new SemaphoreSlim(scheduler.MaxParallelTransfers);
 }
示例#15
0
 public Filter(IDataSplitter dataSplitter)
 {
     this._dataSplitter = dataSplitter;
     this._dataSplitter.DataReceivedEvent += FilterInput;
 }