Data Generator¶
- class symdet.data.data_generator.DataGenerator[source]¶
A class to generate data for use in the Symmetry analysis.
- domain¶
Domain values of the function.
- Type
tf.Tensor
- image¶
Image values of the function, i.e. f(x) for all x.
- Type
tf.Tensor
- image_size¶
Size of the data pool.
- Type
int
- domain_shape¶
Shape of the domain points.
- Type
tuple
- clustered_data¶
A dictionary of clustered data.
- Type
dict
Methods
build_clusters(**kwargs)Split the raw function data into classes.
load_data(points[, save])Load some data either from a computation or from a pool into the class state.
plot_clusters([save])Plot the data clusters.
plot_data([save])Plot the data.
- build_clusters(**kwargs)[source]¶
Split the raw function data into classes.
- Parameters
**kwargs –
- Return type
Updates the class state.
Notes
In the double well potential we can simply use the range_binning clustering algorithm.
- load_data(points: Union[int, ndarray], save: bool = False)[source]¶
Load some data either from a computation or from a pool into the class state.
- Parameters
points (Union[int, np.ndarray]) – Points to generate, either an np.ndarray or an integer. If an integer, N points will be generated, if an array, it will either be treated as input to a function to generate values or those indices will be drawn from a pool.
save (bool) – If true, save the data after generating it.