lumen
?lumen
is an interactive web-application for the visualization and exploration of probabilistic machine learning models.
Its main feature is the ability to rapidly and incrementally build flexible and potentially complex visualizations of both probabilistic machine learning models and the data these models were trained on.
lumen
lumen
aims to make a particular class of machine learning/statistical models, namely probabilistic models, more easily accessible to humans.
A probabilistic model models a set of target variables by means of a probability distribution.
That is, different to many classic ML methods which predict a particular value of the target variable(s), probabilistic models instead capture the distribution of the target variables.
lumen
lets you 'see' your model, understand how it performs, where it 'fails', and compare this to previous versions of the model or alternative models.
A manual-style description of the UI, the visual encodings, lumens
usage, its features, and available interactions is available here.
A walk-through-style introduction to lumen
is available here. It demonstrates some of the feature for exploration of probabilistic models in lumen
.
In particular lumen
lets you:
Probabilistic programming language (PPLs), such as PyMC3, BLOG, or Stan, provide a framework to define probabilistic models by explicitly declaring the likelihood of the observed data as a probability density function.
The analyst typically starts with an exploration of the data.
Based on insights gained from data exploration and on the analyst's domain knowledge, the analyst creates an initial simple model involving only some data.
Subsequently, this model is iteratively made more complex until it meets the expert's goals.
In particular, the model must be validated after each iteration.
lumen
supports this model building process by
(i) enabling visual-interactive data exploration,
(ii) supporting model validation by means of a visual comparison of data queries to semantically equivalent model queries, and
(iii) enabling a direct comparison of model iterates.
Even for a machine learning expert it may be hard to know whether a model has been trained on the data as expected. Possible reasons for artifacts in a model include an inappropriate application of the machine learning method, implementation bugs in the machine learning method, and issues in the training data. Direct visual inspection of the probabilistic model provides an approach to model debugging that enables the analyst to literally spot model artifacts that may cause degrading performance. Classical approaches to validation would rely on aggregating measures like information criterions or predictive accuracy scores.
By its intuitive visual representations of models, Lumen aims to promote understanding of the underlying modelling techniques. For instance, the effect of varying a parameter value for a modelling method on the probabilistic model can be observed visually rather than remaining an abstract description in a textbook. Similarly, the differences between models/model types can be visually illustrated by plotting them side by side. Also, probabilistic concepts such as conditioning or marginalization, which are often difficult to grasp, can be tried out interactively, providing immediate feedback.
You don't do any Machine Learning but simply would like to conveniently browse, explore, and compare tabular data?
lumen
is the right place for you too!
This is not what lumen
was built for originally, but regard it as your 'free lunch'.
lumen
This explains how to install and configure lumen
and its dependencies.
Note that lumen
is build on top of the modelbase
back-end, which provides a SQL-like interface for querying models and its data.
lumen
is a web application that requires access to a web-service instance of the Python3-based modelbase
backend.
lumen
allows a user to interactively compile data/model queries and visualize the queries results. modelbase
does the computation and actually answers the queries.
You can get modelbase
here where you also find information on how to set it up and run it as a web-service.
lumen
and modelbase
need to be configured correctly with 'matching' settings. By default (both run locally on the same physical machine) this is the case and you do not need to change these settings:
lumen
must match the actual hostname of modelbase
.lumen
allows you to explore the models and data that are hosted by the modelbase
backend.
You can use the modelbase
Python package to (1) train/create models from data, and then (2) host them by an instance of the modelbase
web-service.
See the documentation and introductory jupyter notebooks in the doc
folder for more information.
Also, a number of example models are created during the setup process of modelbase
for your convenience.
Clone/download this repository into a folder <path>
of your choice.
Just pull/download the lasted branch/version you'd like.
modelbase
backend is running and hosting the models that you'd like to explore. <path>/index.html
in your browser. If everything is fine you should now see a model dialog that lists the available models. Select one and start exploring it!Notes:
If you have any trouble using lumen
, need some additional explanation, or even just want to provide some feedback, please don't hesitate to contact us at philipp.lucas@dlr.de.
If you encounter any bugs you can also submit an issue.
lumen
in my browser I get the error message: "Could not load remote model from server!"Check the developer console log of the browser where you are loading the front-end. If it shows something like:
Failed to load http://127.0.0.1:5000/web-service: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'null' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access.
Then your probably run into some CORS issue because you serve the file directly from the file system, instead from a webserver running locally. See here for the issues:
Solutions:
You wanna contribute? Awesome! Let's get in touch: philipp.lucas@dlr.de !
This is only for you, if you want to contribute to the project.
sudo npm install -g npm
package.json
:
<path>
: npm install
For any questions, feedback, bug reports, feature requests, spam, rants, etc please contact: philipp.lucas@dlr.de
© 2016-2021 Philipp Lucas (philipp.lucas@dlr.de)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.