Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé
Module « scipy.stats.mstats »

Fonction theilslopes - module scipy.stats.mstats

Signature de la fonction theilslopes

def theilslopes(y, x=None, alpha=0.95, method='separate') 

Description

help(scipy.stats.mstats.theilslopes)

Computes the Theil-Sen estimator for a set of points (x, y).

`theilslopes` implements a method for robust linear regression.  It
computes the slope as the median of all slopes between paired values.

Parameters
----------
y : array_like
    Dependent variable.
x : array_like or None, optional
    Independent variable. If None, use ``arange(len(y))`` instead.
alpha : float, optional
    Confidence degree between 0 and 1. Default is 95% confidence.
    Note that `alpha` is symmetric around 0.5, i.e. both 0.1 and 0.9 are
    interpreted as "find the 90% confidence interval".
method : {'joint', 'separate'}, optional
    Method to be used for computing estimate for intercept.
    Following methods are supported,

        * 'joint': Uses np.median(y - slope * x) as intercept.
        * 'separate': Uses np.median(y) - slope * np.median(x)
                      as intercept.

    The default is 'separate'.

    .. versionadded:: 1.8.0

Returns
-------
result : ``TheilslopesResult`` instance
    The return value is an object with the following attributes:

    slope : float
        Theil slope.
    intercept : float
        Intercept of the Theil line.
    low_slope : float
        Lower bound of the confidence interval on `slope`.
    high_slope : float
        Upper bound of the confidence interval on `slope`.

See Also
--------
siegelslopes : a similar technique using repeated medians


Notes
-----
For more details on `theilslopes`, see `scipy.stats.theilslopes`.



Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé