Skip to content

Commit

Permalink
Update readme and todo
Browse files Browse the repository at this point in the history
  • Loading branch information
oysstu committed Sep 18, 2015
1 parent f64b734 commit a5efc92
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
![Palette](./Palette.png)

### Description
A LabVIEW wrapper for libsvm (320). An interface to liblinear (1.19) is also included.
The wrapper can currently be considered experimental, as it has not been extensively tested.
A LabVIEW wrapper for libsvm (3.20) and liblinear (2.01).
The implementation is thread-safe, which means that multiple cross-validation/training/predicting can be executed simultaneously.

Although there exists an old wrapper for libsvm, it uses the (now) unsupported CIN interface and passes data through text files. This implementation uses Call Library Function Nodes, and passes data directly.
Interfaces to both libsvm sparse and dense is included. The recommendation is to use the dense variant unless you know you need sparseness. This is both due to better performance and a more practical data format as the indices are implicit. Both sparse and dense perform similarly for small number of features. Note however, that performance for the sparse 32-bit library suffers because the LabVIEW structures are not directly memory compatible with the C++ library, which introduces unnecessary copies. The recommendation is therefore to use a 64-bit LabVIEW installation if the sparse library is needed.

The implementation is thread-safe, which means that multiple cross-validation/training/predicting can be executed simultaneously. This can for example be done quick and dirty by placing the VIs in a parallel for loop.
Sparse is only necessary for datasets consisting of an extremely large number of features, where many features are zeros.

### Installation
**The easiest way to install the library is through the pre-built VIPM package found under releases.**
This installs both the VIs and binary components to vi.lib.
Currently the only supported system is windows, but unix support will be added at a later point.
**The easiest way to install the library is through the pre-built VIPM package found under releases.** This installs both the VIs and binary components to user.lib and adds an entry in the LabVIEW palette. Alternatively, one can download the project itself and the binaries under releases corresponding to the target bitness.

The supplied binaries are compiled using Visual Studio 2013.
The wrapper is developed in LabVIEW 2014, but the distributed VIPM packages are compatible with LabVIEW 2011 and later.
Let me know if you would like me to extend support for previous versions.

### Dependencies
* libsvm and liblinear binaries (included in the VIPM package)
* libsvm and liblinear binaries (included in the VIPM package or through the zip files)
* OpenG Toolkit VIs (automatically installed by VIPM)
* [Visual Studio 2013 Visual C++ Redistributable](http://www.microsoft.com/en-us/download/details.aspx?id=40784) (x86 for 32bit LabVIEW, x64 for 64bit LabVIEW)


### Usage
Currently there are three examples included in the palette.
Look at the libsvm/liblinear documentation if something should be unclear.
Currently there are three examples included in the palette. Look at the official libsvm/liblinear documentation if something should be unclear.
The documentation for the python wrapper in scikit-learn is also very useful.

The library primarily consists of VIs that more or less wrap the functions exposed through the libsvm/liblinear API.
The data structures used for these calls are relatively similar.

### Bugs
Please report any bugs or feature requests either through the issue system or a message.
11 changes: 4 additions & 7 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
## TODOs (not in any particular order)
1. Redirect stdout and stderr, used in libsvm, to a file (using freopen("file.txt","w",stdout/stderr)) or user event.
2. Make the print function user events per-instance
3. Implement user-friendly precomputed kernels (in LabVIEW)
4a. Make an object-oriented interface in LabVIEW.
4b. Encapsulate the svm_problem / linear_problem in a DVR to avoid data duplication, might be necessary for huge datasets.
5. Create an interface to libsvm-dense, which uses dense feature vectors to improve performance.
## TODOs
1. Implement user-friendly precomputed kernels (in LabVIEW)
2. Improve liblinear interface
3. Test and provide tools for multi-class SVM

0 comments on commit a5efc92

Please sign in to comment.