# Music Therapy Methods Based on SVM and MLP

Authors: Hongmin Zou
Journal: Journal of Mathematics
 (2022)

---

## Abstract

Lately, the music therapy is being used widely around the world. Henceforth, this study focuses on the analysis of the music’s effect on fetal heart rate (FHR) curve. To this end, we treated people with music therapy and carried out the experiment. Firstly, 118 people with 32–40 weeks of gestational age who were expecting to give birth were invited to participate in the experiment. There was one control group and three experimental groups: 27 people were in the control group, 32 people were in the experimental group that listened to music for the first 10 minutes and did not listen to music for the second 10 minutes, 29 people were in the experimental group that did not listen to music for the first 10 minutes and listened to music for the second 10 minutes, and 30 people were in the experimental group that listened to music for all 20 minutes. In this paper, a convolutional neural network (CNN) based data processing model for fetal heart rate curves is proposed to improve the accuracy of fetal status assessment. First, the model method divides the high-dimensional one-dimensional fetal heart rate (FHR) records into 10 segments and then the characteristics of the FHR are extracted using a feature extraction method based on basic statistics. These features are regarded as input of support vector machine (SVM) and multilayer perceptron (MLP) for classification. According to the experimental results, the classification accuracies of SVM and MLP are 85.98% and 93.24%, respectively.


---

## Body

## 1. Introduction

At present, fetal monitoring mainly focuses on counting, fetal heart auscultation, and amniotic fluid pattern observation, but these methods have some limitations because the extracted information is very complex. However, since the 1960s, the large-scale development of electronic systems has made the extraction of fetal information feasible and reliable [1–3].At present, a method called EMF is used [4, 5], which can monitor fetal information in real time and continuously and is also the most widely used method at present. With the development of artificial intelligence and the emergence of a large number of intelligent algorithms such as deep learning, we can monitor the fetus more accurately [6, 7].Along with the study and analysis of fetal heart rate curves, numerous people have gone on to study what kind of treatments affect the data related to the characteristics of fetal heart rate curves, and music therapy is one of these tools. The discipline of music therapy was introduced to China as an emerging discipline in the late intersectional era. Although the development of music therapy in China is still in its infancy, concerned medical practitioners and researchers have been pushing its development. The cross-cutting discipline was born in the United States in 1940 as a combination of music, medicine, and psychology. It was introduced to China in the late 1980s. Although the development of music therapy in China is still in its infancy, relevant medical practitioners and researchers have been promoting its development. Numerous related literature has seen the use of music therapy for psychotherapy, presurgical anxiety, postsurgical pain management and maternity treatment, and even cancer treatment. Music therapy is a form of treatment that employs the relevant properties of music to transform the patient’s mind and body during the treatment process [8, 9], which is shown in Figure 1.Figure 1
The relevant properties of music and treatment process.In this paper, the analysis of the music’s effect on the FHR curve is carried out. In order to conceive the required target, we treated people with music therapy by some experiments. Section2 of this paper debates on the topic of music therapy which is based on neural network. The MLP and SVM are also discussed in Section 2. Furthermore, the experimental subjects and methods are discussed in Section 3. And finally, the conclusion is given in Section 4.


## 2. Neural Network-Based Music Therapy

In this paper, we use a multilayer perceptron and a support vector machine to classify the features of the data, which are extracted by a statistical-based approach. These two methods are mainly used to compare the experimental results with CNNs without feature extraction. The basic concepts of multilayer perceptron and support vector machine are introduced below.


### 2.1. Multilayer Perceptron

