Package: autora
Automated Research AssistantAutoRA(AutomatedResearchAssistant) is an open-source framework for
automating multiple stages of the empirical research process, including model discovery, experimental design, data collection, and documentation for open science.AutoRA was initially intended for accelerating research in the behavioral and brain sciences. However, AutoRA is designed as a general framework that enables automation of the research processes in other empirical sciences, such as material science or physics.InstallationWe recommend using aPythonenvironment manager likevirtualenv. You may refer to the Development Guide on how toset up a virtual environment.Before installing the PyPIautorapackage, you mayactivate your environment. To install the PyPIautorapackage, run the following command:pipinstall"autora"DocumentationCheck out tutorials and documentation athttps://autoresearch.github.io/autora. If you run into any issues or questions regarding the use of AutoRA, please reach out to us at theAutoRA forum.ExampleThe following example demonstrates how to use AutoRA to automate the process of model discovery, experimental design, and data collection.The discovery problem is defined by a single independent variable $x \in [0, 2 \pi]$ and dependent variable $y$.
The experiment amounts to a simple sine wave, $y = \sin(x)$, which is the model we are trying to discover.Th discovery cycle iterates between the experimentalist, experiment runner, and theorist. Here, we us a "random" experimentalist, which samples novel experimental conditions for $x$ every cycle.
The experiment runner then collects data for the corresponding $y$ values. Finally, the theorist uses aBayesian Machine Scientist(BMS; Guimerà et al., in Science Advances) to identify a scientific model that explains the data.The workflow relies on theStandardStateobject, which stores the current state of the discovery process, such asconditions,experiment_data, ormodels. The state is passed between the experimentalist, experiment runner, and theorist.###################################################################################### Import statements####################################################################################importpandasaspdimportnumpyasnpimportsympyasspfromautora.variableimportVariable,ValueType,VariableCollectionfromautora.experimentalist.randomimportrandom_poolfromautora.experiment_runner.synthetic.abstract.equationimportequation_experimentfromautora.theorist.bmsimportBMSRegressorfromautora.stateimportStandardState,on_state,estimator_on_state###################################################################################### Define initial data######################################################################################## Define variable data ####iv=Variable(name="x",value_range=(0,2*np.pi),allowed_values=np.linspace(0,2*np.pi,30))dv=Variable(name="y",type=ValueType.REAL)variables=VariableCollection(independent_variables=[iv],dependent_variables=[dv])#### Define seed condition data ####conditions=random_pool(variables,num_samples=10,random_state=0)###################################################################################### Define experimentalist####################################################################################experimentalist=on_state(random_pool,output=["conditions"])###################################################################################### Define experiment runner####################################################################################sin_experiment=equation_experiment(sp.simplify('sin(x)'),variables.independent_variables,variables.dependent_variables[0])sin_runner=sin_experiment.experiment_runnerexperiment_runner=on_state(sin_runner,output=["experiment_data"])###################################################################################### Define theorist####################################################################################theorist=estimator_on_state(BMSRegressor(epochs=100))###################################################################################### Define state####################################################################################s=StandardState(variables=variables,conditions=conditions,experiment_data=pd.DataFrame(columns=["x","y"]))###################################################################################### Cycle through the state####################################################################################print('Pre-Defined State:')print(f"Number of datapoints collected:{len(s['experiment_data'])}")print(f"Derived models:{s['models']}")print('\n')foriinrange(5):s=experimentalist(s,num_samples=10,random_state=42)s=experiment_runner(s,added_noise=1.0,random_state=42)s=theorist(s)print(f"\nCycle{i+1}Results:")print(f"Number of datapoints collected:{len(s['experiment_data'])}")print(f"Derived models:{s['models']}")print('\n')ContributionsWe welcome contributions to the AutoRA project. Please refer to thecontributor guidefor more information. Also, feel free to ask any questions or provide any feedback regarding core contributions on theAutoRA forum.AboutThis project is in active development by
theAutonomous Empirical Research Group,
in collaboration with theCenter for Computation and Visualization at Brown University.The development of this package is supported by Schmidt Science Fellows, in partnership with the Rhodes Trust, as well as the Carney BRAINSTORM program at Brown University.Read MorePackage DocumentationAutoRA Pip PackageAutonomous Empirical Research Group