CCA for Feature Fusion - matlab

In some of the multi-modal recognition methods, they are using Canonical Correlation Analysis (CCA) to fuse the two input feature vectors into a single and also a low dimension one.
Matlab has already the code for CCA which is:
[A,B,r,U,V] = canoncorr(X,Y);
See: http://www.mathworks.com/help/stats/canoncorr.html
I wonder how I can reach the final (fused) feature vector using this function.
Can someone explain the steps or suggest a reference, please?

I found out how to perform the feature fusion using CCA. I wrote a Matlab code to do it and shared the code in MATLAB Central.
Detailed descriptions can be found in this paper:
M. Haghighat, M. Abdel-Mottaleb, W. Alhalabi, "Fully Automatic Face Normalization and Single Sample Face Recognition in Unconstrained Environments," Expert Systems With Applications, vol. 47, pp. 23-34, April 2016.

Related

Which Toolbox has Gjlim function in matlab?

I am trying to solve a system of equations by the Gauss-Jordan method, the book uses the Gjelim function but I cannot find the Toolbox that implements it. I would appreciate if anyone has this information.
You haven't referenced exactly the book you're looking at, but as noted in Linear Algebra with Applications (Gareth Williams, p.532)
MATLAB contains functions for working with matrices. New functions can also be written in the MATLAB language. The function gjelim has been written for Gauss-Jordan elimination. It includes a "rational number" option (the default mode is decimal number), a "count of arithmetic operations" option, and an "all steps" option that displays all the steps. gjelim and other MATLAB programs are found in The Linear Algebra with Applications Toolbox available from http://www.stetson.edu/~gwilliam/mfiles.htm
Unfortunately this link appears to now be dead, but it is still available on archive.org (here is the most recent entry from Sept 2019):
https://web.archive.org/web/20180214124023/http://www2.stetson.edu/~gwilliam/mfiles.htm
And the link for downloading the toolbox zip is still served by that archive:
https://web.archive.org/web/20180214124023/http://www2.stetson.edu/~gwilliam/mfiles.ZIP

Classification in real time without prior knowledge of the number of classes

Is there an implemented algorithm (with python/R or java in preference) that can classify incoming data from an unknown generator with absolutely no prior knowledge or assumption.
For example:
Let G be a generator of 2d vectors that generate one vector in each second.
What we know, and nothing else, is that this vectors are separable into clusters in space (euclidean distance).
Question: How can I classify my data in real time so that at each iteration, the algorithm propose clusters?
I'm also in the process of searching for something related to Data stream clustering and I found some papers and code:
Aforementioned survey by Charu C. Aggarwal from aforementioned book;
Density-Based Clustering over an Evolving Data Stream with Noise. by Feng Cao et al., proposes DenStream; here is a git repo for that (Matlab);
Density-Based Clustering for Real-Time Stream Data by Yixin Chen, Li Tu, proposes the D-Stream framework (2008 version called Stream data clustering based on grid density and attraction); There is a DD-Stream that I can't find a pdf for in A grid and density-based clustering algorithm for processing data stream by Jia.
A Fast and Stable Incremental Clustering Algorithm by Steven Young et al. focuses on clustering as an unsupervised learning process;
Self-Adaptive Anytime Stream Clustering by Philipp Kranen et al. has ClusTree and this git repo implements DClusTree;
Pre-clustering algorithm for anomaly detection and clustering that uses variable size buckets by Manish Sharma et al. is more recent and may be relevant (git repo of the author);
This paper is about MOA (Massive Online Analysis) states that it implements some of the above (StreamKM++, CluStream, ClusTree, Den-Stream, D-Stream and CobWeb). I believe that D-Stream is work in progress/wishful thinking (is not part of the pre-release available from their website). MOA is written in Java, here is streamMOA package.
The code in this repository seems to be a Python implementation of the D-Stream but, according to the author, it is slow.
Also, stream is a framework for data stream clustering research with R.
I think you are asking about "Stream mining" here.
Read this article
Chapter 10: A Survey of Stream Clustering Algorithms.
Charu C. Aggarwal, IBM T. J. Watson Research Center, Yorktown Heights, NY
This can be found in the 2014 book
DATA CLUSTERING- Algorithms and Applications, Edited by Charu C. Aggarwal and Chandan K. Reddy.
In that chapter the "CluStream" framework is described. This project is from 2002, and it is based on the BIRCH algorithm from 1997 which is a "Micro-Clustering" approach. The algorithm creates an index structure on the fly.
Considering that there are few BIRCH implementations,
there is probably no open-source CluStream algorithm/framework available.
Here's a Github repo with a BIRCH implementation in Java - although I haven't tried this code, and that repo is not for "stream mining".
All this just appeared on my radar because I just recently participated in the Coursera MOOC on cluster analysis.
There are no assumption free methods.
You are asking for magic to happen.
Never blindly use a clustering result. Do not use clustering on a stream. Instead, analyze and correct any clustering result before deployment.
Watch out for hidden assumptions. For example, assumptions that clusters are convex, distance based (why is Euclidean distance the coorect choice?), have the same size or extend, are separated (by what?) or shape. Whenever you design a method, you make assumptions on what is interesting.
Wothout assumption, anything is a "clustering"!

Box Cox transformation for multivariate normality in MATLAB

Has anyone implemented a Box Cox approach in MATLAB to transform multivariate data? I've found an R package that does it, but nothing for MATLAB.
Thanks.
MATLAB do not have built in function to implement multivariate box-cox transformaion.
I have written one myself and it works.
Here is the code.
The input x is the obervation matix, where the rows denote the obervations
and the columns denote the variables.
Reference: Applied Multivariate Statistical Analysis 6th- Johnson R. & Wichern D. Chapter 4.8 Transformations to Near Normality
function lambda=boxcoxn(x)
[m,n]=size(x);
lambda_ini=zeros(n,1);
for ii=1:n
[temp,lambda_ini(ii,1)]=boxcox(x(:,ii));
end
fun=#(lambda)(log(det((cov(((x.^repmat(lambda',m,1)-1)./repmat(lambda',m,1))))))*m/2-(lambda-1)'*(sum(log(x)))');
lambda=fminsearch(fun,lambda_ini);
end
Just feel free to use it.
Googling "MATLAB Box Cox" tells me that:
Box-Cox transformations are available in Financial Toolbox
There is a freely available implementation on MATLAB Central File Exchange.

Neighbour Component Analysis implementation in Octave/Matlab

I've been trying to implement the Neighbourhood Component Analysis (NCA) algorithm in Octave, but apparently there's something wrong with my code and I cannot figure out what it is.
Note: I am using Carl Edward Rasmussen's minimize function for maximization of the negative f.
Note 2: The test data I am using is the Wine dataset available at the UCI Machine Learning repository.
With some external help, I've got the answer to the question. The problem was that I was assuming wrongly that vector product of the difference of datapoints i and j should be a row vector by column vector instead of the opposite:

ICA (Independent Component Analysis) in matlab

Could you provide an example of ICA Independent Component Analysis IN MATLAB?
I know PCA is implemented in matlab but ICA, what about RCA?
Have a look at the FastICA implementation. I've used their R version before, I assume the matlab implementation does the same thing... On that page you get a description of the algorithm and pointers to more info.
Dr G was right.
Now, you are able to find a complete and a very useful Matlab Package (works also with 2013a version):
FastICA
Also you can find a another ICA and PCA Matlab implementation package there: ICA/PCA. But I have no experience with it.
The topic is quite old, but it is worth mentioning that in 2017a, matlab introduced reconstruction independent component analysis (RICA), which may come in handy for someone searching for ICA.