The neural networks are the ability to find dependencies between different inputs. The criteria for classification of fetal heart rate curves are fixed, while physicians consider a combination of features and ratios during fetal heart rate assessment. Therefore, in order to monitor the fetus more accurately, we need to classify the extracted data, determine its weight relationship, and then train the extracted data. In the neural network, in order to improve the accuracy of the neural network, we can appropriately increase the training of the neural network, so that we cannot add too many parameters to maintain the training model. However, the disadvantage of this network is to select different parameters for different models.This paper is a multilayer perceptron-based multiclassification algorithm, which is also often referred to as a feed-forward neural network. The multilayer perceptron has one or more implicit layers between the input and output layers, where each layer contains multiple neurons interconnected with each other by weights, which is shown in Figure2.Figure 2
Multilayer perceptron neural network.For parameter initialization, a random initialization strategy is used in this paper. This method can easily avoid the dilemma of local minima. The activation function of this paper is ReLU (Rectified Liner Units), which can well solve the gradient calculation problem brought by the sigmoid activation function and can avoid the gradient disappearance problem now. The multilayer perceptron in this paper is trained using back propagation. In this paper, we use stochastic gradient descent for training and back propagation for gradient computation. The cost function used in the multilayer perceptron is the cross-entropy cost function. When the error is bigger, the gradients are greater, and the parameter W is altered faster, resulting in a faster training speed. As a result, the cross-entropy cost function’s training impact is generally superior to the quadratic function’s training effect.Algorithm1 is the basic step used by the multilayer perceptron for classification.Algorithm 1:MLP classifier.
Input: training setOutput: accuracy(1)
Network initialization: randomly initialize all connection rights and thresholds in the network in the range (0, 1), given the learning rate and excitation function.(2)
repeat(3)
for all (x, y) do(4)
First calculate the output of the hidden layer based on the weights and thresholds and calculate the output of the current sample;(5)
Based on the output of the implicit layer from the previous step, the connection weights and thresholds are performed to calculate the predicted output of the BP, and the gradient term of the neurons in the output layer is calculated;(6)
Calculate the network prediction error based on the network prediction output and the desired output; calculate the gradient term of the hidden layer neurons;(7)
Update connection weights based on network prediction errors; update connection weights with threshold values;(8)
end for(9)
until the stop condition is reached;(10)
Calculation accuracy (Softmax);


### 2.2. Support Vector Machines

Support vector machine (SVM) refers to a series of machine learning algorithms originally developed in the early 1990s by Vapnik and colleagues at AT&T. The basis of this class is essentially the Support Vector Algorithm, which is an extension of the Generalized Portrait algorithm, which was developed by Vapnik in the Soviet Union in 1963. In short, SVM classifiers are binary or discriminative models that distinguish between two types of data and thus classify them. The most basic idea in learning classification is to divide the plane, which in this paper is to find a division hyperplane in the data representation space corresponding to the fetal heart rate dataset. In this paper, we use SVC (Support Vector Classification), which is a nonlinear kernel called Radial Basis Function (RBF). If the original space is finite dimensional, i.e., has a finite number of attributes, then there must exist a high-dimensional feature space to make the samples separable. Therefore, the method is applicable to the fetal heart rate dataset.In the experiment, some of the obtained characteristics are fed into MLP and SVC, and the classification performance is calculated from the following:(1)accuracy=predictionactual×100%.


### 2.3. Classification Results Based on MLP and SVC

First, in our experiments, we utilize the MLP algorithm. The classification accuracy is significantly improved with the number of hidden layers from 1 to 200, and the instruction instance and testing time are as well significantly increased. Furthermore, the classification accuracy is not significantly improved with more than 200 hidden layers. We adjusted the hidden layers to 150 layers to maximize efficiency and ensure accuracy, taking into consideration the training and testing duration. Iteration is the procedure of repeating of every experimental step. The numeral of iterations for the experimental guidance was 200, and increasing the quantity of iterations had little effect on the classification accuracy. Identity, logistic, tanh, and ReLU are some of the perception employed in the trials. The results of ReLU are better. Given the huge exploratory data set, the weight optimization technique used in this paper is Kingma Diederik’s gradient descent optimization technique, which is more accurate than quasi-optimization methodologies in the quasi-Newton algorithm family. The training data is initially set to 0.0001. Figure3 depicts the experimental results. When the training dataset is too short, the consistency decreases. As the size of the training data set increases, the accuracy rate slowly increases and stabilizes.Figure 3
Relationship between dataset size and MLP classification accuracy.In the SVC algorithm, we classify the data extracted from the fetus. The function of parameterC is to regularize the parameters. If the parameter C becomes larger, it means that the final variable is close to 0, which means that the result error will be larger and larger. If the parameter C becomes smaller, it means that the error prone of the system is better, as shown in Figure 4. According to the training results, we can know that SVC algorithm has better accuracy. In this experiment, we found that when C = 1, the experimental effect is the best.Figure 4
Relationship between dataset size and SVC classification accuracy.


## 2.1. Multilayer Perceptron

