public override void Init(IRepository repository, IEnumerable<string> releases)
        {
            base.Init(repository, releases);

            regression = new LogisticRegression();

            string previousRevision = null;
            foreach (var revision in TrainReleases)
            {
                foreach (var file in GetFilesInRevision(revision))
                {
                    context
                        .SetCommits(previousRevision, revision)
                        .SetFiles(e => e.IdIs(file.ID));

                    regression.AddTrainingData(
                        GetPredictorValuesFor(context),
                        FileHasDefects(file.ID, revision, previousRevision)
                    );
                }
                previousRevision = revision;
            }

            regression.Train();

            context.SetCommits(TrainReleases.Last(), PredictionRelease);
        }
        public override void Init(IRepository repository, IEnumerable <string> releases)
        {
            base.Init(repository, releases);

            regression = new LogisticRegression();

            string previousRevision = null;

            foreach (var revision in TrainReleases)
            {
                foreach (var file in GetFilesInRevision(revision))
                {
                    context
                    .SetCommits(previousRevision, revision)
                    .SetFiles(e => e.IdIs(file.ID));

                    regression.AddTrainingData(
                        GetPredictorValuesFor(context),
                        FileHasDefects(file.ID, revision, previousRevision)
                        );
                }
                previousRevision = revision;
            }

            regression.Train();

            context.SetCommits(TrainReleases.Last(), PredictionRelease);
        }