{'fraction_non_alphanumeric': 0.02866869736606343, 'fraction_numerical': 0.01953055008063071, 'mean_word_length': 4.68960244648318, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An implementation of Elman neural network for polycystic ovary classification based on ultrasound images

Polycystic Ovary Syndrome (PCOS) is a reproduction problem that causes irregular menstruation period. Insulin and androgen hormone have big roles for this problem. This syndrome should be detected shortly, since it is able to cause a more serious disease, such as cardiovascular, diabetes, and obesity. The detection of this syndrome is done by analyzing ovary morphology and hormone test. However, the more economical way of test is by identifying the ovary morphology using ultrasonography. To classify whether one ovary is normal or it has polycystic ovary (PCO) follicle, the analysis will be done manually by a gynecologist. This paper will design a system to detect PCO using Gabor Wavelet method for feature extraction and Elman Neural Network is used to classify PCO and non-PCO. Elman Neural Network is chosen because it contains context layer to recall the previous condition. This paper compared the accuracy and process time of each dataset, then also did testing on elman’s parameters, such as layer delay, hidden layer, and training function. Based on tests done in this paper, the most accurate number is 78.1% with 32 features.


Introduction
Polycystic Ovary Syndrome (PCOS) is a reproduction problem that causes irregular menstruation cycle of woman in her reproductive age [1]. The main cause of PCOS is still uncertain. However, the resistance of insulin and androgen has roles for this problem [2]. A patient can be declared of having PCOS if she acquires two of three diagnostic criteria established in Rotterdam Conference: (1) Oligo/an ovulation, (2) clinical or biochemical symptoms from having too much androgen, (3) ovary with polycystic cyst [3]. From morphological point of view, an ovary is assumed as polycystic ovary if there are, at least, 12 follicles with 2-9 mm of diameter, or there is an increase of ovary volume that exceeded 10 cm 3 .
PCOS is not only causing irregular menstruation cycle, but, it is also causing a sterile (unable to have child) in woman, cardiovascular disease, diabetes, and obesity [2]. To be able to detect whether a woman is having PCOS or not, there are two kinds of tests; hormonal test and ovary morphological test. However, from economical point of view, the cost of ovary morphology is cheaper because it uses ultrasonography equipment. Later, the ultrasound image will be analyzed by gynecologist. The analysis of ultrasound image is done manually by gynecologist. It takes time, for sure. Figure 1 is an ultrasound image that has been classified into polycystic If there are numbers of images, and the result must be handed to the patient soon, it will influence the thoroughness and accuracy of the gynecologist in analyzing the images. For that reason, a system has been built to help the detection of PCO by using Gabor Wavelet method for feature extraction and Elman Neural Network for classification.

Related Works
In this paper [4] Setiawati et al. used Particle Swarm Optimization to cluster ultrasound image. This paper proposed a non-parametric fitness function to improve the convergence solution of PSO clustering. Using contrast enchancement was expected to increase the extracted follicles size as close as prossible as the real follicles size. This paper also suggested to use machine learning approach to classify the follicle. Meanwhile Purnama et al. [5] proposed preprocessing, segmentation, feature extraction, and classification as his detection polycystic method. He used gabor wavelet as the segmentation method and three machine learning approaches: Neural Network-Learning Vector Quantization (LVQ), KNN -Euclidean distance, and Support Vector machine (SVM) -RBF Kernel. The best accuracy gained from SVM-RBF Kernel on C was 40.
Wisesty et al. stated [6] there were two approaches to detect PCO follicles: 1) streteolgy, and 2) feature extraction and classification. Wisesty himself used the second approach. He then used gabor wavelet as the extraction method and modified backpropagation as the classification method. His modified backpropagation were called Lavenberg-Marquadt optimization and COnjugate Gradient-Fletcher Reeves, which is able to improve the convergance rate.The best accuration reached using Levenberg-Marquardt was 93.925%, which was gained from 33 neurons and 16 vector features.

Proposed Scheme
Data used in this paper is an ultrasound image (Example: Figure 1) that come from Permata Bunda Syariah Maternity Clinic Cirebon. This data is already validated by a gynecologist. Based on the Figure 2 ultrasound image data will go through several processes:

Preprocessing
In this preprocessing stage there are several stages such as grayscalling, histogram equalization, image binarization, morphology, invert image, and data cleaning. Grayscalling is aimed to change the images color from RGB to gray. Histogram equalization is to evenly distribute the number of pixels that is owned by every degree of grayish color in ultrasound image. Image binarization is a process to change the color of image to be only two colors, 0 for black, and 1 for white. In preprocessing phase, there is also process of morphology; erosion and dilation. Erosion is a process to reduce objects color in the image, so noise in that image is decreased. Dilation is process to improve objects color in the image. Invert image is process to flip the color of image; from black to white, and vice versa. It is important because white object is easier to detect. And the final process of preprocessing is data cleaning. Data cleaning is aimed to omit unimportant object.

