@@ -66,7 +66,9 @@ class Input:
6666 "cost" between them. The optimization algorithm will try to minimize this
6767 number. The first argument is the true/correct values (:py:attr:`data`), the
6868 second argument is the estimated/predicted values, and the third argument is the
69- :py:attr:`data_weights`.
69+ :py:attr:`data_weights`. The cost function is intended to operate on
70+ ``numpy.ndarray`` objects.
71+ Dataframes are transformed using :py:attr:`df_to_numpy`.
7072 bounds : Mapping (str, {Bounds, tuple(float, float)}), optional
7173 The bounds for the parameters. Keys: parameter names. Values:
7274 ``scipy.minimize.Bounds`` instance or tuple of minimum and maximum value.
@@ -86,15 +88,15 @@ class Input:
8688 :py:attr:`data`, insert this value. Defaults to NaN, in which case the impact
8789 from the model is ignored. Set this to zero to explicitly calibrate to zero
8890 impacts in these cases.
89- df_to_numpy : Callable
91+ df_to_numpy : Callable, optional
9092 A function that transforms a pandas.DataFrame into a numpy.ndarray to be
9193 inserted into the :py:attr:`cost_func`. By default, this will flatten the data
9294 frame.
9395 data_weights : pandas.DataFrame, optional
9496 Weights for each entry in :py:attr:`data`. Must have the exact same index and
9597 columns. If ``None``, the weights will be ignored (equivalent to the same weight
9698 for each event).
97- missing_data_value : float, optional
99+ missing_weights_value : float, optional
98100 Same as :py:attr:`missing_data_value`, but for :py:attr:`data_weights`.
99101 assign_centroids : bool, optional
100102 If ``True`` (default), assign the hazard centroids to the exposure when this
@@ -450,13 +452,13 @@ def _target_func(
450452
451453 Parameters
452454 ----------
453- data : pandas.DataFrame
455+ data : nd.ndarray
454456 The reference data used for calibration. By default, this is
455457 :py:attr:`Input.data`.
456- predicted : pandas.DataFrame
458+ predicted : nd.ndarray
457459 The impact predicted by the data calibration after it has been transformed
458460 into a dataframe by :py:attr:`Input.impact_to_dataframe`.
459- weights : pandas.DataFrame
461+ weights : nd.ndarray
460462 The relative weight for each data/entry pair.
461463
462464 Returns
0 commit comments