Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Returns
-------
xhat, yhat : numpy arrays
Linear model estimates of ``x`` and ``y``.
results : dict
Dictionary of linear fit results. Keys include:
- slope
- intersept
- yhat_lo (lower confidence interval of the estimated y-vals)
- yhat_hi (upper confidence interval of the estimated y-vals)
"""
fitprobs = validate.fit_argument(fitprobs, "fitprobs")
fitlogs = validate.fit_argument(fitlogs, "fitlogs")
# maybe set xhat to default values
if xhat is None:
xhat = copy.copy(x)
# maybe set dist to default value
if dist is None:
dist = _minimal_norm
# maybe compute ppf of x
if fitprobs in ['x', 'both']:
x = dist.ppf(x / 100.)
xhat = dist.ppf(numpy.array(xhat) / 100.)
# maybe compute ppf of y
Returns
-------
xhat, yhat : numpy arrays
Linear model estimates of ``x`` and ``y``.
results : dict
Dictionary of linear fit results. Keys include:
- slope
- intersept
- yhat_lo (lower confidence interval of the estimated y-vals)
- yhat_hi (upper confidence interval of the estimated y-vals)
"""
fitprobs = validate.fit_argument(fitprobs, "fitprobs")
fitlogs = validate.fit_argument(fitlogs, "fitlogs")
# maybe set xhat to default values
if xhat is None:
xhat = copy.copy(x)
# maybe set dist to default value
if dist is None:
dist = _minimal_norm
# maybe compute ppf of x
if fitprobs in ['x', 'both']:
x = dist.ppf(x / 100.)
xhat = dist.ppf(numpy.array(xhat) / 100.)
# maybe compute ppf of y
if fitprobs in ['y', 'both']: