We present a data-driven approach for target detection and identification based on a linear mixture model. Our aim is to determine the existence of certain targets in a mixture without specific information on the targets or the background, and to identify the targets from a given library. We use the maximum canonical correlation between the target set and the observations as the detection score, and use coefficients of the canonical vector to identify the indices of the present components from the given target library. The performance of the detector is enhanced using subspace partitioning on the target library. Both simulation and experimental results are presented to demonstrate the effectiveness of the proposed method in Raman spectroscopy for detection of surface-deposited chemical agents.