sunpeek.components.fluids_wpd_models.WPDModelMixed#
- class sunpeek.components.fluids_wpd_models.WPDModelMixed(unit)#
Bases:
WPDModel
Methods
__init__
(unit)csv2df
(csv_file)Read WebPlotDigitizer csv with multiple datasets, combine into single dataframe with added dataset level column.
plot_fit
(prop_to_plot, fluid_name[, ...])Plot model fit and original / ground truth data from the WebPlotDigitizer csv dataset.
predict
(*args)Compute model prediction (fluid density, heat capacity) based on trained sklearn model, self.sk_model.
train
([fit_type])Fits polynomial interpolation model to fluid raw data in df.
- csv2df(csv_file)#
Read WebPlotDigitizer csv with multiple datasets, combine into single dataframe with added dataset level column.
- plot_fit(prop_to_plot, fluid_name, settings=None, n_points=50)#
Plot model fit and original / ground truth data from the WebPlotDigitizer csv dataset. This is useful to check quality of model fit, after calling self.train().
- Return type:
Figure
- predict(*args)#
Compute model prediction (fluid density, heat capacity) based on trained sklearn model, self.sk_model.
- Parameters:
args (
pint Quantity
) – Inputs required for prediciton: temperature and (for mixed fluids) concentration. Fluid temperature in unit self.unit[‘te’], typically ‘degC’ Fluid concentration in unit self.unit[‘c’], typically ‘percent’- Returns:
pint Quantity
- Return type:
Calculated fluid property (density
orheat capacity) in unit self.unit[``
’out’``]