The neural networks are the ability to find dependencies between different inputs. The criteria for classification of fetal heart rate curves are fixed, while physicians consider a combination of features and ratios during fetal heart rate assessment. Therefore, in order to monitor the fetus more accurately, we need to classify the extracted data, determine its weight relationship, and then train the extracted data. In the neural network, in order to improve the accuracy of the neural network, we can appropriately increase the training of the neural network, so that we cannot add too many parameters to maintain the training model. However, the disadvantage of this network is to select different parameters for different models.This paper is a multilayer perceptron-based multiclassification algorithm, which is also often referred to as a feed-forward neural network. The multilayer perceptron has one or more implicit layers between the input and output layers, where each layer contains multiple neurons interconnected with each other by weights, which is shown in Figure2.Figure 2
Multilayer perceptron neural network.For parameter initialization, a random initialization strategy is used in this paper. This method can easily avoid the dilemma of local minima. The activation function of this paper is ReLU (Rectified Liner Units), which can well solve the gradient calculation problem brought by the sigmoid activation function and can avoid the gradient disappearance problem now. The multilayer perceptron in this paper is trained using back propagation. In this paper, we use stochastic gradient descent for training and back propagation for gradient computation. The cost function used in the multilayer perceptron is the cross-entropy cost function. When the error is bigger, the gradients are greater, and the parameter W is altered faster, resulting in a faster training speed. As a result, the cross-entropy cost function’s training impact is generally superior to the quadratic function’s training effect.Algorithm1 is the basic step used by the multilayer perceptron for classification.Algorithm 1:MLP classifier.
Input: training setOutput: accuracy(1)
Network initialization: randomly initialize all connection rights and thresholds in the network in the range (0, 1), given the learning rate and excitation function.(2)
repeat(3)
for all (x, y) do(4)
First calculate the output of the hidden layer based on the weights and thresholds and calculate the output of the current sample;(5)
Based on the output of the implicit layer from the previous step, the connection weights and thresholds are performed to calculate the predicted output of the BP, and the gradient term of the neurons in the output layer is calculated;(6)
Calculate the network prediction error based on the network prediction output and the desired output; calculate the gradient term of the hidden layer neurons;(7)
Update connection weights based on network prediction errors; update connection weights with threshold values;(8)
end for(9)
until the stop condition is reached;(10)
Calculation accuracy (Softmax);


## 2.2. Support Vector Machines

Support vector machine (SVM) refers to a series of machine learning algorithms originally developed in the early 1990s by Vapnik and colleagues at AT&T. The basis of this class is essentially the Support Vector Algorithm, which is an extension of the Generalized Portrait algorithm, which was developed by Vapnik in the Soviet Union in 1963. In short, SVM classifiers are binary or discriminative models that distinguish between two types of data and thus classify them. The most basic idea in learning classification is to divide the plane, which in this paper is to find a division hyperplane in the data representation space corresponding to the fetal heart rate dataset. In this paper, we use SVC (Support Vector Classification), which is a nonlinear kernel called Radial Basis Function (RBF). If the original space is finite dimensional, i.e., has a finite number of attributes, then there must exist a high-dimensional feature space to make the samples separable. Therefore, the method is applicable to the fetal heart rate dataset.In the experiment, some of the obtained characteristics are fed into MLP and SVC, and the classification performance is calculated from the following:(1)accuracy=predictionactual×100%.


## 2.3. Classification Results Based on MLP and SVC

First, in our experiments, we utilize the MLP algorithm. The classification accuracy is significantly improved with the number of hidden layers from 1 to 200, and the instruction instance and testing time are as well significantly increased. Furthermore, the classification accuracy is not significantly improved with more than 200 hidden layers. We adjusted the hidden layers to 150 layers to maximize efficiency and ensure accuracy, taking into consideration the training and testing duration. Iteration is the procedure of repeating of every experimental step. The numeral of iterations for the experimental guidance was 200, and increasing the quantity of iterations had little effect on the classification accuracy. Identity, logistic, tanh, and ReLU are some of the perception employed in the trials. The results of ReLU are better. Given the huge exploratory data set, the weight optimization technique used in this paper is Kingma Diederik’s gradient descent optimization technique, which is more accurate than quasi-optimization methodologies in the quasi-Newton algorithm family. The training data is initially set to 0.0001. Figure3 depicts the experimental results. When the training dataset is too short, the consistency decreases. As the size of the training data set increases, the accuracy rate slowly increases and stabilizes.Figure 3
Relationship between dataset size and MLP classification accuracy.In the SVC algorithm, we classify the data extracted from the fetus. The function of parameterC is to regularize the parameters. If the parameter C becomes larger, it means that the final variable is close to 0, which means that the result error will be larger and larger. If the parameter C becomes smaller, it means that the error prone of the system is better, as shown in Figure 4. According to the training results, we can know that SVC algorithm has better accuracy. In this experiment, we found that when C = 1, the experimental effect is the best.Figure 4
Relationship between dataset size and SVC classification accuracy.


