Beispiel #1
0
        public static Entrees GetDefaults(bool distLogNorm = true, bool useBWModel = false)
        {
            Entrees e = new Entrees();

            if (useBWModel)
            {
                e.Observations = String.Join("\r\n", (new ValueTuple <double, string>[] { (40.1, Properties.Resources.Worker + "-10"), (28.5, Properties.Resources.Worker + "-02"), (48.5, Properties.Resources.Worker + "-09"), (87.0, Properties.Resources.Worker + "-01"), (6.73, Properties.Resources.Worker + "-05"), (105, Properties.Resources.Worker + "-07"), (64.6, Properties.Resources.Worker + "-01"), (87.5, Properties.Resources.Worker + "-06"), (6.38, Properties.Resources.Worker + "-02"), (68.6, Properties.Resources.Worker + "-06"), (41.4, Properties.Resources.Worker + "-10"), (92.2, Properties.Resources.Worker + "-08"), (19.1, Properties.Resources.Worker + "-02"), (67.9, Properties.Resources.Worker + "-08"), (345, Properties.Resources.Worker + "-01"), (63.7, Properties.Resources.Worker + "-04"), (17.6, Properties.Resources.Worker + "-03"), (89.1, Properties.Resources.Worker + "-07"), (59.8, Properties.Resources.Worker + "-09"), (87.4, Properties.Resources.Worker + "-01"), (89.2, Properties.Resources.Worker + "-04"), (82.3, Properties.Resources.Worker + "-08"), (12.6, Properties.Resources.Worker + "-05"), (198, Properties.Resources.Worker + "-07"), (25.1, Properties.Resources.Worker + "-03") }).Select(k => k.Item1.ToString() + "\t" + k.Item2).ToArray());
Beispiel #2
0
 public void Update(Entrees e, Model model, bool showProgress = false)
 {
     if (model.Valid)
     {
         model.Compute();
         afficherResultats(model.Result, model.ResultParams);
     }
 }
Beispiel #3
0
 public Resultats(Entrees e, Model m, McmcParameters mcmc, Window mw)
 {
     InitializeComponent();
     Reset(e, m);
     KeepBurnin      = mcmc.MonitorBurnin;
     CsvSep          = mcmc.CsvSeparator;
     NumHistoClasses = mcmc.NumHistoClasses;
     barreProg       = new ResultatsBarreProg(this);
     if (mw != null)
     {
         this.Left = mw.Left + mw.Width;
         this.Top  = mw.Top;
     }
     Update(e, m);
 }
Beispiel #4
0
        private void ToggleModel(bool distLogNormal, bool useBWModel, string senderName = null)
        {
            ModelParams    = SEGInformedVarModelParameters.GetDefaults(distLogNormal);
            BwModelParams  = BWModelParameters.GetDefaults(distLogNormal);
            BWUModelParams = BWModelParameters_UniformPriorOnSDs.GetDefaults(distLogNormal);

            Entrs = Entrees.GetDefaults(distLogNormal, useBWModel);

            foreach (TextBox tb in FindVisualChildren <TextBox>(this))
            {
                try
                {
                    BindingProxy bp = tb.FindResource("boundsProxy") as BindingProxy;
                    bp.Bounds.setState(distLogNormal);
                    bp.MinValue = bp.Bounds.Minimum;
                    bp.MaxValue = bp.Bounds.Maximum;
                } catch (ResourceReferenceKeyNotFoundException)
                {
                }
            }
            MECanvas.Visibility = (bool)UseModelGES.IsChecked ? Visibility.Visible : Visibility.Hidden;
            MERange             = resetMeasErrRange();

            SDRange = UninformativeModelParameters.GetDefaults(distLogNormal).SDRange;

            if (senderName.StartsWith("UseModel"))
            {
                if (useBWModel)
                {
                    BWCanvas.Margin         = DAPLabel.Margin;
                    BWInitValsCanvas.Margin = InitValLabel.Margin;
                }
                foreach (Canvas canv in FindVisualChildren <Canvas>(this))
                {
                    if (canv.Name.StartsWith("BW"))
                    {
                        canv.Visibility = canv.Visibility == Visibility.Hidden ? Visibility.Visible : Visibility.Hidden;
                    }
                }
            }
            OnPropertyChanged();
        }
Beispiel #5
0
        public ResultatsNumeriques(double[] muChain, double[] sigmaChain, Entrees e, bool distri_log_normal = true, Dictionary <String, double[]> burninChains = null, String csvSep = "", double[] sigmaWithinChain = null, Dictionary <String, double[]> muWorkerChains = null)
        {
            MuChain          = muChain;
            SigmaChain       = sigmaChain;
            SigmaWithinChain = sigmaWithinChain;
            MuWorkerChains   = muWorkerChains;
            ProbCred         = e.ProbCred;
            Oel                              = e.VLE;
            FracThreshold                    = e.FracDepassementLimite;
            TargetPerc                       = e.CentileCritique;
            OverexposureRiskThreshold        = e.SeuilRisqueSurexpo;
            WithinWorkerCorrelationThreshold = e.SeuilCorrelationIntraTravailleur;
            RbRatioCoverage                  = e.CouvertureRatioRb;
            IndivOverexpoProbThreshold       = e.SeuilProbSurexpoIndiv;

            DistributionLogNormale = distri_log_normal;
            SEGModel = sigmaWithinChain == null;

            BurninChains = burninChains;
            CsvSep       = csvSep;
        }
Beispiel #6
0
 public void Reset(Entrees e, Model model)
 {
     entrees        = e;
     DistrLogNormal = model.OutcomeIsLogNormallyDistributed;
     SEGModel       = model is SEGInformedVarModel || model is SEGUninformativeModel;
 }