Пример #1
0
            /// <summary>
            /// Report the values for a certain epoch / iteration to a passed ChartPanel.
            /// </summary>
            /// <param name="valuesByIdentifier">The values by their identifier.</param>
            /// <param name="reportEpochIteration">A boolean indicating whether or not to report the current epoch / iteration.</param>
            /// <param name="epoch">The current epoch.</param>
            /// <param name="iteration">The current iteration.</param>
            protected override void ReportValues(IDictionary <string, object> valuesByIdentifier, bool reportEpochIteration, int epoch, int iteration)
            {
                ChartPanel <TChart, TSeries, TChartValues, TData> chartPanel = (ChartPanel <TChart, TSeries, TChartValues, TData>)ParameterRegistry[ChartPanelIdentifier];

                chartPanel.Add((TData)valuesByIdentifier.Values.First());

                //TODO: multiple values (in same series)
                //ChartPanel.Dispatcher.InvokeAsync(() => ChartPanel.Series.Values.Add(valuesByIdentifier.Values.First()));
            }
Пример #2
0
 /// <summary>
 /// Create a hook with a certain time step and a set of required global registry entries.
 /// </summary>
 /// <param name="panel">The panel this reporter belongs to.</param>
 /// <param name="validationIteratorName">The name of the validation data iterator to use (as in the trainer).</param>
 /// <param name="timestep">The time step.</param>
 /// <param name="tops">The tops that will get reported.</param>
 public ChartValidationAccuracyReport(ChartPanel <CartesianChart, LineSeries, ChartValues <double>, double> panel, string validationIteratorName, ITimeStep timestep, params int[] tops) : base(validationIteratorName, timestep, tops)
 {
     ParameterRegistry[PanelIdentifier] = panel;
 }
Пример #3
0
 /// <summary>
 /// Create a new <see ref="VisualValueReportHook"/> fully prepared to report values.
 /// </summary>
 /// <param name="chartPanel">The chartpanel to which points will get added.</param>
 /// <param name="valueIdentifiers">The identifiers for the <see cref="AccumulatedValueReporter"/>; these values will get plotted.</param>
 /// <param name="timestep">The <see cref="TimeStep"/> for the hook (i.e. execution definition).</param>
 public VisualAccumulatedValueReporterHook(ChartPanel <TChart, TSeries, TChartValues, TData> chartPanel, string[] valueIdentifiers, ITimeStep timestep, bool averageMode = false) : base(valueIdentifiers, timestep, averageMode, false)
 {
     ParameterRegistry[ChartPanelIdentifier] = chartPanel;
 }
Пример #4
0
            /// <summary>
            /// Execute the report for every given top.
            /// </summary>
            /// <param name="data">The mapping between the tops specified in the constructor and the score of the top.</param>
            protected override void Report(IDictionary <int, double> data)
            {
                base.Report(data);
                ChartPanel <CartesianChart, LineSeries, ChartValues <double>, double> panel = (ChartPanel <CartesianChart, LineSeries, ChartValues <double>, double>)ParameterRegistry[PanelIdentifier];

                int i = 0;

                foreach (KeyValuePair <int, double> top in data)
                {
                    panel.Add(top.Value * 100, i++);
                }
            }