An apparatus (100; 1100) for measuring a spectrum, the apparatus (100; 1100) comprising: a light source array configured to emit light towards an object; a photodetector configured to detect light reflected by the object; and a processor (130; 1120) configured to: measure a first temperature correction spectrum by driving the light source array based on a first driving condition; induce a temperature change of the light source array by changing the first driving condition to a second driving condition, wherein the temperature change of the light source array is induced by changing at least one of a pulse width, a cooling delay, and an intensity of an applied current; and measure a second temperature correction spectrum by driving the light source array based on the second driving condition, obtain a light source temperature drift vector by calculating a difference spectrum between the first temperature correction spectrum and the second temperature correction spectrum and extracting a principal component spectrum vector of the calculated difference spectrum as the light source temperature drift vector, by using one of Principal Component Analysis, PCA, Independent Component Analysis, ICA, Non-negative Matrix Factorization, NMF, and Singular Value Decomposition, SVD; measure, using the light source array and the photodetector, an analysis spectrum by using the light source array and the photodetector; and adjust the measured analysis spectrum to reduce an effect of the temperature change of the light source array by using the obtained light source temperature drift vector. a light source array configured to emit light towards an object; a photodetector configured to detect light reflected by the object; and a processor (130; 1120) configured to: measure a first temperature correction spectrum by driving the light source array based on a first driving condition; induce a temperature change of the light source array by changing the first driving condition to a second driving condition, wherein the temperature change of the light source array is induced by changing at least one of a pulse width, a cooling delay, and an intensity of an applied current; and measure a second temperature correction spectrum by driving the light source array based on the second driving condition, obtain a light source temperature drift vector by calculating a difference spectrum between the first temperature correction spectrum and the second temperature correction spectrum and extracting a principal component spectrum vector of the calculated difference spectrum as the light source temperature drift vector, by using one of Principal Component Analysis, PCA, Independent Component Analysis, ICA, Non-negative Matrix Factorization, NMF, and Singular Value Decomposition, SVD; measure, using the light source array and the photodetector, an analysis spectrum by using the light source array and the photodetector; and adjust the measured analysis spectrum to reduce an effect of the temperature change of the light source array by using the obtained light source temperature drift vector. measure a first temperature correction spectrum by driving the light source array based on a first driving condition; induce a temperature change of the light source array by changing the first driving condition to a second driving condition, wherein the temperature change of the light source array is induced by changing at least one of a pulse width, a cooling delay, and an intensity of an applied current; and measure a second temperature correction spectrum by driving the light source array based on the second driving condition, obtain a light source temperature drift vector by calculating a difference spectrum between the first temperature correction spectrum and the second temperature correction spectrum and extracting a principal component spectrum vector of the calculated difference spectrum as the light source temperature drift vector, by using one of Principal Component Analysis, PCA, Independent Component Analysis, ICA, Non-negative Matrix Factorization, NMF, and Singular Value Decomposition, SVD; measure, using the light source array and the photodetector, an analysis spectrum by using the light source array and the photodetector; and adjust the measured analysis spectrum to reduce an effect of the temperature change of the light source array by using the obtained light source temperature drift vector.