Skip to content

A python implementation for the approximate convex hull algorithm (Revised Greedy Expansion)

Notifications You must be signed in to change notification settings

SamJia/RevisedGE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RevisedGE

  • This repository is the implementation of RevisedGE:

On Geometric Structure of Activation Spaces in Neural Networks

Files in the folder

  • data/: sample datasets
  • RevisedGE.py: source codes for RevisedGE

Data format

RevisedGE can accept the data in skipgram format (e.g. data/Center.txt): first line is header (containing number of nodes and number of dimension), all other lines are node-id and d dimensional representation.

2000    2
0   -3.002371   -0.076243
1   -3.002371   -0.005655
2   -3.030305   0.437688
3   -3.030305   -0.459201
...

RevisedGE

Requirements

The code of RevisedGE has been tested running under Python 3.6.1, with the following packages installed (along with their dependencies):

  • numpy == 1.12.1
  • scipy == 1.1.0
  • osqp == 0.4.1
  • qpsolvers == 1.0.4

Basic usage

The usage of RevisedGE is as follow:

python RevisedGE.py [-h] [-i INITIAL_SIZE] [-s CONVEXHULL_SIZE]
                [-c CONVERGENCE_DISTANCE] [-e TOLERATED_QP_ERROR]
                [-cr CONVERGENCE_CHANGE_RATE] [-si SIGMA]
                input_filename output_filename

For example:

python RevisedGE.py data/Center.npy results/Center_ach.txt

About

A python implementation for the approximate convex hull algorithm (Revised Greedy Expansion)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages