Пример #1
0
 public SpatialBayes(List <List <double> > ls, double bgFactor, string name, ModelDisplayType dTy)
     : base(dTy, name)
 {
     startIndex = 1;
     localBg    = bgFactor;
     data       = ls;
     ProcessData();
 }
Пример #2
0
 public BayesPerBase(List <List <double> > bases, string name, ModelDisplayType dtype, bool fromStart)
     : base(dtype, name)
 {
     FromStart = fromStart;
     data      = bases;
     BGFactor  = makeBgFactor(data);
     ProcessData();
 }
Пример #3
0
        //double stdSize;

        public DoublesHisto(List <double> l, int buckets, string name, bool isMulti, ModelDisplayType dtype)
            : base(dtype, name)
        {
            totalHistPosition = 1;
            totalHistos       = 1;
            bcount            = buckets;
            l.Sort();
            data = new List <double> ();
            data.AddRange(l);
            totalCount = data.Count;
            avg        = Statistics.Mean(data);
            stdDev     = Statistics.StandardDeviation(data);
            if (!isMulti)
            {
                CountToBins();
            }
        }
Пример #4
0
        public MultiBayes(Dictionary <string, List <List <double> > > dict, ModelDisplayType mTy, MultiBayesLayout lyo)
        {
            layout = lyo;

            histos = new List <GraphingClass> ();


            if (layout == MultiBayesLayout.Sequential)
            {
                double bgFac = GetMegaBg(dict);
                int    cnt   = 0;
                foreach (KeyValuePair <string, List <List <double> > > kvp in dict)
                {
                    DivSize = kvp.Value.Count;
                    int tot = kvp.Value.Count;
                    histos.Add(new SpatialBayes(kvp.Value, bgFac, tot * cnt, kvp.Key, mTy));
                    cnt += 1;
                }
            }
            else
            {
                if (dict.Count == 1)
                {
                    foreach (KeyValuePair <string, List <List <double> > > kvp in dict)
                    {
                        histos.Add(new SpatialBayes(kvp.Value, kvp.Key, mTy));
                    }
                }
                else
                {
                    double bgFac = GetMegaBg(dict);

                    foreach (KeyValuePair <string, List <List <double> > > kvp in dict)
                    {
                        histos.Add(new SpatialBayes(kvp.Value, bgFac, kvp.Key, mTy));
                    }
                }
            }
        }
Пример #5
0
        public MultiHisto(Dictionary <string, List <double> > dict, int buckets, ModelDisplayType dtype) : base()
        {
            histos = new List <GraphingClass> ();

            double fullMax = 0;
            double fullMin = 999999999;
            double stdMin  = 999999999;
            double stdMax  = 0;

            foreach (KeyValuePair <string, List <double> > kvp in dict)
            {
                if (kvp.Value.Count > 5)
                {
                    DoublesHisto h = new DoublesHisto(kvp.Value, buckets, kvp.Key, true, dtype);
                    histos.Add(h);

                    fullMax = Math.Max(h.GetLocalMax(), fullMax);
                    fullMin = Math.Min(h.GetLocalMin(), fullMin);
                    stdMax  = Math.Max(h.GetPlusTwoStdDevs(), stdMax);
                    stdMin  = Math.Min(h.GetMinusTwoStdDevs(), stdMin);
                }
            }

            stdMin = Math.Max(0, stdMin);
            List <double> increments = DoublesHisto.CreateBoundaryIncrements(fullMin, fullMax, stdMin, stdMax, buckets);

            int pos = 1;
            int cnt = histos.Count;

            foreach (DoublesHisto h in histos)
            {
                h.SetBoundaryIncrements(increments);
                h.CountToBins(fullMin);
                h.SetTotalHistos(cnt, pos);
                pos++;
            }
        }
Пример #6
0
 public GraphingClass(ModelDisplayType ty, string name)
 {
     dType    = ty;
     lineName = name;
 }
Пример #7
0
 public RankLine(Dictionary <string, List <double> > ranks, string name, ModelDisplayType dtype)
     : base(dtype, name)
 {
     Data   = ranks;
     points = CalculateHistoCoords();
 }