Archive for SVC

SVC and different kernels

Our experiments showed more than once that the employment of kernels other than the Gaussian one can significantly improve the results in certain circumstances.

From our experiments we know that

  • The Laplacian Kernel works well on some scaled/normalized data.
  • The Exponential Kernel generally behaves the same of the Gaussian one, but in some situations makes the difference, as happened in the experiments with IRIS data (multivariate) or CLASSIC3 data (text documents in BOW model with TF-IDF encoding).

These results suggest to go deeper in the matter and explore other kernels that can be useful in clustering with SVC.

Support Vector Clustering Code

Here I put the preliminary alpha source code for the Support Vector Clustering. It implements the Cone Cluster Labeling for the cluster assignment part

  • S. Lee and K. M. Daniels, "Cone Cluster Labeling for Support Vector Clustering," in Proceedings of 6th SIAM Conference on Data Mining, 2006, pp. 484-488.
    @inproceedings{cone2006,
      author = {Sei-Hyung Lee and Karen M. Daniels},
      Booktitle = {Proceedings of 6th SIAM Conference on Data Mining},
      Date-Added = {2007-04-29 16:58:13 +0200},
      Date-Modified = {2007-06-19 18:52:22 +0200},
      Keywords = {SVM, clustering},
      Month = {May},
      Pages = {484–488},
      Title = {Cone Cluster Labeling for Support Vector Clustering},
      Url = {http://www.siam.org/meetings/sdm06/proceedings/046lees.pdf},
      Year = {2006},
      Bdsk-File-1 = {YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290gAGoCwwXGBkaHiVVJG51bGzTDQ4PEBMWWk5TLm9iamVjdHNXTlMua2V5c1YkY2xhc3OiERKABIAFohQVgAKAA4AHXHJlbGF0aXZlUGF0aFlhbGlhc0RhdGFfEEsuLi8uLi8uLi9QYXBlcnMvTGVlL0NvbmUgQ2×1c3RlciBMYWJlbGluZyBmb3IgU3VwcG9ydCBWZWN0b3IgQ2×1c3RlcmluZy5wZGbSGw8cHVdOUy5kYXRhTxECLgAAAAACLgACAAAJRG9jdW1lbnRzAAAAAAAAAAAAAAAAAAAAAAAAvs54rkgrAAAANyVBH0NvbmUgQ2×1c3RlciBMYWJlbGluIzJGMDk0My5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvCUPCWn72AAAAAAAAAAAAAwADAAAJAAAAAAAAAAAAAAAAAAAAAANMZWUAABAACAAAvs5cjgAAABEACAAAwlpi1gAAAAEAFAA3JUEANxuAAACy8gAAEsYAABKtAAIATkRvY3VtZW50czpuZW1vOkRvY3VtZW50czpVbml2ZXJzaXRhOlBhcGVyczpMZWU6Q29uZSBDbHVzdGVyIExhYmVsaW4jMkYwOTQzLnBkZgAOAHAANwBDAG8AbgBlACAAQwBsAHUAcwB0AGUAcgAgAEwAYQBiAGUAbABpAG4AZwAgAGYAbwByACAAUwB1AHAAcABvAHIAdAAgAFYAZQBjAHQAbwByACAAQwBsAHUAcwB0AGUAcgBpAG4AZwAuAHAAZABmAA8AFAAJAEQAbwBjAHUAbQBlAG4AdABzABIAXS9uZW1vL0RvY3VtZW50cy9Vbml2ZXJzaXRhL1BhcGVycy9MZWUvQ29uZSBDbHVzdGVyIExhYmVsaW5nIGZvciBTdXBwb3J0IFZlY3RvciBDbHVzdGVyaW5nLnBkZgAAEwASL1ZvbHVtZXMvRG9jdW1lbnRzABUAAgAX//8AAIAG0h8gISJYJGNsYXNzZXNaJGNsYXNzbmFtZaMiIyRdTlNNdXRhYmxlRGF0YVZOU0RhdGFYTlNPYmplY3TSHyAmJ6InJFxOU0RpY3Rpb25hcnkACAARABsAJAApADIARABJAEwAUQBTAFwAYgBpAHQAfACDAIYAiACKAI0AjwCRAJMAoACqAPgA/QEFAzcDOQM+A0cDUgNWA2QDawN0A3kDfAAAAAAAAAIBAAAAAAAAACgAAAAAAAAAAAAAAAAAAAOJ},
      Bdsk-Url-1 = {http://www.siam.org/meetings/sdm06/proceedings/046lees.pdf}
    }

It also implements the Secant-like kernel width generator.

  • S. Lee and K. M. Daniels, "Gaussian Kernel Width Selection and Fast Cluster Labeling for Support Vector Clustering," Department of Computer Science, University of Massachussets Lowell2005.
    @techreport{kernwidthsvc2005,
      author = {Sei-Hyung Lee and Karen M. Daniels},
      Date-Added = {2007-05-18 10:44:22 +0200},
      Date-Modified = {2007-06-20 08:28:06 +0200},
      Institution = {Department of Computer Science, University of Massachussets Lowell},
      Keywords = {svm, clustering, kernel machines},
      Title = {Gaussian Kernel Width Selection and Fast Cluster Labeling for Support Vector Clustering},
      Url = {http://www.cs.uml.edu/~kdaniels/papers/SeiTechReport2005.pdf},
      Year = {2005},
      Bdsk-File-1 = {YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290gAGoCwwXGBkaHiVVJG51bGzTDQ4PEBMWWk5TLm9iamVjdHNXTlMua2V5c1YkY2xhc3OiERKABIAFohQVgAKAA4AHXHJlbGF0aXZlUGF0aFlhbGlhc0RhdGFfEG8uLi8uLi8uLi9QYXBlcnMvTGVlL0dhdXNzaWFuIEtlcm5lbCBXaWR0aCBTZWxlY3Rpb24gYW5kIEZhc3QgQ2×1c3RlciBMYWJlbGluZyBmb3IgU3VwcG9ydCBWZWN0b3IgQ2×1c3RlcmluZy5wZGbSGw8cHVdOUy5kYXRhTxECmgAAAAACmgACAAAJRG9jdW1lbnRzAAAAAAAAAAAAAAAAAAAAAAAAvs54rkgrAAAANyVBH0dhdXNzaWFuIEtlcm5lbCBXaWR0IzMxQ0FDQS5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxysrCcyn+UERGIAAAAAAAAwADAAAJAAAAAAAAAAAAAAAAAAAAAANMZWUAABAACAAAvs5cjgAAABEACAAAwnMN3gAAAAEAFAA3JUEANxuAAACy8gAAEsYAABKtAAIATkRvY3VtZW50czpuZW1vOkRvY3VtZW50czpVbml2ZXJzaXRhOlBhcGVyczpMZWU6R2F1c3NpYW4gS2VybmVsIFdpZHQjMzFDQUNBLnBkZgAOALgAWwBHAGEAdQBzAHMAaQBhAG4AIABLAGUAcgBuAGUAbAAgAFcAaQBkAHQAaAAgAFMAZQBsAGUAYwB0AGkAbwBuACAAYQBuAGQAIABGAGEAcwB0ACAAQwBsAHUAcwB0AGUAcgAgAEwAYQBiAGUAbABpAG4AZwAgAGYAbwByACAAUwB1AHAAcABvAHIAdAAgAFYAZQBjAHQAbwByACAAQwBsAHUAcwB0AGUAcgBpAG4AZwAuAHAAZABmAA8AFAAJAEQAbwBjAHUAbQBlAG4AdABzABIAgS9uZW1vL0RvY3VtZW50cy9Vbml2ZXJzaXRhL1BhcGVycy9MZWUvR2F1c3NpYW4gS2VybmVsIFdpZHRoIFNlbGVjdGlvbiBhbmQgRmFzdCBDbHVzdGVyIExhYmVsaW5nIGZvciBTdXBwb3J0IFZlY3RvciBDbHVzdGVyaW5nLnBkZgAAEwASL1ZvbHVtZXMvRG9jdW1lbnRzABUAAgAX//8AAIAG0h8gISJYJGNsYXNzZXNaJGNsYXNzbmFtZaMiIyRdTlNNdXRhYmxlRGF0YVZOU0RhdGFYTlNPYmplY3TSHyAmJ6InJFxOU0RpY3Rpb25hcnkACAARABsAJAApADIARABJAEwAUQBTAFwAYgBpAHQAfACDAIYAiACKAI0AjwCRAJMAoACqARwBIQEpA8cDyQPOA9cD4gPmA/QD+wQEBAkEDAAAAAAAAAIBAAAAAAAAACgAAAAAAAAAAAAAAAAAAAQZ},
      Bdsk-Url-1 = {http://www.cs.uml.edu/~kdaniels/papers/SeiTechReport2005.pdf}
    }

The SVM training part is performed by the means of the LIBSVM library, whereas the graph utilities are provided by the Boost Graph Library. Both libraries allow to redistribute the source code under some license terms, so the package you download contains everything you need to compile the code, you have just to type “make” in the source root directory.

For more information, take a look to the README directory you find once you have unpacked the tarball.

Download

SVC Source Code - SVC Doxygen documentation

Bregman divergences, SVMs and possible implications

In order to find a connection between the works studied (Bregman Co-clustering and Support Vector Clustering) we have performed some research. An interesting result are the following paper:

  • R. Nock and F. Nielsen, "Fitting the smallest enclosing Bregman balls," in 16th European Conference on Machine Learning, 2005, pp. 649-656.
    @conference{bregmanmeb05,
      author = {Richard Nock and Frank Nielsen},
      Booktitle = {16th European Conference on Machine Learning},
      Date-Added = {2007-06-23 11:00:19 +0200},
      Date-Modified = {2007-11-14 12:55:32 +0100},
      Keywords = {bregman, MEB},
      Number = {3720},
      Pages = {649–656},
      Publisher = {Springer-Verlag},
      Series = {Lectures Notes on Computer Science Series},
      Title = {{Fitting the smallest enclosing Bregman balls}},
      Url = {http://www.sonycsl.co.jp/person/nielsen/BregmanBall/nn-ecml-05.pdf},
      Year = {2005},
      Bdsk-File-1 = {YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290gAGoCwwXGBkaHiVVJG51bGzTDQ4PEBMWWk5TLm9iamVjdHNXTlMua2V5c1YkY2xhc3OiERKABIAFohQVgAKAA4AHXHJlbGF0aXZlUGF0aFlhbGlhc0RhdGFfEEUuLi8uLi8uLi9QYXBlcnMvTm9jay9GaXR0aW5nIHRoZSBzbWFsbGVzdCBlbmNsb3NpbmcgQnJlZ21hbiBiYWxscy5wZGbSGw8cHVdOUy5kYXRhTxECHAAAAAACHAACAAAJRG9jdW1lbnRzAAAAAAAAAAAAAAAAAAAAAAAAvs54rkgrAAAAN6DVH0ZpdHRpbmcgdGhlIHNtYWxsZXN0IzM3QTBEMy5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3oNPCoreIAAAAAAAAAAAAAwADAAAJAAAAAAAAAAAAAAAAAAAAAAROb2NrABAACAAAvs5cjgAAABEACAAAwqKbaAAAAAEAFAA3oNUANxuAAACy8gAAEsYAABKtAAIAT0RvY3VtZW50czpuZW1vOkRvY3VtZW50czpVbml2ZXJzaXRhOlBhcGVyczpOb2NrOkZpdHRpbmcgdGhlIHNtYWxsZXN0IzM3QTBEMy5wZGYAAA4AYgAwAEYAaQB0AHQAaQBuAGcAIAB0AGgAZQAgAHMAbQBhAGwAbABlAHMAdAAgAGUAbgBjAGwAbwBzAGkAbgBnACAAQgByAGUAZwBtAGEAbgAgAGIAYQBsAGwAcwAuAHAAZABmAA8AFAAJAEQAbwBjAHUAbQBlAG4AdABzABIAVy9uZW1vL0RvY3VtZW50cy9Vbml2ZXJzaXRhL1BhcGVycy9Ob2NrL0ZpdHRpbmcgdGhlIHNtYWxsZXN0IGVuY2xvc2luZyBCcmVnbWFuIGJhbGxzLnBkZgAAEwASL1ZvbHVtZXMvRG9jdW1lbnRzABUAAgAX//8AAIAG0h8gISJYJGNsYXNzZXNaJGNsYXNzbmFtZaMiIyRdTlNNdXRhYmxlRGF0YVZOU0RhdGFYTlNPYmplY3TSHyAmJ6InJFxOU0RpY3Rpb25hcnkACAARABsAJAApADIARABJAEwAUQBTAFwAYgBpAHQAfACDAIYAiACKAI0AjwCRAJMAoACqAPIA9wD/Ax8DIQMmAy8DOgM+A0wDUwNcA2EDZAAAAAAAAAIBAAAAAAAAACgAAAAAAAAAAAAAAAAAAANx},
      Bdsk-Url-1 = {http://www.sonycsl.co.jp/person/nielsen/BregmanBall/nn-ecml-05.pdf}
    }

The above paper generalizes the Minimum Enclosing Ball (MEB) problem to the Bregman divergences and also provide a generalization of the Bâdoiu-Clarkson (BC) approximation algorith. This is the same algorithm exploited in practical by the Core Vector Machines

  • I. W. Tsang, J. T. Kwok, and P. Cheung, "Core vector machines: Fast SVM training on very large data sets," Journal of Machine Learning Research, vol. 6, pp. 363-392, 2005.
    @article{cvm05,
      author = {Ivor W. Tsang and James T. Kwok and Pak-Ming Cheung},
      Date-Added = {2007-05-26 12:49:30 +0200},
      Date-Modified = {2007-06-23 08:23:02 +0200},
      Journal = {Journal of Machine Learning Research},
      Keywords = {SVM, CVM, MEB, SVDD},
      Pages = {363–392},
      Title = {Core vector machines: Fast SVM training on very large data sets},
      Url = {http://www.cs.ust.hk/%7Eivor/publication/tsang05a.pdf},
      Volume = {6},
      Year = {2005},
      Bdsk-File-1 = {YnBsaXN0MDDUAQIDBAUGBwpZJGFyY2hpdmVyWCR2ZXJzaW9uVCR0b3BYJG9iamVjdHNfEA9OU0tleWVkQXJjaGl2ZXISAAGGoNEICVRyb290gAGoCwwXGBkaHiVVJG51bGzTDQ4PEBMWWk5TLm9iamVjdHNXTlMua2V5c1YkY2xhc3OiERKABIAFohQVgAKAA4AHXHJlbGF0aXZlUGF0aFlhbGlhc0RhdGFfEFguLi8uLi8uLi9QYXBlcnMvVHNhbmcvQ29yZSB2ZWN0b3IgbWFjaGluZXMgRmFzdCBTVk0gdHJhaW5pbmcgb24gdmVyeSBsYXJnZSBkYXRhIHNldHMucGRm0hsPHB1XTlMuZGF0YU8RAlQAAAAAAlQAAgAACURvY3VtZW50cwAAAAAAAAAAAAAAAAAAAAAAAL7OeK5IKwAAADctuR9Db3JlIHZlY3RvciBtYWNoaW5lcyMzMkY0MjEucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMvQhwn3aZgAAAAAAAAAAAAMAAwAACQAAAAAAAAAAAAAAAAAAAAAFVHNhbmcAABAACAAAvs5cjgAAABEACAAAwn2+RgAAAAEAFAA3LbkANxuAAACy8gAAEsYAABKtAAIAUERvY3VtZW50czpuZW1vOkRvY3VtZW50czpVbml2ZXJzaXRhOlBhcGVyczpUc2FuZzpDb3JlIHZlY3RvciBtYWNoaW5lcyMzMkY0MjEucGRmAA4AhgBCAEMAbwByAGUAIAB2AGUAYwB0AG8AcgAgAG0AYQBjAGgAaQBuAGUAcwAgAEYAYQBzAHQAIABTAFYATQAgAHQAcgBhAGkAbgBpAG4AZwAgAG8AbgAgAHYAZQByAHkAIABsAGEAcgBnAGUAIABkAGEAdABhACAAcwBlAHQAcwAuAHAAZABmAA8AFAAJAEQAbwBjAHUAbQBlAG4AdABzABIAai9uZW1vL0RvY3VtZW50cy9Vbml2ZXJzaXRhL1BhcGVycy9Uc2FuZy9Db3JlIHZlY3RvciBtYWNoaW5lcyBGYXN0IFNWTSB0cmFpbmluZyBvbiB2ZXJ5IGxhcmdlIGRhdGEgc2V0cy5wZGYAEwASL1ZvbHVtZXMvRG9jdW1lbnRzABUAAgAX//8AAIAG0h8gISJYJGNsYXNzZXNaJGNsYXNzbmFtZaMiIyRdTlNNdXRhYmxlRGF0YVZOU0RhdGFYTlNPYmplY3TSHyAmJ6InJFxOU0RpY3Rpb25hcnkACAARABsAJAApADIARABJAEwAUQBTAFwAYgBpAHQAfACDAIYAiACKAI0AjwCRAJMAoACqAQUBCgESA2oDbANxA3oDhQOJA5cDngOnA6wDrwAAAAAAAAIBAAAAAAAAACgAAAAAAAAAAAAAAAAAAAO8},
      Bdsk-Url-1 = {http://www.cs.ust.hk/~ivor/publication/tsang05a.pdf}
    }

CVMs reformulate the SVMs as a MEB problem. Since they use the BC algorithm and such an algorithm has been generalized to the Bregman divergences, the research on vector machines could have interesting implications.

New talk on SVC and MBI Principle

In the Documents section are available the slides entitled: “Novel Clustering Techniques: Support Vector Methods and Minimum Bregman Information principle

SVC has been explained with more care because it still is a very experimental technique.

SVDD and kernel functions

Support Vector Domain Description (SVDD) is the basis of the Support Vector Clustering. The non linear version of the SVDD use the Gaussian kernel and no other kernels has been apparently investigated but the polynomial one which is an example of kernel type that works bad with SVDD.

I wrote an e-mail message to the SVDD author, Dr. David M. J. Tax (from Delft University of Technology, Netherlands). Here the “core” of the message

Even though the Gaussian kernel is the one with the best average performances, some experiments conducted on a specific application domain have given better results with a Laplacian kernel or an Exponential kernel.

What does it theoretically means from an SVDD perspective? Have you never tried kernels other than Gaussian and polynomial ones?

The reply of Dr. Tax was

To be honest the number of kernels I used is relatively limited. For some cases I used a correlation between image patches, and it seemed to work well. Also, some people
have used a modified Haussdorf distance to compare shapes. I don’t have a lot of
experience with it.

The big problem is that we can only say something about generalization for a given representation. By changing the kernel, the representation changes. And what happens then is completely dependent on the data, so it is extremely hard to say something general about what kernel to use (the same like what features to use). For some applications there may be features ‘proven by experience’ (like the RBF kernel for the simple UCI datasets), but theoretically you cannot really proof it, I think.

So, the conclusion is that a deeper investigation about other kernels and SVDD is needed. Currently, I have yet some experimental results in this direction (even if they are from a clustering perspective) and in future we could think to go in depth of the question analyzing the shape of data description and the behavior of various (exponential-based) kernels at different kernel width values.

Induced Missing Values Experiments - Stage 2

This is the continuation of the experiments started few days ago.

Two other datasets have been involved in this type of experiments. Both of them are Astrophysics datasets, more precisely two dataset containing Stars and Galaxies.

Star/Galaxies separation is a problem usually tackled with supervised learning methodologies. In our work several clustering testes are conducted on such type of data.

These two datasets was chosen to be quite simple to separate, because we are interested in the robustness with respect missing values.

Starting from the original datasets, I have created eight variants for each of them, in this way

  • 4 variants affecting only 3 features out of 15, with 5, 10, 20, 30 percent of objects reporting missing values for all of the 3 features, respectively
  • 4 variants affecting 6 features out of 15, with 5, 10, 20, 30 percent of objects reporting missing values for all of the 6 features, respectively

The experiments was done with Euclidean Co-clustering (Information-theoretic cannot work with negative values) and SVC.

An archive with all results is available for download (it contains also the results of the previous stage).

In the files above:

- “MV� stands for “Missing Values�
- “FC� stands for “Feature Clusters�
- FC1 means no feature clustering
- FC2 means two clusters of feature requested
- FC3 means three clusters of feature requested
- CC stands for Co-clustering

Induced Missing Values Experiments - Stage 1

Few days ago I made ready a tool to induce pseudo-random missing values within datasets. This tool allow us to test the robustness of both Bregman Co-clustering and SVC with respect to missing values.

The tool accepts two parameters: the fraction of objects that will be affected by the process, and the list of features involved.

As is my custom, I started this series of experiments with the IRIS data. So, I created these IRIS dataset variants

- IRIS 5a: 5% of objects with missing values. One feature (#3) involved.
- IRIS 5b: 5% of objects with missing values. Two features (#3, #4) involved.
- IRIS 10a: 10% of objects with missing values. One feature (#3) involved.
- IRIS 10b: 10% of objects with missing values. Two features (#3, #4) involved.
- IRIS 20a: 20% of objects with missing values. One feature (#3) involved.
- IRIS 20b: 20% of objects with missing values. Two features (#3, #4) involved.
- IRIS 30a: 30% of objects with missing values. One feature (#3) involved.
- IRIS 30b: 30% of objects with missing values. Two features (#3, #4) involved.

We recall the IRIS data have 4 features.

Here you can download the results.

The experiments was done with Co-clustering and SVC. Information-theoretic co-clustering results are not in the files above, because they were irrelevant (very poor performance).

In the files above:

- “MV” stands for “Missing Values”
- “FC” stands for “Feature Clusters”
- FC1 means no feature clustering
- FC2 means two clusters of feature requested.
- CC stands for Co-clustering

Generalizing Kernel Width Generator for SV Clustering

We have already discussed about the Kernel Width Generator for Support Vector Clustering

  • S. Lee and K. M. Daniels, "Gaussian Kernel Width Generator for Support Vector Clustering," in Advances in Bioinformatics and Its Applications, 2005, pp. 151-162.
    @inproceedings{gauskergenerator2004,
      author = {Sei-Hyung Lee and Karen M. Daniels},
      Booktitle = {Advances in Bioinformatics and Its Applications},
      Date-Added = {2007-10-23 17:21:17 +0200},
      Date-Modified = {2007-10-23 17:21:17 +0200},
      Editor = {Matthew He and Giri Narasimhan and Sergei Petoukhov},
      Keywords = {SVM, clustering, gaussian kernel},
      Pages = {151–162},
      Title = {Gaussian Kernel Width Generator for Support Vector Clustering},
      Url = {http://www.cs.uml.edu/~kdaniels/papers/ICBA.pdf},
      Volume = {8},
      Year = {2005},
      Bdsk-Url-1 = {http://www.cs.uml.edu/~kdaniels/papers/ICBA.pdf}
    }

More precisely, it is called the Gaussian kernel width generator, because it is intended for gaussian kernel width exploration. But the work above was influenced by the exclusive employment of the Gaussian kernel in the Support Vector Clustering literature.

In reality, the Support Vector Clustering works well (in some cases better) also with other kernel functions, such as Laplace kernel or Exponential kernel, notwithstanding the Gaussian kernel has the best average performances.

So we are interested in a more general kernel width exploration method.

As GaussianKernel(x,x) = 1 for all x, the method rely on the assumption that the entire data space is embedded onto the surface of the unit ball in feature space. In reality, the equality K(x,x) = 1 holds for all normalized kernels, so the validity of the proposed kernel width exploration method can be extended to all normalized kernels.

Kernels such as Gaussian, Laplacian, Exponential are all “self-normalized”, because all relies on the exp function with only a distance as exponent. Straightforwardly, such distance is always zero when we compute K(x,x), resulting in K(x,x) = 1.

Despite other kernels (like polynomial, sigmoid, perceptron, etc.) does not work well with Support Vector Clustering, for sake of completeness we recall that they can be normalized as follows

NK(x,y) = K(x,y) / sqrt(K(x,x)K(y,y))

where NK is the normalized version of K.

SVC Software Documentation

In the “Documents” section has been published the documentation (generated with Doxygen) of the C++ implementation of Support Vector Clustering (SVC).

View Documentation

Astronomical Data, Missing Values and SVC

Un test effettuato più che per curiosità che per altro ha dato risultati inaspettati.

Premessa: ho da poco introdotto l’utilizzo del kernel Laplaciano nel Support Vector Clustering. Senza soffermarmi troppo su questo particolare, sottolineo soltanto che l’utilizzo di questo Kernel permette spesso di trovare buone se non ottime soluzioni in 1/3 cicli, anche se non sempre superiori a quelle trovate col kernel Gaussiano.

Veniamo al dunque. Avevo bisogno di dataset astronomici più managgevoli per fare dei test, così spulciando varie pubblicazioni in merito, trovo lo SDSS Sky Server. Seguendo le linee guida e le pubblicazioni, ho estratto dai database dello SkyServer finora due piccoli dataset (i nomi li ho inventati io):

  • S2kG3k
    2000 stelle e 3000 galassie, rappresentate da 20 features (point spread function fluxes, petrosian radii, in arcsec, small-scale roughness of object, shapes).
    Numero di oggetti riportanti missing values: 1364.
    Numero di missing values: 2354
  • S3k5G1k5
    3500 stelle e 1500 galassie, rappresentate da 20 features (point spread function fluxes, petrosian radii, in arcsec, small-scale roughness of object, shapes).
    Numero di oggetti riportanti missing values: 2352.
    Numero di missing values: 4157

Dopo aver appurato che dataset simili ma senza missing values erano intrisecamente difficili da separare (strongly overlapping clusters), prima di tentare nuovi dataset per il Co-clustering, ho preferito, per curiosità, usare i succitati dataset con l’SVC.

Arriviamo direttamente al nocciolo, ovvero l’esecuzione dei test (separazione di stelle da galassie) con la seguente configurazione: SVC con Kernel Laplaciano e distanza euclidea L1.

Trattamenti al dataset:

  • imputazione del valore 0 per i missing values
  • normalizzazione dei dati ai vettori unitari (processo implicito quando si usa il kernel Gaussiano)
  • .

    Risultati di SVC sul primo dataset (ottenuto in un solo ciclo di SVC):

    Class 0
    TP: 2000 FP: 318
    FN: 0 TN: 2682

    Precision: 86.2813 - Recall: 100 - F1: 92.6355

    Class 1
    TP: 2682 FP: 0
    FN: 318 TN: 2000

    Precision: 100 - Recall: 89.4 - F1: 94.4034

    Accuracy: 93.64

    Risultati di SVC sul secondo dataset (ottenuto in un due cicli di SVC):

    Class 0
    TP: 3500 FP: 16
    FN: 0 TN: 1484

    Precision: 99.5449 - Recall: 100 - F1: 99.7719

    Class 1
    TP: 1484 FP: 0
    FN: 16 TN: 3500

    Precision: 100 - Recall: 98.9333 - F1: 99.4638

    Accuracy: 99.68

    Questi test risultano incoraggianti per il clustering di dati astronomici tipicamente affetti dalla presenza di missing data values.

    PS: nei test sopra la classe 0 è quella delle stelle, la 1 quelle delle galassie.