Giter Site home page Giter Site logo

opencv13 / fdgth.2023.1057467 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bahp/fdgth.2023.1057467

0.0 0.0 0.0 20.38 MB

ls2d

License: GNU General Public License v3.0

Shell 0.04% JavaScript 20.94% Python 18.02% CSS 46.27% HTML 14.59% Dockerfile 0.15%

fdgth.2023.1057467's Introduction

Latent Space 2D (LS2D)

Python Issues MIT License Heroku

Community | Documentation | Resources | Contributors | Release Notes

LS2D is a lightweight tool to create embeddings from complex data into two dimensions. In addition, it includes a web app that (i) facilitates performance comparison among the pipelines created, (ii) enables visualisation of the observations and the distribution of the features/outcomes and (iii) allows to query patients based on distance and displays a demographic table.

demo-v1.mp4

Table of Contents

About the project

This work aims to facilitate the development and validation of unsupervised techniques to reduce data complexity to a 2D space so that the information can be relayed to the end user through accessible graphical representations. In addition to traditional technices such as PCA, autoencoders, a type of neural network, have been used in the included examples.

Live demo (Heroku)**: Link

When using any of this project's source code, please cite:

@article{xxx,
  title = {xxx},
  author = {xxx},
  doi = {xxx},
  journal = {xxx},
  year = {xxx}
}

** Heroku puts processes to sleep after certain period of inactivity. Thus, it might take around 5-7 seconds to load.

Getting Started

Installation

First, install all the requireed libraries

$ python -m pip install -r requirements.txt   # Install al the requirements

Then, install the LS2D library (for example in editable mode)

$ python -m pip install --editable  .         # Install in editable mode

Training

Lets create a yaml configuration file according to your needs, for more information see the example settings.iris.yaml. This file allows you to define the path where the data is stored, the path where the workbench should be saved, to select which features should be used for training, which targets should be used to compute the performance metrics and last but not least, the methods to create the embeddings and the hyperparameters to consider during the grid search.

Once the configuration is completed, run the search script.

$ python search.py --yaml <yaml_file>

This script will create a new workbench within the output folder containing (i) the generated pipelines saved as pickle (.p) files, (ii) all the metrics obtained aggregated in the 'results.csv' file and the (iii) settings configuration.

Running the app

Using the script

Run the ls2d flask app (https://localhost:5000):

$ python server.py

Using Docker

Build and run the docker container (https://localhost:8000):

$ docker-compose build # Build
$ docker-compose up    # Run

Deploy to Heroku

Build an image and push

To build an image and push it to Container Registry, make sure that your directory contains a Dockerfile. Note that this will not inspect the docker-compose.yml nor the heroku.yml files and therefore the app should be run in the Docker file:

Thus, in the Dockerfile include:

$ CMD ["python", "server.py"]

Run the container to create the image:

$ heroku container:push <process-type> 

For this example

$ heroku container:push web 

Pushing an existing image

To push an image to Heroku, such as one pulled from Docker Hub o create with your your docker-compose instructions, tag it and push it according to this naming template.

$ docker tag <image> registry.heroku.com/<app>/<process-type>
$ docker push registry.heroku.com/<app>/<process-type>

For this example

$ docker tag main_web_1 registry.heroku.com/ls2d-demo/web
$ docker push registry.heroku.com/ls2d-demo/web

By specifying the process type in the tag, you can release the image using the CLI.

$ heroku container:release web

For more information, check the heroku official page here.

Generate docs

Go to the docs folder and run

    $ make github

This will clean the folder and thengenerate the documentation and copy it into gh-pages folder

License

Distributed under the GNU v3.0 License. See LICENSE for more information.

Limitations

At the moment, only one person can access it at the same time. This is because the database is just a global variable with the loaded csv file.

fdgth.2023.1057467's People

Contributors

bahp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.