예제 #1
0
 private void ValidateAlgorithmSettings(GbmAlgorithmSettings algoSettings)
 {
     throw new NotImplementedException();
 }
예제 #2
0
 public GbmModelBuildService(GbmAlgorithmSettings algoSettings, ModellingDataSettings dataSettings)
 {
     _algoSettings = algoSettings;
     _dataSettings = dataSettings;
 }
예제 #3
0
 private void FindBestCategoricalSplit(BinInfo parent, double parentInformation, BinInfo[] bins, SplitInfo split,
                                       bool doesDefaultExist, GbmAlgorithmSettings algorithmSettings)
 {
     throw new NotImplementedException();
 }
예제 #4
0
        public void FindBestSplit(IDictionary <int, SplitInfo> splits, TreeNodePool pool, GbmAlgorithmSettings algorithmSettings)
        {
            var nodes = splits.Keys;

            foreach (var nodeId in nodes)
            {
                var parentT     = pool.GetBinInfoTraining(nodeId);
                var parentTGain = GetLeafSplitGain(parentT);
                var binsT       = _data[nodeId];


                var split            = splits[nodeId];
                var defaultBinInfo   = binsT[0];
                var doesDefaultExist = (defaultBinInfo.SumWeights > 0);
                split.DefaultIdx = Bin.DefaultIndex;
                if (_binType == BinType.Numerical)
                {
                    ScanFromLeft(parentT, parentTGain, binsT, split, doesDefaultExist, algorithmSettings);
                    if (doesDefaultExist)
                    {
                        ScanFromRight(parentT, parentTGain, binsT, split, true, algorithmSettings);
                    }
                }
                else if (_binType == BinType.Categorical)
                {
                    FindBestCategoricalSplit(parentT, parentTGain, binsT, split, doesDefaultExist, algorithmSettings);
                }
                else
                {
                    throw new InvalidOperationException("Invalid BinType enumeration");
                }
            }
        }
예제 #5
0
 private void ScanFromLeft(BinInfo parentT, double parentTGain, BinInfo[] binsT, SplitInfo split, bool doesDefaultExist, GbmAlgorithmSettings algorithmSettings)
 {
     throw new NotImplementedException();
 }