fig1 represents a possible measuring arrangement . the samples 6 are acquired by a measuring head 5 containing a sensor 5 , wherein a spectrometer 4 records the spectra . the digitalised data are via a lead 3 led into a computer 1 which then carries out the calibration according to the invention . the spectra and the evaluation is usually displayed on a monitor 2 . fig2 shows the basic course of the automatic calibration according to the invention . the first step comprises the initialisation of the knowledge base . there follows the actual input of the data with the formation of data sets . the components of the data sets are completely or partly permutated and are subjected to a computing method . the used permutations are initialised , wherein for each permutation a special factor selection , a q - value is computed and thus a specific calibration is allocated and stored . there results therefrom a multitude of quality values from which the optimal q - value may be selected and thus the most suitable calibration may be determined . fig3 represents the initialisation of the knowledge base . the knowledge base forms the basis for the components containing the data sets . to the initial data there belong for example the instrument type / sensor , the substance type , the calibration type , the calibration behaviour and / or spectral data . from these five initial data , on account of expert knowledge the parameter group is determined and weighted . as a sensor type an optical or mechanical sensor may be considered . the substance type is determined by way of a prior treatment of data and by way of the selection of the measuring procedures . to the calibration type there belongs a calibration data set with a possible computing method . the calibration behaviour is determined from the selected wavelength region , a pre - treatment of data , the primary , the secondary factors and / or the number of measuring procedures . the spectra data are composed of the calibration data set , the validation data set , the wavelength selection , the pretreatment of data and / or the number of measuring procedures . after the initialisation there follows the actual input according to fig4 . from the spectra data there is selected in particular the instrument type / sensor with which the respective spectrum is recorded . furthermore the substance type , the calibration type and the calibration behaviour are inputted . after the input there follows according to fig5 the complete and / or part permutation of the components of the data sets . the respective parameter group is subjected to a computation for the calibration . with this , the method itself forms a component of the data set . the method computation is broken down in fig6 . the computation course begins with the main component analysis , amongst others published in s . wood , k . esbensen , p . geladi , “ principle component analysis ”, chemometrics and intelligent laboratory systems 2 ( 1987 ) 37 - 52 . a spectrum measured with the device according to fig1 may for example be composed of for example 500 measuring points . this individual measuring data corresponds to the intensity values in dependence on 500 wave numbers in the near infrared . in order to obtain a good calibration , one in turn requires a large number of spectra . for example 100 substance spectra thus result in 50 , 000 data points which entails a great computing effort . in order to obtain acceptable computing times the spectral data is condensed with the help of the main component analysis . with this no important information is lost . with a calibration , to the samples there are allocated two different data sets independent of one another , specifically the calibration data set on the one hand and the validation data set on the other hand . with the calibration data set the main component analysis is carried out . with the validation data set the results of the calibration are evaluated . for the quantitative calibration there are available a multitude of computation methods . in particular there are cited here the three most common computation methods : multiple linear regression ( mlr ), principle component regression ( pcr ) and the partial least squares regression ( pls ), for example published in bruce r kowalski , “ chemometrics , mathematics & amp ; statistics in chemistry ” nato ais series , series c : math . & amp ; phys . sciences vol . 138 ( 1984 ). mlr is an extension of the linear regression to several dimensions . this evaluation on account of a few selective wavelengths requires no main component analysis . in this method the properties are computed by intensity values and correlation coefficients . the pcr is composed of two steps . in the first step the intensities to be loaded are computed by way of the main component analysis . the second step produces the correlation coefficients by way of mlr . according to the principle of recursion with pls the data to be loaded is computed . the quantitative reference values are however taken account of already at the beginning of the computation . whilst the pcr reduces the spectral data to the most dominant dimensions , the pls targets the most relative dimensions , i . e . the best agreement between prognosed and actual values . the actual calibration is made up on the one hand of the qualitative and on the other hand of the quantitative calibration . the course of the quantitative calibration begins with the measuring of the calibration spectra . in order to set up a representative calibration a multitude of various charges of the same class should be measured . with an increasing number of measuring run - throughs the signal / optical noise ratio may be improved and inhomogenities compensated . after the measuring of the samples , the actual setting up of the calibration begins . 1 . the spectra are divided into a calibration data set and into a validation data set , wherein the selection is effected purely randomly . as mentioned above , the calibration data set must be independent from the validation data set . in this first set one works without a wavelength selection and without data pretreatment . 3 . the total number of the primary factors is selected . primary factors are to be understood as the factors which are meaningful for the description of the spectra up to the optical noise limit of the applied measuring method . 4 . following the determination of the primary factors , the selection factors , called secondary factors are selected . these selection factors are the factors which allocate to the associated spectra an unequivocal separation of the various calibration qualities . the factor selection is shown in the form of a flow diagram in fig7 . 5 . there follows an optimisation of the calibration . if no selection is achieved the various data pretreatments should be carried out . those wavelength regions are rejected which do not contain any significant information . the qualitative calibration is used for measuring property values ( e . g . water content , mixing constituent parts , hydroxy number , etc .). after measuring the samples the calibration is set up . it is effected essentially according to the same course as with the qualitative calibration . according to the type of calibration , qualitative or quantitative , according to the flow diagram in fig8 the quality of the calibration , the so - called q - value , is determined . at the end of the calibration computations subsequently a table of the various q - values is set up from which one may then select the optimal calibration .