coexist.AccessData#
- class coexist.AccessData(access_path='.')[source]#
Bases:
objectAccess (pun intended) data generated by a
coexist.Accessrun; read it in usingcoexist.AccessData.read("access_seed<seed>").Examples
Suppose you run
coexist.Access.learn(random_seed = 123)- then a directory “access_seed123/” would be generated. Access (yes, still intended) all data generated in a Python-friendly format using:>>> import coexist >>> data = coexist.AccessData("access_123") >>> data AccessData -------------------------------------------------------------------------- paths ╎ AccessPaths(...) parameters ╎ value min max sigma ╎ fp1 -0.005312 -5.0 10.0 0.024483 ╎ fp2 0.003409 -5.0 10.0 0.034576 ╎ fp3 0.296074 -5.0 10.0 2.078181 num_epochs ╎ 31 target ╎ 0.1 seed ╎ 123 epochs ╎ DataFrame(fp1_mean, fp2_mean, fp3_mean, fp1_std, fp2_std, ╎ fp3_std, overall_std) epochs_scaled ╎ DataFrame(fp1_mean, fp2_mean, fp3_mean, fp1_std, fp2_std, ╎ fp3_std, overall_std) results ╎ DataFrame(fp1, fp2, fp3, error) results_scaled ╎ DataFrame(fp1, fp2, fp3, error)
- Attributes:
- paths
AccessPaths Struct-like object storing relevant paths in the given ACCES directory.
- parameters
pd.DataFrame The optimum free parameters found (final or intermediate if ACCES is still running).
- parameters_scaled
pd.DataFrame The optimum free parameters found, divided by
scalingsuch that the initial variance in the parameter values was unity.- scaling
np.ndarray A vector with the values to scale each parameter by - they are the initial variances (
sigma).- population
int The number of simulations to run in parallel within a single epoch, or number of parameter combinations to try at once.
- num_epochs
int The number of epochs that were successfully executed.
- target
float The target variance, where the initial parameter uncertainty must be decreased from 1 to
target.- seed
int The random number generator seed uniquely defining this ACCES run.
- epochs
np.ndarray Matrix with columns [mean_param1, mean_param2, …, std_param1, std_param2, …, std_overall] with one row per epoch.
- epochs_scaled
np.ndarray Same as
epochs, scaled such that the initial variance (sigma) becomes unity.- results
np.ndarray Matrix with columns [param1, param2, …, error] for each parameter combination tried - i.e.
population * num_epochs.- results_scaled
np.ndarray Same as
results, scaled such that the initial variance (sigma) becomes unity.
- paths
- __init__(access_path='.')[source]#
Read in data generated by
coexist.Access; the access_path can be either the “access_info_<hash>” directory itself, or its parent directory.
Methods
__init__([access_path])Read in data generated by
coexist.Access; the access_path can be either the "access_info_<hash>" directory itself, or its parent directory.copy()Return copy of AccessData object.
empty()Create an empty AccessData object that you can set attributes to directly.
legacy(access_path)Read in data from legacy coexist-0.1.0 ACCES format; this is normally called automatically by
AccessData.read.read([access_path])Read in data generated by
coexist.Access; the access_path can be either the "access_seed<hash>" directory itself, or its parent directory.save(dirname)Save AccessData to a new directory at dirname.
- static empty()[source]#
Create an empty AccessData object that you can set attributes to directly.
Examples
Create an empty AccessData object:
>>> import coexist >>> data = coexist.AccessData.empty()
- static read(access_path='.')[source]#
Read in data generated by
coexist.Access; the access_path can be either the “access_seed<hash>” directory itself, or its parent directory.Here for backwards-compatibility; you can instantiate the class directly with the
access_path, e.g.AccessData(".").