Fully Automated Machine Learning in One-Liners

Gagandeep Singh
3 min readJul 20, 2020

--

Photo from https://libradocs.github.io/
Photo from libradocs.github.io

So What Exactly is Libra?

Libra is python libray that automates the end-to-end machine learning process in just one line of code. It is built for both non-technical users and software professionals of all kinds.

Installation

Install latest release version:

pip install libra

Install directory from github:

git clone https://github.com/Palashio/libra.git
cd libra
pip install .

The Basics

The core functionality of libra works through the client object. A new client object should be created for every dataset that you want to produce results for. All information about the models that're built, the plots that are generated, and the metrics are created will be stored in the object.

You can then call different queries on that client object, and the dataset you passed to it will be used.

from libra import client

Loading up the california housing dataset found here: www.kaggle.com/camnugent/california-housing-prices.

a_client = client('housing.csv')

Building a neural network to estimate the proximity to the ocean, this column is named ‘ocean_proximity’ in the csv file.

a_client.neural_network_query('accurately estimate the ocean proximity', epochs=10) #Limit the number of epochs to run it quickly

Generating some more insightful information about the model for ocean proximity.

a_client.analyze()
a_client.info() # this is all the information that the query generated

Building a neural network to estimate the median house value given information about the house.

a_client.neural_network_query('model the median house value ', drop=['ocean_proximity'], save_model=True)

And, that’s it! You’re done. This is just one and of the hundreds options you have with Libra.

References

  1. https://github.com/Palashio/libra.
  2. https://libradocs.github.io/index.html

--

--