## 3. Experimental Subjects and Methods

In this section, the experiments are carried out to validate the proposed methods. In this regard, we first proceed with the general information and then experimental methods are described.


### 3.1. General Information

One hundred and eighteen people at 32–40 weeks who were on birth control from December 01, 2016, to January 31, 2017, were selected. The participating pregnant volunteers were divided into the following four groups, i.e., three experimental groups and a control group:(i)
Normal group: 27 people were in the normal group (no music therapy)(ii)
Experimental group 1: people listened to music for the first ten minutes and not for the second ten minutes (n = 32).(iii)
Experimental group 2: people who did not listen to music for the first ten minutes and listened to music for the second ten minutes (n = 29)(iv)
Experimental group 3: people who received music therapy for all twenty minutes (n = 30)In this paper, the data of the four groups were analyzed by ANOVA between groups, and the differences were not statistically significant (P>0.05) for the demographic attributes of the four groups of people. The details are shown in Table 1.Table 1
Methodological analysis of the attributes of the four groups of people.
IndexNormal groupExperimental group 1Experimental group 2Experimental group 3FPNumber of people27322930Age (years)30.2229.6329.4830.030.1820.909Gestational week (weeks)35.6335.9435.5935.470.3060.821


### 3.2. Experimental Method

The pregnant volunteers came to the laboratory 2 hours after lunch and lay flat on the bed in a quiet room under the guidance of the relevant staff. After resting for half an hour, the experiment was started simultaneously on four groups of people. At the beginning of the experiment, accelerations and decelerations, baseline fetal heart rate, amplitude variation, cycle variation, fetal movement, and contractions were observed and recorded for 20 minutes without music. After measurement and recording in a quiet environment, this paper provides music therapy to the experimental group on the basis of conventional care. According to the literature of music therapy, the metronome was selected as bass tune and slow rhythm with more than 60 and less than 80 beats, and the soft music with certain relaxation effect, the experimental music in this paper was mainly fetal music, and other soft music was supplemented. And the people in the normal group had the same experimental environment as the experimental group except that there was no music therapy. After one consecutive week, the characteristic indexes of fetal heart rate curve, such as acceleration, deceleration, fetal heart baseline, amplitude variation, cycle variation, fetal movement, and contraction, were measured in the experimenter.Therefore, we evaluate different algorithms in different networks. In particular, the aggregation layer in this study is at the tSNE position of the last two layers (conv4 3 and conv5 3), and the last convolution layer (fc7) integrates all the features of image conv and fc, as shown in Figure5. For each scenario, the suggested aggregating layer is trained before the block of layers. Thus, for conv4, the loss is indicated by conv4 1, and for fc7, the loss is indicated by fc7. The outcome is denoted in Figure 5 which clearly verifies that aggregating the last evolutionary layer (conv5 3) produces the best performance. The performance of fc6 characteristics is similar to that of fc7.Figure 5
Subsampled conv and fc features from a collection of data are embedded in tSNE: (a) conv5 3 and (b) fc7.
(a)(b)There are only two reasons for this. One is that we add pooling in the full connection layer, but this method will compress the extracted information prematurely and affect the accuracy. Second, in the characteristic information of fc7, we compared the characteristic values from different information and added the comparison values. Although these characteristic values are very similar (Figure5(b)), since we added conv5 in the later stage, the signal capture ability of the network is increased, and the captured information is more complex (Figure 5(a)), as shown in Section 3.1.As can be seen from Table2, under different algorithm conditions, the later fusion algorithm has the highest accuracy.Table 2
Reliability of various hybrid models in various algorithms.
Basic factsCorrectMissEarly fusion0.85430.75220.8568Intermediate fusion0.87520.73580.8812Late fusion0.93310.83240.8879


