Welcome to Dahua's Web Home

Thoughts sparkle by sharing

Welcome

Welcome to my home page of softwares. This page introduces the codes and software that I would like to share with you. All source codes are open and available for free. I have been continuously improving the quality of the codes and offering more documents on their usage. However, due to the limits of time and efforts that I can devote to the softwares, they are still far from perfect.

My MATLAB Toolboxes

MATLAB is a widely used technical computing environment. In my research, MATLAB is my main tool to write and test mathematical models and algorithm prototypes. During this period, hundreds of MATLAB functions have been written. I have organized some of them into toolboxes and release them to MATLAB Central File Exchange, with my pleasure seeing that my works contribute to the community.


Data Manipulation Toolbox

Data Manipulation Toolbox (dmtoolbox) is a MATLAB toolbox to facilitate the general programming using various data structures such as string, arrays, cell arrays and struct arrays. Despite that MATLAB has offered a series of builtin functions to manipulate these elements, nontrivial efforts are still needed to accomplish some advanced operations. This toolbox aims at complementing some functions that MATLAB currently lacks instead of replacing the existing ones.

Here is a brief list of the functionality offered by the dmtoolbox

Common Utilities

The functions for logical judgment, conditional counting, array selection, and the computation of Cartesian product.

String Manipulation and Formatting

The functions for generating strings in different types, formatting strings, extracting information from strings, and converting strings.

Cell Array Manipulation

The functions for logical judgment, conditional counting, element selection, selective removal, and conversion of cell arrays.

Struct Array Manipulation

The functions for sorting and converting struct arrays from/to different data structures.

Mapping (Look-Up-Table)

The functions to construct maps(also known as dictionary, hash table, or loop-up-table), and map a scalar or a string to the corresponding value.

Unit Testing Framework

It is a flexible and lightweight framework with classes and functions to assist unit testing in MATLAB. You can make use of the framework to write testing functions with assertions, group them into test cases and test suites. The framework monitors the running of all test cases and records all assertion checking results and exceptions, and reports to the user as well.

Elaborate help has been provided within each m-function, with sufficient examples to show their usage. In addition, well-formated HTML help of this toolbox is made available in the MATLAB Help Browser. You can readily refer to it by finding the Data Manipulation Toolbox in the list of MATLAB Help Contents or simply typing dmdoc in MATLAB command line.

To assure the quality, a comprehensive testsuite has been written to check whether all functions work properly. After installing the toolbox, you may type in dmtoolbox_test to run the tests to verify that the toolbox can work normally in your MATLAB environment. The whole testsuite is written based on the unit testing framework offered in the toolbox, which in itself is a good example to show how to use the testing framework.

Get Data Manipulation Toolbox | Online Documentation

Statistical Learning Toolbox

Statistical Learning Toolbox(sltoolbox) organizes a comprehensive set of matlab codes in statistical learning, pattern recognition and computer vision. It includes over 200 m-files in multiple categories, which are from low-level computational routines to high-level frameworks and algorithms. The toolbox have following main features:
  • It covers many active research topics in learning and vision, including classification, regression, statistical modeling, finite mixture model, graph theory-based learning, subspace learning, kernel learning, manifold learning, tensor algebra, vector quantization and vocabulary learning.

  • It offers many useful utilities to facilitate your experiments in matlab, including a set of kits to manipulate data, text and files.

  • It is highly optimized. Much efforts have been devoted to improve the run-time efficiency of the codes. It is achieved with three ways: deducing equivalent mathematical forms for fast computation, grouping the operations into matrix-based computations to maximum degree, and writing the codes in cpp-mex for those cannot be organized into matrix computation.

  • It is flexible and extensible. For most of the functions, you can control a lot of properties to adapt its behaviour to your need. For many algorithms, the implementations support weighted samples so that you can easily incorporate the algorithm into the environment using weights. In addition, in some of the algorithms, you can change the functions' behaviour by supplying your own call-back function. For example, in K-means, you can specify your special function to measure distances or compute means; in spectral learning, you can specify your function to caculate the graph edge weights in your own manner.

  • It is well organized. The whole toolbox is organized according to the rules in software engineering. They are not a simple collection of many algorithms, but a carefully designed system, so that the codes can be maximally reused and cooperate well.

  • It is easy to use. Detailed help information is given for each m-file. I have tried to design friendly interfaces to user. For many of the functions, you can use a small number of arguments to invoke them in default settings, when you would like to gain more control on their behaviour, you can tell them your specification by setting properties, such as

    f(x1, x2, 'propertyname1', propertyvalue1, 'propertyname2', propertyvalue2, ...)
  • It is robust. Attention has been paid to the numerical stability of the computations and some steps have been taken to enhance the stability. In addition, a lot of error-checking statements are used to check the consistency of the input arguments. I have tried to lie a good balance between robustness and effiency, and increase the robustness without notably compromising the run-time speed.

Get Statistical Learning Toolbox | Online Documentation

M-Doc --- Documentation of my toolboxes

You may notice that there are some symbols like \[, \], \{, \{, \}, \{:, \:}, -, # in the MATLAB Help of each m-file in my toolboxes. They are for marking specific constructions in the MATLAB Help. I have developed a parsing framework in Ruby, which automatically parses the help part with markups and produces XML files describing the structure of the help documents, such as section, paragraph, list, table, block, etc. XSLT and CSS then work together to produce formatted web pages.

The documentation parsing system will be released later when it is ready for delivery.