Lift chart

class datarobot.models.lift_chart.LiftChart

Lift chart data for model.

Notes

LiftChartBin is a dict containing the following:

  • actual (float) Sum of actual target values in bin

  • predicted (float) Sum of predicted target values in bin

  • bin_weight (float) The weight of the bin. For weighted projects, it is the sum of the weights of the rows in the bin. For unweighted projects, it is the number of rows in the bin.

Variables:
  • source (str) – Lift chart data source. Can be ‘validation’, ‘crossValidation’ or ‘holdout’.

  • bins (list of dict) – List of dicts with schema described as LiftChartBin above.

  • source_model_id (str) – ID of the model this lift chart represents; in some cases, insights from the parent of a frozen model may be used

  • target_class (Optional[str]) – For multiclass lift - target class for this lift chart data.

  • data_slice_id (string or None) – The slice to retrieve Lift Chart for; if None, retrieve unsliced data.

classmethod from_server_data(data, keep_attrs=None, use_insights_format=False, **kwargs)

Overwrite APIObject.from_server_data to handle lift chart data retrieved from either legacy URL or /insights/ new URL.

Parameters:
  • data (dict) – The directly translated dict of JSON from the server. No casing fixes have taken place

  • use_insights_format (Optional[bool]) – Whether to repack the data from the format used in the GET /insights/liftChart/ URL to the format used in the legacy URL.