コード例 #1
0
 public override void SetUp()
 {
     base.SetUp();
     context = new PredictorContext(this);
     p = new Prediction().AddFilesTouchCountInCommitsPredictor();
     p.Init(this, new string[] { "1", "2" });
 }
コード例 #2
0
 public override void SetUp()
 {
     base.SetUp();
     context = new PredictorContext(this);
     p       = new Prediction().AddFilesTouchCountInCommitsPredictor();
     p.Init(this, new string[] { "1", "2" });
 }
コード例 #3
0
        private static CodeBlockSelectionExpression CodeInFilesTillRevision(this PredictorContext c)
        {
            c.SetValue("commits", (Func <CommitSelectionExpression, CommitSelectionExpression>)(e =>
                                                                                                e.TillRevision(c.GetValue <string>("till_revision"))
                                                                                                ));

            return(CodeInCommitsInFiles(c));
        }
コード例 #4
0
 private static CodeBlockSelectionExpression CodeInCommitsInFiles(this PredictorContext c)
 {
     return(c.SelectionDSL()
            .Commits().Reselect(
                c.GetValue <Func <CommitSelectionExpression, CommitSelectionExpression> >("commits")
                )
            .Files().Reselect(
                c.GetValue <Func <ProjectFileSelectionExpression, ProjectFileSelectionExpression> >("files")
                )
            .Modifications().InCommits().InFiles()
            .CodeBlocks().InModifications());
 }
コード例 #5
0
ファイル: Prediction.cs プロジェクト: BMichael998/msr-tools
 public virtual void Init(IRepositoryResolver repositories, IEnumerable<string> releases)
 {
     this.repositories = repositories;
     PredictionRelease = releases.Last();
     if (releases.Count() > 1)
     {
         TrainReleases = releases.Take(releases.Count() - 1);
     }
     else
     {
         TrainReleases = releases;
     }
     context = new PredictorContext(repositories);
 }
コード例 #6
0
ファイル: Prediction.cs プロジェクト: BMichael998/msr-tools
 public double[] GetPredictorValuesFor(PredictorContext c)
 {
     return predictors.Select(p => p(c)).ToArray();
 }