Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/14 13:28:31 (10 years ago)
Author:
rstoll
Message:
  • StatisticsView column specific information added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/StatisticsView.cs

    r10374 r10534  
    5353      }
    5454
     55      columns[0].HeaderCell.Value = "Type";
     56      columns[1].HeaderCell.Value = "Missing Values";
     57      columns[2].HeaderCell.Value = "Min";
     58      columns[3].HeaderCell.Value = "Max";
     59      columns[4].HeaderCell.Value = "Median";
     60      columns[5].HeaderCell.Value = "Average";
     61      columns[6].HeaderCell.Value = "std. Deviation";
     62      columns[7].HeaderCell.Value = "Variance";
     63      columns[8].HeaderCell.Value = "Most Common Value";
     64      columns[9].HeaderCell.Value = "Num. diff. Values";
     65
    5566      for (int i = 0; i < logic.GetColumnCount(); ++i) {
    5667        List<string> list;
     
    7283      dataGridView.Columns.Clear();
    7384      dataGridView.Columns.AddRange(columns);
    74       dataGridView.RowCount = columnsRowsMatrix[0].Count;
     85      dataGridView.RowCount = columnsRowsMatrix.Count;
    7586
     87      for (int i = 0; i < columnsRowsMatrix.Count; ++i) {
     88        dataGridView.Rows[i].HeaderCell.Value = logic.GetVariableName(i);
     89      }
     90      dataGridView.AllowUserToResizeColumns = true;
    7691    }
    7792
     
    115130        logic.GetMin<DateTime>(columnIndex).ToString(),
    116131        logic.GetMax<DateTime>(columnIndex).ToString(),
    117         "", //median
    118         "", //average
    119         "", //standard deviation
    120         "", //variance
    121         logic.GetMostCommonValue<string>(columnIndex).ToString(),
    122         logic.GetDifferentValuesCount<string>(columnIndex).ToString()
     132        logic.GetMedianDateTime(columnIndex).ToString(),
     133        logic.GetAverageDateTime(columnIndex).ToString(),
     134        logic.GetStandardDeviation(columnIndex).ToString(),
     135        logic.GetVariance(columnIndex).ToString(), //variance
     136        logic.GetMostCommonValue<DateTime>(columnIndex).ToString(),
     137        logic.GetDifferentValuesCount<DateTime>(columnIndex).ToString()
    123138      };
    124139    }
     
    129144
    130145    private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
    131       if (Content != null && e.RowIndex < columnsRowsMatrix.Count && e.ColumnIndex < Content.StatisticsLogic.GetColumnCount()) {
    132         dataGridView[e.ColumnIndex, e.RowIndex].Value = columnsRowsMatrix[e.ColumnIndex][e.RowIndex];
     146      if (Content != null && e.RowIndex < columnsRowsMatrix.Count && e.ColumnIndex < columnsRowsMatrix[0].Count) {
     147        e.Value = columnsRowsMatrix[e.RowIndex][e.ColumnIndex];
    133148      }
    134149    }
Note: See TracChangeset for help on using the changeset viewer.