Пример #1
0
    def _get_indexed_data(err_y=0.01, a=1.2, b=2.3, c=3.4):
        _x_0 = np.linspace(start=-10, stop=10, num=101, endpoint=True)
        _y_0 = quadratic_model(_x_0, a, b, c)
        _y_jitter = np.random.normal(loc=0, scale=err_y, size=101)
        _y_data = _y_0 + _y_jitter

        return _y_data
Пример #2
0
    def _get_xy_data(err_x=0.01, err_y=0.01, a=1.2, b=2.3, c=3.4):
        _x_0 = np.linspace(start=-10, stop=10, num=25, endpoint=True)
        _x_jitter = np.random.normal(loc=0, scale=err_x, size=25)
        _x_data = _x_0 + _x_jitter

        _y_0 = quadratic_model(_x_data, a, b, c)
        _y_jitter = np.random.normal(loc=0, scale=err_y, size=25)
        _y_data = _y_0 + _y_jitter

        return np.array([_x_data, _y_data])
Пример #3
0
 def quadratic_model_indexed_split_2(a, b, c):
     _x = np.linspace(start=0, stop=10, num=51, endpoint=True)
     return quadratic_model(_x, a, b, c)
Пример #4
0
 def quadratic_model_indexed_split_1(a, b, c):
     _x = np.linspace(start=-10, stop=0, num=50, endpoint=False)
     return quadratic_model(_x, a, b, c)
Пример #5
0
 def quadratic_model_indexed_all(a, b, c):
     _x = np.linspace(start=-10, stop=10, num=101, endpoint=True)
     return quadratic_model(_x, a, b, c)