File Exchange

image thumbnail

Feature fusion using Discriminant Correlation Analysis (DCA)

version (4.24 KB) by Mohammad Haghighat
Feature fusion using Discriminant Correlation Analysis (DCA)


Updated 16 Feb 2017

GitHub view license on GitHub

Feature fusion is the process of combining two feature vectors to obtain a single feature vector, which is more discriminative than any of the input feature vectors.
DCAFUSE applies feature level fusion using a method based on Discriminant Correlation Analysis (DCA). It gets the train and test data matrices from two modalities X and Y, along with their corresponding class labels and consolidates them into a single feature set Z.

Details can be found in:

M. Haghighat, M. Abdel-Mottaleb, W. Alhalabi, "Discriminant Correlation Analysis: Real-Time Feature Level Fusion for Multimodal Biometric Recognition," IEEE Transactions on Information Forensics and Security, vol. 11, no. 9, pp. 1984-1996, Sept. 2016.


M. Haghighat, M. Abdel-Mottaleb W. Alhalabi, "Discriminant Correlation Analysis for Feature Level Fusion with application to multimodal biometrics," IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2016, pp. 1866-1870.

(C) Mohammad Haghighat, University of Miami

Comments and Ratings (21)

Hi Mohammad, I have question. I am sorry if i am asking silly question.
Actually, i did not understand about your training data set. Example i have features, which we can define as a binary classification. So in that case how can i create training data sets?
Thank you in advance.

Can we get back the original two feature vectors from the obtained fused feature vector???What is the need to apply SVD at end??Please clarify my doubts

Haider Mehraj:
The problem seems to be with your input data matrix. As the error says it contains NaN or Inf values. You'd better eliminate such features before moving forward with anything.

I am getting this error while using your code.
I try to normalize before applying fusion and it is causing this error.

Error using eig
Input matrix contains NaN or Inf.

Error in dcaFuse (line 120)
[eigVecs,eigVals] = eig(artSbx);

Chidiebere Ike:
You can either use two different feature extraction techniques to extract features from a single modality, or if you have a multimodal system, you can fuse the feature sets extracted from different modalities using the DCA.

Dear All,
It's my pleasure to contact you via this medium. I am a Research student and working on Low resolution images. I am new to coding via Matlab but find it interesting. I observed this work was rated 5 start.

I have the file but need some guide on how to use it.

Am I expected to use 2 feature extraction techniques first before applying it's output/result to the DCA code of Mohammad Haghighat ?

Please can you guide me or share similar examples ?

My email is



I don't know what your feature sets look like. One case in which CCA will work better than DCA is when you have a small number of classes. As mentioned in the paper, the length of the DCA feature vectors is limited by the number of classes and also the rank of the feature matrices. So, for example, for a binary classification, you cannot use DCA or it will perform very poorly.

Hello Sir, I have implemeted both cca and dca for my project. It is said here that since dca is a supervised technique, it gives better results than cca. However, in my case dca gives poor result, and it even gives poor accuracy than the individual features.
In your example, this is shown
testXdca = Ax * testX;
But while implementing this gives error that matrix dimension mismatch. So I changed it to
testXdca = Ax' * testX;
Also, I use PCA to reduce the individual features before applying dca/cca to it. cca gives much better result but dca does not.
Can you please help me with this issue, as to why the accuracy is going wrong.

Islem Rekik

what is label?


HR Ramya

hello ...where can i find the code

Mokni Raouia:

Please refer to the comment below (04 May 2016). For more detailed information, you can also read Section III of this paper:

M. Haghighat, M. Abdel-Mottaleb, W. Alhalabi, "Discriminant Correlation Analysis: Real-Time Feature Level Fusion for Multimodal Biometric Recognition," IEEE Transactions on Information Forensics and Security, vol. 11, no. 9, pp. 1984-1996, Sept. 2016.

Dear Mohammad
Thank you for your codes
What is the difference between Discriminant Correlation Analysis (DCA) and the Canonical Correlation Analysis (CCA)?

cuong ha

Mike Reno



The feature fusion method based on Canonical Correlation Analysis (CCA) has two issues:

The first issue is encountered in the case of a small sample size (SSS) problem, where the number of samples is less than the number of features (n < p or n < q). This makes the covariance matrices singular and non-invertible.

The second and more important issue is the negligence of the class structure in CCA. Although it decorrelates the features, in pattern recognition problems, we are also interested in separating the classes.

Discriminant Correlation Analysis (DCA), on the other hand, considers the class associations in feature sets. It eliminates the between-class correlations and restricts the correlations to be within classes. DCA has the characteristics of the CCA- based methods in maximizing the correlation of corresponding features across the two feature sets and in addition decorrelates features that belong to different classes within each feature set.


How is this different than CCA?


Added the references

Added the references

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor