Catalogue of Tools & Metrics for Trustworthy AI

These tools and metrics are designed to help AI actors develop and use trustworthy AI systems and applications that respect human rights and are fair, transparent, explainable, robust, secure and safe.

Athena



Athena

Documentation Status
License: LGPL v3
CII Best Practices

Accelerated equation building for academia and research

Athena is a high-level framework for equation building and curve fitting, written in Python and built on top of Tensorflow; this means you can build large equations and perform curve fitting on your CPU, GPU, or cluster, without the constraints of traditional curve fitting toolboxes or any degradation in performance. Athena was developed with academia and researchers in mind: it is therefore abstract and simple to use (quickly fit an equation of choice to tabular data), while still remaining powerful and highly customizable (automatically searching through millions of different mathematical equation forms and finding the most accurate one).

If you are interested in learning more about the mathematics behind Athena, you may read:

Building and Evaluating Interpretable Models using Symbolic Regression and Generalized Additive Models

which was published in the proceedings of the AutoML workshop at ICML 2017.

What can Athena do?

  • Fit an arbitrary length mathematical equation to large amounts of data.
  • Run equation-building algorithms on a GPU or a cluster for increased performance.
  • Automatically select the best features and choose the most suitable equation types.
  • Search heuristically through different equation types (grid, random, genetic, etc).

Getting started

The easiest way to install Athena and all its dependencies is through pip:

pip install git+git://github.com/arabiaweather/athena.git

Building your first equation

Working with Athena can be as simple or as advanced as you need it to be. To demonstrate Athena’s equation-building capabilities, we’ll fit a straight line to noisy data.

x = numpy.linspace(0.0, 1.0, 10000)
y = x + 5.0 + numpy.random.uniform(-0.1, 0.1, *x.shape)
df = pandas.DataFrame(data={'x': x, 'y': y})

Everything in Athena starts and ends with a Framework. Optimization hyper-parameters are defined inside it, and your data-set and model are attached to it.

fw = Framework()
A, B = split_dataframe(df, 0.9)
fw.add_dataset(Dataset(A, B))

Here comes the fun part: Athena has built-in hundreds of equation types that you can add, multiply, and composite together. We’ll add the FlexiblePower and Bias functions to our model to form a straight-line equation.

model = AdditiveModel(fw)
model.add(Bias)
model.add(MultiPolynomial, 'x')
fw.initialize(model, A['y'].values)

The only part left to get your equation is to train your model; this part can be sped up dramatically by using a CUDA-enabled GPU or by running Athena on a cluster. The result is very close to a straight line equation!

fw.train()
print('y =', fw.produce_equation())
> y = 1.00098*x + 4.99821

The resulting equation can be pretty-printed to a Python notebook, or better yet, can be converted to LaTeX for use in an academic paper easily.

Diving into Athena

What makes any open-source project great is the contributions of the community. Below are many great tutorials (in the form of Python notebooks) that show real-world examples of powerful equation-building and modeling techniques. You can contribute to this list too by submitting a pull request.

About the tool


Developing organisation(s):


Tool type(s):




Country/Territory of origin:


Type of approach:







Programming languages:



Github stars:

  • 68

Github forks:

  • 11

Modify this tool

Use Cases

There is no use cases for this tool yet.

Would you like to submit a use case for this tool?

If you have used this tool, we would love to know more about your experience.

Add use case
Partnership on AI

Disclaimer: The tools and metrics featured herein are solely those of the originating authors and are not vetted or endorsed by the OECD or its member countries. The Organisation cannot be held responsible for possible issues resulting from the posting of links to third parties' tools and metrics on this catalogue. More on the methodology can be found at https://oecd.ai/catalogue/faq.