pitci.helpers.prepare_prediction_interval_df

pitci.helpers.prepare_prediction_interval_df(intervals_with_predictions, response)[source]

Put response column and n x 3 array into a pd.DataFrame with columns; “lower”, “predictions”, “upper” and response”.

Parameters
  • intervals_with_predictions (np.ndarray) – n by 3 array containing lower interval values, predictions and upper interval values. The columns will be added to output in columns; “lower”, “predictions” and “upper”.

  • response (pd.Series or np.ndarray) – Response column to be added to output, in “response” column. Must have the same number of rows as intervals_with_predictions.

Returns

df – 4 column pd.DataFrame containing values passed in intervals_with_predictions and response with columns; “lower”, “predictions”, “upper” and response”.

Return type

pd.DataFrame