gen_feat_mat
gen_feat_mat.Rd
function to generate feature matrix
Arguments
- data_path
(string): path to the parent folder of where the original spectra are stored. After deconvolution this folder also contains for each spectrum two .txt files which contain for each spectrum the spectrum approximated from all deconvoluted signals and a parameter file that contains all numerical values of the deconvolution
- ppm_range
(numeric) this is the result from the function get_ppm_range i.e the ppm range over which your signals are distributed
- si_size_real_spectrum
(positive integer) number of real data points in your original spectra, e.g. 128k = 131072 data points
- scale_factor_x
(positive integer): A factor which is used to avoid rounding errors e.g. 1000
Details
The output of this function is a data frame containing a matrix of all integral values found in your spectra (data_matrix). Here, each row corresponds to one spectrum and each column to one data point of the spectra, for example 128k data points in each spectrum correspond to 128K columns in the data matrix. Furthermore, a list of all signals(peakList), and individual parameters of the signals are stored in the data structure.