Data Source (Implementation) [80%]#
- class BrownianDriftDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
GaussianProcessDataSource
- brown_var: float = 0.01#
- max_support: Tuple[float, ...] = (2000, 1)#
- min_support: Tuple[float, ...] = (0, -1)#
- query_shape: Tuple[int, ...] = (2,)#
- rbf_leng: float = 0.1#
- rbf_var: float = 0.25#
- result_shape: Tuple[int, ...] = (1,)#
- class BrownianProcessDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
GaussianProcessDataSource
- brown_var: float = 0.01#
- max_support: Tuple[float, ...] = (100,)#
- min_support: Tuple[float, ...] = (0,)#
- query_shape: Tuple[int, ...] = (1,)#
- result_shape: Tuple[int, ...] = (1,)#
- class CrossDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionACrossDataSource
is a semi-random source of data choosing one of the following equations at random {-a * x
,a * x
}.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
a (float) – Coefficient of x
- a: float = 1#
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [-0.5, 0.5)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
a < 0
a = 0
a > 0
MAX
a < 0
a = 0
a > 0
1/4*a
0
-1/4*a
-1/4*a
0
1/4*a
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- class DoubleLinearDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionADoubleLinearDataSource
is a semi-random source of data choosing one of the following equations at random {a * x
,a * x * s
}.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
a (float) – Coefficient of x
s (float) – Coefficient that is randomly in- or excluded
- a: float = 1#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [-0.5, 0.5)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
a < 0
a >= 0
MAX
a < 0
a >= 0
s < -1
-1/2*a*s
1/2*a*s
s < -1
1/2*a*s
-1/2*a*s
-1 <= s < 1
1/2*a
-1/2*a
-1 <= s < 1
-1/2*a
1/2*a
1 <= s
1/2*a*s
-1/2*a*s
1 <= s
-1/2*a*s
1/2*a*s
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- s: float = 0.5#
- class ExpDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionAnExpDataSource
is a deterministic source of data representing an exponential equations * b^x
.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
b (float) – Basis to the exponent x
s (float) – Coefficient of base^x
- b: float = 2#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [0, 1)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
b < 0
b = 0
0 <= b < 1
b = 1
b > 1
MAX
b < 0
b = 0
0 <= b < 1
b = 1
b > 1
s < 0
N/A
s
s
s
s * b
s < 0
N/A
s
s * b
s
s
s = 0
N/A
0
0
0
0
s = 0
N/A
0
0
0
0
s >= 0
N/A
0
s * b
s
s
s >= 0
N/A
s
s
s
s * b
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- s: float = 1#
- class GaussianProcessDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
DataSource
- kern: GPy.kern.Kern | None = None#
- max_support: Tuple[float, ...] = (1,)#
- min_support: Tuple[float, ...] = (-1,)#
- query(queries) Tuple[NDArray[Shape['query_nr, ... query_dim'], Number], NDArray[Shape['query_nr, ... result_dim'], Number]] [source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- regression: GPy.models.GPRegression = None#
- reinit: bool = False#
- result_shape: Tuple[int, ...] = (1,)#
- support_points: int = 2000#
- class HourglassDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionAHourglassDataSource
is a semi-random source of data choosing one of the following equations at random {a * x
,-a * x
,-a/2
,a/2
}.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
a (float) – Coefficient of x
- a: float = 1#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [0, 1)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
a < 0
a >= 0
MAX
a < 0
a >= 0
1/2*a
-1/2*a
-1/2*a
1/2*a
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- class HyperSphereDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
DataSource
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_shape: Tuple[int, ...] = (1,)#
- class HypercubeDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
DataSource
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_shape: Tuple[int, ...] = (1,)#
- w: float = 0.4#
- class IndependentDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
DataSource
- all_distributions: Tuple = (<built-in method normal of numpy.random.mtrand.RandomState object>, <built-in method uniform of numpy.random.mtrand.RandomState object>, <built-in method gamma of numpy.random.mtrand.RandomState object>)#
- coefficients: NDArray[Shape['D'], Number] = None#
- distributions: list = None#
- number_of_distributions: int = 20#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- reinit: bool = False#
- result_shape: Tuple[int, ...] = (1,)#
- class InterpolatingDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionAnInterpolatingDataSource
is an ambivalent source of data depending on the DataSource it interpolates within.- Parameters:
data_sampler (tuple of) – The data sample to interpolate within
interpolation_strategy (tuple of ints) – The expected shape of the results
- data_sampler: DataSampler = NOTSET#
- interpolation_strategy: InterpolationStrategy = NOTSET#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
- Returns:
Constrains around queries
- Return type:
- class LineDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionALineDataSource
is a deterministic source of data representing a linear equationy = ax + b
.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
a (float (optional)) – Coefficient of degree 1, defaults to 1
b (float (optional)) – Coefficient of degree 0, defaults to 0
- a: float = 1#
- b: float = 0#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [0, 1)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
a < 0
a >= 0
MAX
a <= 0
a > 0
a + b
b
b
a + b
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- class LinearPeriodicDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionALinearPeriodicDataSource
is a deterministic source of data representing the equationa*x mod p
.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
a (float) – Coefficient of x
p (float) – Modulo divisor
- a: float = 1#
- p: float = 0.2#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
a < 0
a = 0
a > 0
MAX
a < 0
a = 0
a > 0
p < 0
p
0
p
p < 0
0
0
0
p = 0
N/A
N/A
N/A
p = 0
N/A
N/A
N/A
p > 0
0
0
0
p > 0
p
0
p
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- class LinearStepDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionALinearStepDataSource
is a deterministic source of data representing the equationa*(x-mod(x,p))/p
.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
a (float) – Coefficient of x
p (float) – Integer divisor
- a: float = 1#
- p: float = 0.2#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
a < 0
a = 0
a > 0
MAX
a < 0
a = 0
a > 0
p < 0
0
0
a*floor(1/p)
p < 0
a*floor(1/p)
0
0
p = 0
N/A
N/A
N/A
p = 0
N/A
N/A
N/A
p > 0
a*floor(1/p)
0
0
p > 0
0
0
a*floor(1/p)
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- class MixedBrownDriftDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
GaussianProcessDataSource
- brown_var: float = 0.01#
- max_support: Tuple[float, ...] = (2000, 1)#
- min_support: Tuple[float, ...] = (0, -1)#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (2,)#
- rbf_leng: float = 0.1#
- rbf_var: float = 0.25#
- reinit: bool = False#
- result_shape: Tuple[int, ...] = (1,)#
- support_points: int = 2000#
- class MixedDriftDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
GaussianProcessDataSource
- brown_var: float = 0.01#
- max_support: Tuple[float, ...] = (2000, 1)#
- min_support: Tuple[float, ...] = (0, -1)#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (2,)#
- rbf_leng: float = 0.1#
- rbf_var: float = 0.25#
- reinit: bool = False#
- result_shape: Tuple[int, ...] = (1,)#
- support_points: int = 2000#
- class PowDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionAPowDataSource
is a deterministic source of data representing an exponential equations * x^p
.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
p (float) – Power of x
s (float) – Coefficient of x^power
- p: float = 3#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [0, 1)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
p < 0
p = 0
p > 0
MAX
p < 0
p = 0
p > 0
s < 0
-inf
s
s
s < 0
s
s
0
s >= 0
s
s
0
s >= 0
inf
s
s
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- s: float = 1#
- class RBFDriftDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
GaussianProcessDataSource
- brown_var: float = 0.01#
- max_support: Tuple[float, ...] = (2000, 1)#
- min_support: Tuple[float, ...] = (0, -1)#
- query_shape: Tuple[int, ...] = (2,)#
- rbf_leng: float = 0.1#
- rbf_var: float = 0.25#
- result_shape: Tuple[int, ...] = (1,)#
- class RandomUniformDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionARandomUniformDataSource
is a random source of data.For more details see numpy.random.uniorm.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
u (float (optional)) – The upper bound of query values (exclusive), defaults to 1
l (float (optional)) – The lower bound of query values (inclusive), defaults to 0
- l: float = 0#
- query(queries)[source]#
- Description
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [0, 1)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range: [l, u)- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- u: float = 1#
- class SinDriftDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
GaussianProcessDataSource
- brown_var: float = 0.005#
- max_support: Tuple[float, ...] = (2000, 1)#
- min_support: Tuple[float, ...] = (0, -1)#
- query_shape: Tuple[int, ...] = (2,)#
- rbf_leng: float = 0.1#
- rbf_var: float = 0.25#
- result_shape: Tuple[int, ...] = (1,)#
- class SineDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
DataSource
- a: float = 1#
- p: float = 1#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_shape: Tuple[int, ...] = (1,)#
- x0: float = 0#
- y0: float = 0#
- class SquareDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionASquareDataSource
is a deterministic source of data representing a square parabolas * (x - x0)^2 + y0
.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
x0 (float (optional)) – Offset of the parabola in x-direction, defaults to 0.5
y0 (float (optional)) – Offset of the parabola in y-direction, defaults to 0
s (float (optional)) – Coefficient of degree 2, defaults to 5
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [0, 1)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
s < 0
s >= 0
MAX
s < 0
s >= 0
s*x0^2+y0
y0
x0 < 0
s*x0^2+y0
s*(1-x0)^2+y0
0 <= x0 < 0.5
y0
s*(1-x0)^2+y0
0.5 <= x0 < 1
y0
s*x0^2+y0
1 <= x0
s*(1-x0)^2+y0
s*x0^2+y0
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- s: float = 5#
- x0: float = 0.5#
- y0: float = 0#
- class StarDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
DataSource
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain(self) QueryConstrain [source]#
- Description
query_constrain()
is a getter-function for the constrains around queries to theDataSource
.Constrains can affect thecount
,shape
and theranges
of a query.For more information, see ConstrainsCurrent ConstrainsShape:query_shape
Value Range: (-inf, inf) for all values- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_shape: Tuple[int, ...] = (1,)#
- w: float = 0.05#
- class TimeBehaviorDataSource(*args: 'Any', **kwargs: 'Any')[source]#
Bases:
TimeDataSource
- behavior: DataBehavior = NOTSET#
- change_times: NDArray[Shape['change_times'], Number]#
- change_values: NDArray[Shape['change_values'], Number]#
- current_time: float = 0#
- property exhausted#
- DescriptionA
DataSource
is exhausted if all its available data has been querried.ReturnsFalse
by default- Returns:
Whether the
DataSource
has been exhausted- Return type:
boolean
- query(queries: NDArray[Shape['query_nr, ... query_dim'], Number]) Tuple[NDArray[Shape['query_nr, ... query_dim'], Number], NDArray[Shape['query_nr, ... result_dim'], Number]] [source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_shape: Tuple[int, ...] = (1,)#
- result_shape: Tuple[int, ...] = (1,)#
- class ZDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionAZDataSource
is a semi-random source of data choosing one of the following equations at random {a * x
,-a/2
,a/2
}.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
a (float) – Coefficient of x
- a: float = 1#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [0, 1)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
a < 0
a >= 0
MAX
a < 0
a >= 0
1/2*a
-1/2*a
-1/2*a
1/2*a
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#
- class ZInvDataSource(*args: Any, **kwargs: Any)[source]#
Bases:
DataSource
DescriptionAZInvDataSource
is a semi-random source of data choosing one of the following equations at random {-a * x
,-a/2
,a/2
}.- Parameters:
query_shape (tuple of ints) – The expected shape of the queries
result_shape (tuple of ints) – The expected shape of the results
a (float) – Coefficient of x
- a: float = 1#
- query(queries)[source]#
- DescriptionSee
DataSource.query()
- Parameters:
queries – Requested Query
- Returns:
Processed Query, Result
- Return type:
A tuple of two NDArray
- query_constrain() QueryConstrain [source]#
- DescriptionSee
DataSource.query_constrain()
Current ConstrainsShape:query_shape
Value Range: [0, 1)- Returns:
Constrains around queries
- Return type:
- query_shape: Tuple[int, ...] = (1,)#
- result_constrain() ResultConstrain [source]#
- DescriptionSee
DataSource.result_constrain()
Current ConstrainsShape:result_shape
Value Range:MIN
a < 0
a >= 0
MAX
a < 0
a >= 0
1/2*a
-1/2*a
-1/2*a
1/2*a
- Returns:
Constrains around results
- Return type:
ResultConstrain
- result_shape: Tuple[int, ...] = (1,)#