chemometrics.generate_data(n_wl=100, n_samples=100, n_conc=2, noise=0.1)

Generate artificial spectroscopic XY data without background

An artificial spectroscopic dataset is generated, which resembles a Raman, FTIR acquisition. The spectra are disturbed by white noise. Concentrations are uniformly distributed between 0 and 1.

  • n_wl (int) – number of wavelengths/signals to generate (default: 100)

  • n_samples (int) – number of samples generated (default: 100)

  • n_conc (int) – number of background spectra to generate

  • noise (float) – white noise level in the artificial spectra


  • X ((n_samples, n_wl)) – artificial spectra

  • Y ((n_samples, n_conc)) – artificial reference data