ArithmeticMeanCurve¶
-
class
arithmeticmeancurve.
ArithmeticMeanCurve
(curves: Union[List[pandas.core.frame.DataFrame], pandas.core.frame.DataFrame], method: Optional[str] = None)¶ Represents a family of curves.
- Parameters
curves (Union[SetOfCurves, FamilyOfCurves]) – A ‘set of unique curves’ with seperated x-values or a ‘family of curves’ with common x-values.
method (str) – Default ‘frozen_std’; extrapolation method to use.
Examples
>>> import examplecurves >>> from doctestprinter import doctest_print, doctest_iter_print >>> sample_curves = examplecurves.Static.create(family_name="nonlinear0") >>> doctest_iter_print(sample_curves, edits_item=lambda x: x.iloc[:3]) y x 0.000 0.00000 0.115 1.40625 0.230 2.70000 y x 0.0 0.0000 0.1 1.5625 0.2 3.0000 y x 0.000 0.000000 0.111 1.607654 0.222 3.085479 y x 0.000 0.000000 0.096 1.796875 0.192 3.450000 y x 0.00 0.000000 0.09 1.796875 0.18 3.450000 >>> from arithmeticmeancurve import ArithmeticMeanCurve >>> extrapolating_mean_curve = ArithmeticMeanCurve(curves=sample_curves) >>> doctest_print(extrapolating_mean_curve.family_of_curves.loc[:0.2]) y_0 y_1 y_2 y_3 y_4 x 0.000 0.000000 0.000000 0.000000 0.000000 0.000000 0.090 1.100543 1.406250 1.303503 1.684570 1.796875 0.096 1.173913 1.500000 1.390403 1.796875 1.907083 0.100 1.222826 1.562500 1.448337 1.865755 1.980556 0.111 1.357337 1.720625 1.607654 2.055176 2.182604 0.115 1.406250 1.778125 1.660909 2.124056 2.256076 0.180 2.137500 2.712500 2.526302 3.243359 3.450000 0.192 2.272500 2.885000 2.686067 3.450000 3.651250 0.200 2.362500 3.000000 2.792577 3.575781 3.785417
(Source code, png, hires.png, pdf)
Figure: Extrapolated mean curve with scatter curve.