Segmentation
Segmentation is a phase to separate object from background. This phase has two processes, they are: edge detection and, follicle cutting. Edge detection is used to recognize object in the image. This paper uses canny operator for edge detection. After follicle in the ultrasound image is detected, next, it is labeled and cut into some different images and shows each follicle.

Feature extraction
Feature extraction is a process to take information from an object in the image to be recognized and differentiated from other object. This paper uses Gabor Wavelet method. Result of Gabor wavelet method is feature vector of each follicle. Figure 5 shows the block diagram of the feature extraction process.

Classification
Elman Neural Network was invented by Jeff Elman. Elman Neural Networks is built using a feedforward network architecture and adds connections to the previous layer (extra nodes). This extra node contains a representation of the contents of one layer that existed when the pattern was previously trained [7]. This extra set is called a network context unit. Figure 4 is the architecture of Elman Neural Network, while Figure 5 is a process flow. The learning process is following [8]: (1) the context unit is set to 0; t = 1; (2) pattern x t clamped, the forward calculations are performed once; (3) the backpropagation learning rule is applied; (4) t ← t + 1; go to 2; The context unit in step t thus always has the hidden unit activation value in step t-1.

Accuracy and elman neural network process duration
In this paper, extraction results of Gabor Wavelet used are 16, 24, and 32 feature. This feature are classified using Elman Neural Network. There are 3 different parameters that are tested in that feature set. The parameters are layer delays, hidden sizes, and training function. Figure 6 shows that accuracy of Set data 16 feature is 68.8%, accuracy of Set data 24 feature is 66.7% and accuracy of 78.1% for set data with 32 features.  Figure 7 shows a comparison of process duration of Elman Neural Network for feature in data 16, 24 and 32. The longest duration is data 32. It is because numbers of data processed are more than the others data set.

Parameter layer delay test
This test is aimed to analyze the influence of parameter layer delay parameter to data accuracy that is trained and tested by Elman Neural 1:2, 1:3, 1:4, 1:5. The following graph shows that accuracy from every layer delay variation in the data with 16, 24 and 32 features. There are four layer delay variations, they are 1:2, 1:3, 1:4, 1:5. The following graph shows that accuracy in every layer delay variation in the data with 16, 24, and 32 features. Figure 8 shows that the  biggest accuracy of layer delay 1:2 is 78.125% for 32 data features. In delay of 1:3, the biggest accuracy is 75% for 32 data features. But, for layer delay 1:5, the highest accuracy is 56.25% for 16 and 32 data features. From the result, layer delay variation has influence level of data accuracy using Elman Neural Network.

Parameter hidden layer test
This test aims to analyze the effect of hidden layer parameters on the accuracy of the data being trained and tested with Elman Neural Network. There are 5 variations of hidden layer parameters that are 10, 15, 20, 25, 30. The graph below shows the accuracy of each variation of the hidden layer on the data of 16 characteristics, 24 characteristics, and 32 features. The number of hidden layers gives little change to the accuracy of each data. For the highest hidden layer 10 accuracy of 78.125%, the greatest accuracy with 15 hidden layers is 78.125%, for 20 and 25 the largest hidden layer accuracy is 75% and for 30 hidden layers is 78.125%. All of the greatest accuracy is for data with 32 features. From the results of this test is known that the number of hidden layers affect the accuracy of the Elman Neural Network.

Test of training function parameter
This test is aimed to analyze the influence of training function parameter to data accuracy that are trained and tested using Elman Neural Network. There are 2 training function, Lavenberg Marquardt and BFGS quasi-Newton. Figure 10 shows that accuracy from every hidden layer variation, and layer delay in data with 16, 24, and 32 features to training function type, have the same accuracy.  Table 1 shows the result classification from ovaries USG using Elman Neural Network and compared with Support Vector Machines. Based on table 1 shows that best classification is using SVM Polynomial with accuration is 100% and process time is 0.2 second for data with 16 features. For Support Vector Machine processing time required is much shorter than Elman Network. The SVM Process takes time in range 0 to 1 second, while Elman Neural Network process time reaches 18 second. This happens because on Elman Neural Network had hidden layers and layers delay.

Conclusion
Elman Neural Network can be used to classify ovary problem. The best accuration (78.1%) using Elman Neural Network when using data 32 features. Using more data for training, the accuration increase proportionaly. But more data for training will affect the time process. For data set with 32 feature the process duration is 18.6 second. The number of hidden layers gives little change to the accuracy of each data set. The training function do not give any effect on accuracy. Nevertheless, SVM has a better performance than Elman for PCO classification based on feature which is obtained by Gabor Wavelet.