static get properties()

in tensorflow_model_analysis/frontend/tfma-plot/tfma-plot.js [132:321]


  static get properties() {
    return {
      /**
       * Available plot types.
       * @type {!Array<tfma.PlotTypes>|undefined}
       */
      availableTypes: {type: Array},

      /**
       * The initial chosen plot type. Resets to null after the user switches
       * to a new tab.
       * @type {?tfma.PlotTypes}
       */
      initialType: {type: String, observer: 'initialTypeChanged_'},

      /** @type {!Object} */
      data: {type: Object},

      /** @type {string} */
      heading: {type: String},

      /**
       * An array of configuration for available tabs.
       * @type {!Array<!Object>}
       * @private
       */
      availableTabs_:
          {type: Array, computed: 'computeAvailableTabs_(availableTypes)'},

      /**
       * @type {boolean}
       */
      loading: {type: Boolean, reflectToAttribute: true},

      error_: {
        type: Boolean,
        reflectToAttribute: true,
        computed: 'computeError_(loading, data)'
      },

      /**
       * The name of the selected tab.
       * @type {string}
       * @private
       */
      selectedTab_: {type: String, observer: 'selectedTabChanged_'},

      /**
       * A map of all tab names.
       * @type {!Object<string>}
       * @private
       */
      tabNames_: {
        type: Object,
        value: {
          'Accuracy': TABS.ACCURACY_CHARTS,
          'Calibration': TABS.CALIBRATION_PLOT,
          'Gain': TABS.GAIN_CHART,
          'Prediction': TABS.PREDICTION_DISTRIBUTION,
          'Macro': TABS.MACRO_PRECISION_RECALL,
          'Micro': TABS.MICRO_PRECISION_RECALL,
          'MULTI_CLASS_CONFUSION_MATRIX': TABS.MULTI_CLASS_CONFUSION_MATRIX,
          'MULTI_LABEL_CONFUSION_MATRIX': TABS.MULTI_LABEL_CONFUSION_MATRIX,
          'Precision': TABS.PRECISION_RECALL,
          'Residual': TABS.RESIDUAL_PLOT,
          'ROC': TABS.ROC,
          'Weighted': TABS.WEIGHTED_PRECISION_RECALL,
        }
      },

      /**
       * A map of all chart titles.
       * @type {!Object<string>}
       * @private
       */
      chartTitles_: {
        type: Object,
        value: {
          'Accuracy': TITLES.ACCURACY_CHARTS,
          'Calibration': TITLES.CALIBRATION_PLOT,
          'Gain': TITLES.GAIN_CHART,
          'Prediction': TITLES.PREDICTION_DISTRIBUTION,
          'Macro': TITLES.MACRO_PRECISION_RECALL,
          'Micro': TITLES.MICRO_PRECISION_RECALL,
          'MultiClassConfusionMatrix': TITLES.MULTI_CLASS_CONFUSION_MATRIX,
          'MultiLabelConfusionMatrix': TITLES.MULTI_LABEL_CONFUSION_MATRIX,
          'Precision': TITLES.PRECISION_RECALL,
          'Residual': TITLES.RESIDUAL_PLOT,
          'ROC': TITLES.ROC,
          'Weighted': TITLES.WEIGHTED_PRECISION_RECALL,
        }
      },

      /**
       * The data used by the calibration plot.
       * @type {!Array<!Object>}
       * @private
       */
      calibrationData_:
          {type: Array, computed: 'computeCalibrationData_(data)'},

      /**
       * The data used by the precision-recall-curve.
       * @type {!Array<!Object>}
       * @private
       */
      precisionRecallCurveData_:
          {type: Array, computed: 'computePrecisionRecallCurveData_(data)'},

      /**
       * The data used by the macro precision-recall-curve.
       * @type {!Array<!Object>}
       * @private
       */
      macroPrecisionRecallCurveData_: {
        type: Array,
        computed: 'computeMacroPrecisionRecallCurveData_(data)'
      },

      /**
       * The data used by the micro precision-recall-curve.
       * @type {!Array<!Object>}
       * @private
       */
      microPrecisionRecallCurveData_: {
        type: Array,
        computed: 'computeMicroPrecisionRecallCurveData_(data)'
      },

      /**
       * The data for multi-class confusion matrix.
       * @type {!Array<!Object>}
       * @private
       */
      multiClassConfusionMatrixData_: {
        type: Object,
        computed: 'computeMultiClassConfusionMatrixData_(data)',
      },

      /**
       * The data for multi-label confusion matrix.
       * @type {!Array<!Object>}
       * @private
       */
      multiLabelConfusionMatrixData_: {
        type: Object,
        computed: 'computeMultiLabelConfusionMatrixData_(data)',
      },

      /**
       * The data used by the weighted precision-recall-curve.
       * @type {!Array<!Object>}
       * @private
       */
      weightedPrecisionRecallCurveData_: {
        type: Array,
        computed: 'computeWeightedPrecisionRecallCurveData_(data)'
      },

      /**
       * Whether the component should be rendered in flat layout. When in flat
       * layout, the user cannot go back to tabbed view.
       * @type {boolean}
       */
      flat: {type: Boolean, value: false, observer: 'flatChanged_'},

      /**
       * Whether to show all charts at once.
       * @private {boolean}
       */
      showAll_: {type: Boolean, value: false, notify: true},


      /**
       * A map of charts where the key is the name attribute that is also used
       * for tab selection.
       * @private {!Object<!Element>}
       */
      chartsMap_: {type: Object},

      /**
       * A map where the key is tfma.PlotTypes and the value is the
       * desired subtitle for that plot.
       * @type {!Object<string>}
       */
      subtitles: {
        type: Object,
      },
    };
  }