{'fraction_non_alphanumeric': 0.027298686464877212, 'fraction_numerical': 0.013021130782410052, 'mean_word_length': 4.849031396125585, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, '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}}
Use of Factor Analysis in Pattern Recognition

Pattern recognition deals with obtaining and processing certain data on objects in the real world aimed at characterizing their common properties and classifying them with respect to these properties into classes. This paper deals with a method of pattern recognition with respect to the basic position of images. Factor analysis is used for classification. Factor analysis is a special statistical method using the same features and pattern classes as in discriminant analysis. The m dimensional vector is an input parameter. The method can classify into n groups of patterns. Pattern recognition can work in real time.


Introduction
Tactile information is an integral constituent of pattern recognition systems used mainly in robotics and biomechanics, e.g. in the replacement of limbs. Its application is e.g. given in [1] and [2]. In [3] a [4] methods are described which use discriminant analysis and solution of the Helmholtz equation for pattern recognition of images. General procedures and methods of pattern recognition are in [5]. In this paper a method is described which uses factor analysis for the pattern recognition of images. The main target of factor analysis is to derive hypothetic quantities -factors -from a quantity of assessed or measured quantities. The practical process is based on an input data matrix which comprises features of images. Simple correlation coefficients can be calculated from this matrix and a correlation matrix set up from which a reduced correlation matrix can be assessed. From the reduced correlation matrix, a series of matrices of the factor scheme can be obtained by means of estimates. By rotation an appropriate factor scores matrix can be determined which characterizes the relation between the factors and the assessed objects. Factor analysis [6], [7], [8] is based on the fact that more variables are related to one another and are in strong correlation. In these variables a third quantity appears which is not measurable. These unmeasurable quantities are called factors. They are recognized as mathematical quantities derived from observation. Factors must be as simple as possible and must sufficiently accurately describe and explain the observations. Factors are unmeasurable quantities of influence which are discovered by analysis. However, they are abstract quantities standing in the background and must be somehow named. This paper describes the use of factor analysis in the analysis of tactile information in pattern recognition. The input is m features of the investigated object, the output will be p factors related in a certain way with the object, whilst it holds that m > p.

Tactile information processing
Pattern recognition deals with obtaining and processing certain data on objects in the real world aimed at characterizing their common properties and classifying them with respect to these properties into classes. This process is schematically shown in figure 1. The tactile image of an unknown object can be obtained with a tactile transducer. The block of the formal description creates a formal (mathematical) description of the tactile image. By an appropriate lay-out from these elementary descriptions we can obtain the image of the object. The image of an object is usually subject to a certain transformation which creates an appropriate representation of the object. The pattern enters a classifier on the output of which is the information about the class into which the object was classified.

Factor analysis
The practical use of factor analysis consists of a number of sequential steps shown in figure 2 [6].  The problem of factors is in the determination of the number and type of coordinates necessary for the representation of the correlation of m features. The method of principal components [7] was used for the calculation. The number of factors to be extracted depends on how many percent of the entire scattering should be explained. Factor score is the specific or estimated value of a certain pattern class with respect to a certain factor which can be calculated. Finally the factor score estimate matrix F. It has R columns (R is the number of pattern classes) and p rows (p is the number of factors). For each row of matrix F it holds that the sum of individual factor scores on a row is equal to 0 and the scattering is 1.

Pattern recognition
Pattern recognition was simulated by calculation. The program simulates the processing of primary tactile information. The concept is based on the idea that the input of the entire process is a discrete tactile transducer (tactile sensors can attain only two values: 0 or 1). Individual tactile sensors are located in a square net the dimension of which is 42 x 42 sensors. 8 basic shapes will be recognized (circles, rectangular triangles, equilateral triangles, isosceles triangles, pentagons, hexagons, squares, rectangles) which means that we are dealing with 8 image classes. 8 features were used which were transformed by factor analysis into 3 factors. A discriminant function with standards was used in the pattern recognition. Each class has three standards, i.e. the total number of standards is 24.

Features
The following features were selected for pattern recognition: rectangularity (feature 1), squarity (feature 2), circularity (feature 3), number of vertexes (feature 4), symmetry about axis x (feature 5), symmetry about axis y (feature 6) and incompatibility (features 7 and 8). Squarity is defined as the quotient of the tactile image area and of the described square area (in percent). Circularity and rectangularity are defined analogously. For features 5 and 6, i.e. symmetry about axis x and symmetry about axis y, +1 is substituted provided the image is symmetric about a selected axis and 0 if it is non-symmetric. Incompatibility is calculated by formula (1): (1) Where BOR is the length of the border and AR is the area of the image. BOR1 calculated according to Fig. 3 (feature 7) is substituted for BOR, or BOR2 by a second method according to Fig. 4 (feature 8). Figures 3 and 4 show two possible ways of computing the length of the tactile image border (BOR1 and BOR2) (thick contour). The length of one step is 1.  Pattern recognition proceeds in two phases. The first phase is learning performed only once at the beginning for the assessment of the classification class and then for the respective classification. During learning the selected image is classified by controlled assignment into a particular class. By learning we create a feature matrix with a 8x24 dimension (8 features for each of the 24 standards). For each standard known images are presented to the learning system which calculates individual features. By their averaging one column is created in the feature matrix. After the start of the pattern recognition phase, reduction of data proceeds by factor analysis, i.e. a factor score matrix with a 3x24 dimension (3 factors each with 24 standards) is obtained from the feature matrix with an 8x24 dimension. Subsequently the system is able to recognize individual images. Pattern recognizing itself proceeds as follows: an 8 feature vector is calculated for an unknown image and subsequently transformed by factor analysis into a 3 factor vector. The classifier then classifies the tactile image in that class the standard of which has the lowest Euclidean distance from the pattern of the unknown image.

Results
Classification proceeds on the basis of factors, however all factors are not equally significant for classification. This is why weight coefficients COR[i], where i=1, 2, 3 are assigned to individual factors. This means that the most significant factor is that which was extracted first since it contains most information. The learning file contained altogether 644 images. The rectangles were calculated for length/width ratios 1:2 and 1:4. After learning assignment proceeded of unknown images. The classifier was successful for: circles (100%), rectangular triangles (94.6%), equilateral triangles (41.6%), isosceles triangles (92.7%), pentagons (99.1%), hexagons (98.2%), squares and rectangles (100%). The average probability was around 90.7%.

Conclusion
The paper deals with the pattern recognition of tactile images by applying factor analysis. In order to be able to compare the obtained results with previously used methods 8 identical pattern classes and 8 identical features were selected which in this case were transformed into 3 factors. Very similar results were obtained compared with discriminant analysis for the basic location of images. Classification was successful in the range from 41.6% to 100%. The average probability of correct classification was 90.7%.