## 3.1. General Information

One hundred and eighteen people at 32–40 weeks who were on birth control from December 01, 2016, to January 31, 2017, were selected. The participating pregnant volunteers were divided into the following four groups, i.e., three experimental groups and a control group:(i)
Normal group: 27 people were in the normal group (no music therapy)(ii)
Experimental group 1: people listened to music for the first ten minutes and not for the second ten minutes (n = 32).(iii)
Experimental group 2: people who did not listen to music for the first ten minutes and listened to music for the second ten minutes (n = 29)(iv)
Experimental group 3: people who received music therapy for all twenty minutes (n = 30)In this paper, the data of the four groups were analyzed by ANOVA between groups, and the differences were not statistically significant (P>0.05) for the demographic attributes of the four groups of people. The details are shown in Table 1.Table 1
Methodological analysis of the attributes of the four groups of people.
IndexNormal groupExperimental group 1Experimental group 2Experimental group 3FPNumber of people27322930Age (years)30.2229.6329.4830.030.1820.909Gestational week (weeks)35.6335.9435.5935.470.3060.821


## 3.2. Experimental Method

The pregnant volunteers came to the laboratory 2 hours after lunch and lay flat on the bed in a quiet room under the guidance of the relevant staff. After resting for half an hour, the experiment was started simultaneously on four groups of people. At the beginning of the experiment, accelerations and decelerations, baseline fetal heart rate, amplitude variation, cycle variation, fetal movement, and contractions were observed and recorded for 20 minutes without music. After measurement and recording in a quiet environment, this paper provides music therapy to the experimental group on the basis of conventional care. According to the literature of music therapy, the metronome was selected as bass tune and slow rhythm with more than 60 and less than 80 beats, and the soft music with certain relaxation effect, the experimental music in this paper was mainly fetal music, and other soft music was supplemented. And the people in the normal group had the same experimental environment as the experimental group except that there was no music therapy. After one consecutive week, the characteristic indexes of fetal heart rate curve, such as acceleration, deceleration, fetal heart baseline, amplitude variation, cycle variation, fetal movement, and contraction, were measured in the experimenter.Therefore, we evaluate different algorithms in different networks. In particular, the aggregation layer in this study is at the tSNE position of the last two layers (conv4 3 and conv5 3), and the last convolution layer (fc7) integrates all the features of image conv and fc, as shown in Figure5. For each scenario, the suggested aggregating layer is trained before the block of layers. Thus, for conv4, the loss is indicated by conv4 1, and for fc7, the loss is indicated by fc7. The outcome is denoted in Figure 5 which clearly verifies that aggregating the last evolutionary layer (conv5 3) produces the best performance. The performance of fc6 characteristics is similar to that of fc7.Figure 5
Subsampled conv and fc features from a collection of data are embedded in tSNE: (a) conv5 3 and (b) fc7.
(a)(b)There are only two reasons for this. One is that we add pooling in the full connection layer, but this method will compress the extracted information prematurely and affect the accuracy. Second, in the characteristic information of fc7, we compared the characteristic values from different information and added the comparison values. Although these characteristic values are very similar (Figure5(b)), since we added conv5 in the later stage, the signal capture ability of the network is increased, and the captured information is more complex (Figure 5(a)), as shown in Section 3.1.As can be seen from Table2, under different algorithm conditions, the later fusion algorithm has the highest accuracy.Table 2
Reliability of various hybrid models in various algorithms.
Basic factsCorrectMissEarly fusion0.85430.75220.8568Intermediate fusion0.87520.73580.8812Late fusion0.93310.83240.8879


## 4. Conclusions

In this paper, a convolutional neural network-based data processing model for fetal heart rate curves is proposed to enhance fetal condition meeting the criteria. First, the model separates the high-dimensional one-dimensional FHR recordings into 10 sections and then extracts the FHR characteristics using a feature extraction technique related to basic statistics. These characteristics are then fed into support vector machine (SVM) and multilayer perceptron (MLP) classification algorithms. According to the experimental results, the classification accuracies of SVM and MLP are 85.98% and 93.24%, respectively.



---

*Source: 3377809-2022-03-27.xml*