{"id":3518,"date":"2025-08-15T11:12:58","date_gmt":"2025-08-15T09:12:58","guid":{"rendered":"https:\/\/neuraldesigner.com\/learning\/qcm-alcohol-sensor\/"},"modified":"2026-02-26T12:06:44","modified_gmt":"2026-02-26T11:06:44","slug":"qcm-alcohol-sensor","status":"publish","type":"learning","link":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/","title":{"rendered":"Develop an e-nose to detect alcohols using machine learning"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"3518\" class=\"elementor elementor-3518\" data-elementor-post-type=\"learning\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f92d84c e-flex e-con-boxed e-con e-parent\" data-id=\"f92d84c\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-05afcf4 elementor-widget elementor-widget-text-editor\" data-id=\"05afcf4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<section><p>This example builds a machine learning model to develop an e-nose to detect alcohols.<\/p><\/section><section>\u00a0Scientists design electronic noses to mimic humans&#8217; sensory abilities for detecting complex mixtures of chemical substances and biological origin. A QCM is an electromechanical oscillator containing a thin slice of quartz crystal with two channels on its surface. This physical device is sensitive to the resonance frequency. The central goal here is to design an electronic nose model that makes proper classifications for different alcohol types (1-Octanol, 1-propanol, 2-butanol, 2-propanol, 1-Isobutanol) using QCM sensor data.<\/section>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3892300 elementor-widget elementor-widget-text-editor\" data-id=\"3892300\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h3>Contents<\/h3><ol><li style=\"list-style-type: none;\"><ol><li><a href=\"#ApplicationType\">Application type<\/a>.<\/li><li><a href=\"#DataSet\">Data set<\/a>.<\/li><li><a href=\"#NeuralNetwork\">Neural network<\/a>.<\/li><li><a href=\"#TrainingStrategy\">Training strategy<\/a>.<\/li><li><a href=\"#ModelSelection\">Model selection<\/a>.<\/li><li><a href=\"#TestingAnalysis\">Testing analysis<\/a>.<\/li><li><a href=\"#ModelDeployment\">Model deployment<\/a>.<\/li><\/ol><\/li><\/ol><p><!--<\/p>\n<li><a href=\"#TutorialVideo\">Tutorial video<\/a>.<\/li>\n<p>--><\/p><p>If you want to follow the steps of this example, download <a href=\"https:\/\/www.neuraldesigner.com\/downloads\">Neural Designer<\/a>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-51c5a02 e-con-full e-flex e-con e-child\" data-id=\"51c5a02\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d5b60e9 elementor-widget__width-initial boton_descarga elementor-widget-mobile__width-initial elementor-widget elementor-widget-button\" data-id=\"d5b60e9\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/www.neuraldesigner.com\/downloads\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t<span class=\"elementor-button-icon\">\n\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-download\" viewBox=\"0 0 512 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z\"><\/path><\/svg>\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Download<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1970825 elementor-widget elementor-widget-text-editor\" data-id=\"1970825\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h2>1. Application type<\/h2><p>This is a classification project since the variable to be predicted is categorical (1-Octanol, 1-propanol, 2-butanol, 2-propanol, 1-Isobutanol).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b3e091d elementor-widget elementor-widget-text-editor\" data-id=\"b3e091d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h2>2. Data set<\/h2><p>The first step is to prepare the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set\">data set<\/a>, which is the source of information for the classification problem.<\/p><p>For that, we need to configure the following concepts:<\/p><ul><li>Data source.<\/li><li>Variables.<\/li><li>Instances.<\/li><\/ul><p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#DataSource\">data source<\/a> is the file <a href=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/10\/QCMalcoholsensor.csv\">QCMalcoholsensor.csv<\/a>.\u00a0It contains the data for this example in comma-separated values (CSV) format.\u00a0The number of columns is 6, and the number of rows is 26.\u00a0The <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#Variables\">variables are:<\/a><\/p><ul><li><b>freq_1<\/b>: Measured frequency for concentration 1: Air ratio (ml): 0.799 Gas ratio(ml):0.201<\/li><li><b>freq_2<\/b>: Measured frequency for concentration 2: Air ratio (ml): 0.700 Gas ratio(ml):0.300<\/li><li><b>freq_3<\/b>: Measured frequency for concentration 3: Air ratio (ml): 0.600 Gas ratio(ml):0.400<\/li><li><b>freq_4<\/b>: Measured frequency for concentration 4: Air ratio (ml): 0.501 Gas ratio(ml):0.499<\/li><li><b>freq_5<\/b>: Measured frequency for concentration 5: Air ratio (ml): 0.400 Gas ratio(ml):0.600<\/li><li><b>class<\/b>: 1-Octanol, 1-Propanol, 2-Butanol, 2-Propanol, 1-Isobutanol used as the target.<\/li><\/ul><p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#InputVariables\">input variables<\/a> are the first five variables. The sensor processes each alcohol through five different concentrations.<\/p><p>Note that neural networks work with numbers. In this regard, we transform the categorical variable &#8220;class&#8221; into five numerical variables as follows:<\/p><ul><li>1-Octanol: 1 0 0 0 0.<\/li><li>1-Propanol: 0 1 0 0 0.<\/li><li>2-Butanol: 0 0 1 0 0.<\/li><li>2-Propanol: 0 0 0 1 0.<\/li><li>1-Isobutanol: 0 0 0 0 1.<\/li><\/ul><p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#Instances\">instances<\/a> are divided into training, selection, and testing subsets.\u00a0They represent 60% (15), 0% (0), and 20% (25) of the original instances, respectively, and are split at random. We can calculate the <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#Distributions\">distributions<\/a> of all variables. The next figure is the pie chart for the alcohol types.<\/p><p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/QCM-sensor-pie-chart.webp\" \/><\/p><p>As we can see, the target is well-distributed since there is the same number for the five different alcohol types.<\/p><p>Finally, the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#InputsTargetsCorrelations\">inputs-targets correlations<\/a> might indicate to us what factors most influence.<\/p><p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/QCM-sensor-correlation.webp\" \/><\/p><p>We observe a strong correlation among the variables.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d5decf8 elementor-widget elementor-widget-text-editor\" data-id=\"d5decf8\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h2>3. Neural network<\/h2><p>The second step is to choose a <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network\">neural network<\/a>. In classification problems, one typically composes:<\/p><ul><li>A scaling layer.<\/li><li>Two perceptron layers.<\/li><li>A probabilistic layer.<\/li><\/ul><p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#ScalingLayer\">scaling layer<\/a> contains the statistics on the inputs calculated from the data file and the method for scaling the input variables.<\/p><p>Here, we have set the minimum and maximum methods. Nevertheless, the mean and standard deviation method would produce very similar results. In our case, there is no <a href=\"https:\/\/www.neuraldesigner.com\/blog\/perceptron-the-main-component-of-neural-networks\/\">perceptron layer<\/a>. This is due to having little data, so we simplify the program.\u00a0The <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#ProbabilisticLayer\">probabilistic layer<\/a> allows the outputs to be interpreted as probabilities.\u00a0In this regard, all outputs are between 0 and 1, and their sum is 1.<\/p><p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#SoftmaxProbabilisticMethod\">softmax probabilistic method<\/a> is used here. The neural network has five outputs since the target variable contains 5 classes (1-Octanol, 1-propanol, 2-butanol, 2-propanol, 1-Isobutanol).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5ddab27 elementor-widget elementor-widget-text-editor\" data-id=\"5ddab27\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h2>4. Training strategy<\/h2><p>The fourth step is to establish the training strategy, which comprises:<\/p><ul><li>Loss index.<\/li><li>Optimization algorithm.<\/li><\/ul><p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#LossIndex\">loss index<\/a> chosen for this application is the\u00a0<a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#NormalizedSquaredError\">normalized squared error<\/a>\u00a0with <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#L2Regularization\">L2 regularization<\/a>. The <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#ErrorTerm\">error term<\/a> fits the neural network to the <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#TrainingInstances\">training instances<\/a> of the data set. The <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#RegularizationTerm\">regularization term<\/a> makes the model more stable and improves generalization.\u00a0The <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#OptimizationAlgorithm\">optimization algorithm<\/a> searches for the neural network parameters that minimize the loss index. The <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#QuasiNewtonMethod\">quasi-Newton method<\/a> is chosen here.<\/p><p>The following chart shows how training and selection errors decrease with the epochs during training.<\/p><p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/QCM-sensor-quasi-newton.webp\" \/><\/p><p>The final value is <b>training error = 0.109 NSE<\/b>, and the <b>selection error<\/b> doesn&#8217;t appear because we divided the instances into training and testing subsets.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a7fd9a3 elementor-widget elementor-widget-text-editor\" data-id=\"a7fd9a3\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h2>5. Model selection<\/h2><p>The objective of <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-selection\">model selection<\/a> is to find the network architecture with the best generalization properties, which minimizes the error on the <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#SelectionInstances\">selected instances<\/a> of the data set.<\/p><p><a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-selection#OrderSelection\">Order selection<\/a> algorithms train several network architectures with a different number of neurons\u00a0and select that with the smallest selection error.<\/p><p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-selection#IncrementalOrder\">incremental order<\/a> method starts with a few neurons and increases the complexity at each iteration.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b706f60 elementor-widget elementor-widget-text-editor\" data-id=\"b706f60\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h2>6. Testing analysis<\/h2><p>The purpose of the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/testing-analysis\">testing analysis<\/a> is to validate the generalization performance of the model.<\/p><p>Here, we compare the neural network outputs to the corresponding targets in the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#TestingInstances\">testing instances<\/a> of the data set.<\/p><p>In the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/testing-analysis#ConfusionMatrix\">confusion matrix<\/a>, the rows represent the targets (or real values), and the columns represent the corresponding outputs (or predictive values).<\/p><p>The diagonal cells show the correctly classified cases, and the off-diagonal cells show the misclassified cases.<\/p><table><tbody><tr><th>\u00a0<\/th><th>Predicted 1-Octanol<\/th><th>Predicted 1-Propanol<\/th><th>Predicted 2-Butanol<\/th><th>Predicted 2-Propanol<\/th><th>Predicted 1-Isobutanol<\/th><\/tr><tr><th>Real 1-Octanol<\/th><td style=\"text-align: right;\">1 (10.0%)<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><\/tr><tr><th>Real 1-Propanol<\/th><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">3 (30.0%)<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><\/tr><tr><th>Real 2-Butanol<\/th><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">3 (30.0%)<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><\/tr><tr><th>Real 2-Propanol<\/th><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">1 (10.0%)<\/td><td style=\"text-align: right;\">0<\/td><\/tr><tr><th>Real 1-Isobutanol<\/th><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">0<\/td><td style=\"text-align: right;\">2 (20.0%)<\/td><\/tr><\/tbody><\/table><p>As we can see, the number of instances the model can correctly predict is 10 (100%), so there are no misclassified cases.<\/p><p>This shows that our predictive model has excellent classification accuracy.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-385a6e1e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"385a6e1e\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3b227e61\" data-id=\"3b227e61\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-17c300f6 elementor-widget elementor-widget-text-editor\" data-id=\"17c300f6\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<section><\/section><section><\/section><section id=\"ApplicationType\"><\/section><section id=\"DataSet\"><\/section><section id=\"NeuralNetwork\"><\/section><section id=\"TrainingStrategy\"><\/section><section id=\"ModelSelection\"><\/section><section id=\"TestingAnalysis\"><p>\u00a0<\/p><\/section><section id=\"ModelDeployment\"><h2>7. Model deployment<\/h2><p>The neural network is now ready to predict outputs for inputs it has never seen.<\/p><p>This process is called <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-deployment\">model deployment<\/a>. To classify a given alcohol, we calculate the <a style=\"font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); background-color: #ffffff;\" href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-deployment#NeuralNetworkOutputs\">neural network outputs<\/a> from the frequencies corresponding to the different types of concentration.<\/p><p>For instance:<\/p><ul><li>Freq_1: -54.764 Hz.<\/li><li>Freq_2: -90.826 Hz.<\/li><li>Freq_3: -132.372 Hz.<\/li><li>Freq_4: -173.337 Hz.<\/li><li>Freq_5: -220.833 Hz.<\/li><li><b>Probability of 1-Octanol: 1.5 %.<\/b><\/li><li><b>Probability of 1-Propanol: 9.6 %.<\/b><\/li><li><b>Probability of 2-Butanol: 1.3 %.<\/b><\/li><li><b>Probability of 2-Propanol: 24.2 %.<\/b><\/li><li><b>Probability of 1-Isobutanol: 63.4 %.<\/b><\/li><\/ul><p>For this particular case, our e-nose developed would classify the alcohol as 1-Isobutanol since it has the highest probability.<\/p><p>Below, we list the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-deployment#MathematicalExpression\">mathematical expression<\/a> of the trained neural network.<\/p><pre>scaled_freq_1 = freq_1*(1+1)\/(1.175490007e-38-(-86.33999634))+86.33999634*(1+1)\/(1.175490007e-38+86.33999634)-1;\nscaled_freq_2 = freq_2*(1+1)\/(1.175490007e-38-(-129.7100067))+129.7100067*(1+1)\/(1.175490007e-38+129.7100067)-1;\nscaled_freq_3 = freq_3*(1+1)\/(1.175490007e-38-(-183.9400024))+183.9400024*(1+1)\/(1.175490007e-38+183.9400024)-1;\nscaled_freq_4 = freq_4*(1+1)\/(1.175490007e-38-(-231.0800018))+231.0800018*(1+1)\/(1.175490007e-38+231.0800018)-1;\nscaled_freq_5 = freq_5*(1+1)\/(1.175490007e-38-(-296.6799927))+296.6799927*(1+1)\/(1.175490007e-38+296.6799927)-1;\nprobabilistic_layer_combinations_0 = 3.41873 +2.6168*scaled_freq_1 +2.38179*scaled_freq_2 +2.38347*scaled_freq_3 +2.32046*scaled_freq_4 +2.43974*scaled_freq_5 \nprobabilistic_layer_combinations_1 = -2.23754 +3.38886*scaled_freq_1 -0.654598*scaled_freq_2 +1.7727*scaled_freq_3 -4.21105*scaled_freq_4 -3.60481*scaled_freq_5 \nprobabilistic_layer_combinations_2 = -7.19512 -0.314361*scaled_freq_1 -1.66506*scaled_freq_2 -6.35273*scaled_freq_3 -1.9822*scaled_freq_4 -1.74316*scaled_freq_5 \nprobabilistic_layer_combinations_3 = 1.93658 -2.57851*scaled_freq_1 -4.05779*scaled_freq_2 -2.48873*scaled_freq_3 +2.02679*scaled_freq_4 +6.56201*scaled_freq_5 \nprobabilistic_layer_combinations_4 = 4.05001 -3.09451*scaled_freq_1 +3.95852*scaled_freq_2 +4.65626*scaled_freq_3 +1.84598*scaled_freq_4 -3.60918*scaled_freq_5 \nsum_ = exp(probabilistic_layer_combinations_0 + exp(probabilistic_layer_combinations_1 + exp(probabilistic_layer_combinations_2 + exp(probabilistic_layer_combinations_3 + exp(probabilistic_layer_combinations_4;\n1-Octanol = exp(probabilistic_layer_combinations_0)\/sum_;\n1-Propanol = exp(probabilistic_layer_combinations_1)\/sum_;\n2-Butanol = exp(probabilistic_layer_combinations_2)\/sum_;\n2-Propanol = exp(probabilistic_layer_combinations_3)\/sum_;\n1-Isobutanol = exp(probabilistic_layer_combinations_4)\/sum_;\n<\/pre><p>We have developed an e-nose algorithm that can be implemented in sensors, like QCM sensors, to detect the corresponding type of alcohol.<\/p><\/section><section><h2>References<\/h2><ul><li>UCI Machine Learning Repository. <a href=\"https:\/\/archive.ics.uci.edu\/ml\/datasets\/Alcohol+QCM+Sensor+Dataset\">QCM12 Data Set<\/a>.<\/li><li>M. Fatih Adak, Peter Lieberzeit, Purim Jarujamrus, Nejat Yumusak, Classification of alcohols obtained by QCM sensors with different characteristics using ABC based neural network, Engineering Science and Technology, an International Journal, 2019, ISSN 2215-0986.<a href=\"https:\/\/www.sciencedirect.com\/science\/article\/pii\/S2215098619303337?via%3Dihub\" target=\"_blank\" rel=\"noopener\">Web Link<\/a>.<\/li><\/ul><\/section><section><h2>Related posts<\/h2><\/section>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"author":13,"featured_media":2720,"template":"","categories":[29],"tags":[40,43],"class_list":["post-3518","learning","type-learning","status-publish","has-post-thumbnail","hentry","category-examples","tag-chemistry","tag-industry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Develop an e-nose to detect alcohols using machine learning<\/title>\n<meta name=\"description\" content=\"Develop a e-nose that makes proper classifications for different alcohol types using QCM sensor data using machine learning.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"QCM alcohol sensor machine learning example\" \/>\n<meta property=\"og:description\" content=\"In this example, we develop a classification alcohol types method.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/\" \/>\n<meta property=\"og:site_name\" content=\"Neural Designer\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T11:06:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"QCM alcohol sensor machine learning example\" \/>\n<meta name=\"twitter:description\" content=\"In this example, we develop a classification alcohol types method.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp\" \/>\n<meta name=\"twitter:site\" content=\"@NeuralDesigner\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/\",\"url\":\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/\",\"name\":\"Develop an e-nose to detect alcohols using machine learning\",\"isPartOf\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp\",\"datePublished\":\"2025-08-15T09:12:58+00:00\",\"dateModified\":\"2026-02-26T11:06:44+00:00\",\"description\":\"Develop a e-nose that makes proper classifications for different alcohol types using QCM sensor data using machine learning.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#primaryimage\",\"url\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp\",\"contentUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp\",\"width\":1200,\"height\":628},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.neuraldesigner.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learning\",\"item\":\"https:\/\/www.neuraldesigner.com\/learning\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Develop an e-nose to detect alcohols using machine learning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#website\",\"url\":\"https:\/\/www.neuraldesigner.com\/\",\"name\":\"Neural Designer\",\"description\":\"Explanable AI Platform\",\"publisher\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.neuraldesigner.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#organization\",\"name\":\"Neural Designer\",\"url\":\"https:\/\/www.neuraldesigner.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png\",\"contentUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png\",\"width\":1024,\"height\":223,\"caption\":\"Neural Designer\"},\"image\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/NeuralDesigner\",\"https:\/\/es.linkedin.com\/showcase\/neuraldesigner\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Develop an e-nose to detect alcohols using machine learning","description":"Develop a e-nose that makes proper classifications for different alcohol types using QCM sensor data using machine learning.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/","og_locale":"en_US","og_type":"article","og_title":"QCM alcohol sensor machine learning example","og_description":"In this example, we develop a classification alcohol types method.","og_url":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/","og_site_name":"Neural Designer","article_modified_time":"2026-02-26T11:06:44+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_title":"QCM alcohol sensor machine learning example","twitter_description":"In this example, we develop a classification alcohol types method.","twitter_image":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp","twitter_site":"@NeuralDesigner","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/","url":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/","name":"Develop an e-nose to detect alcohols using machine learning","isPartOf":{"@id":"https:\/\/www.neuraldesigner.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#primaryimage"},"image":{"@id":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#primaryimage"},"thumbnailUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp","datePublished":"2025-08-15T09:12:58+00:00","dateModified":"2026-02-26T11:06:44+00:00","description":"Develop a e-nose that makes proper classifications for different alcohol types using QCM sensor data using machine learning.","breadcrumb":{"@id":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#primaryimage","url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp","contentUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/2-but.webp","width":1200,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/www.neuraldesigner.com\/learning\/examples\/qcm-alcohol-sensor\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.neuraldesigner.com\/"},{"@type":"ListItem","position":2,"name":"Learning","item":"https:\/\/www.neuraldesigner.com\/learning\/"},{"@type":"ListItem","position":3,"name":"Develop an e-nose to detect alcohols using machine learning"}]},{"@type":"WebSite","@id":"https:\/\/www.neuraldesigner.com\/#website","url":"https:\/\/www.neuraldesigner.com\/","name":"Neural Designer","description":"Explanable AI Platform","publisher":{"@id":"https:\/\/www.neuraldesigner.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.neuraldesigner.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.neuraldesigner.com\/#organization","name":"Neural Designer","url":"https:\/\/www.neuraldesigner.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png","contentUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png","width":1024,"height":223,"caption":"Neural Designer"},"image":{"@id":"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/NeuralDesigner","https:\/\/es.linkedin.com\/showcase\/neuraldesigner\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/learning\/3518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/learning"}],"about":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/types\/learning"}],"author":[{"embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/users\/13"}],"version-history":[{"count":16,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/learning\/3518\/revisions"}],"predecessor-version":[{"id":21973,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/learning\/3518\/revisions\/21973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/media\/2720"}],"wp:attachment":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/media?parent=3518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/categories?post=3518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/tags?post=3518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}