American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 05, June, 2022 279 | P a g e ALGORITHM FOR CLASSIFYING DOCUMENTS OF A SCIENTIFIC AND EDUCATIONAL ORGANIZATION USING MACHINE LEARNING METHODS Zebiniso Abdulxamidovna Abduvalieva Tashkent University of Information Technologies named after Muhammad al- Khwarizmi, Graduate Student zebiniso_777@mail.ru Annotation Intelligent analysis is used in almost all areas of technology. Machine learning does not stand still and is constantly evolving. Given the transition in modern society to electronic document management, the main assumption in them is that the training and test data must be in the same feature space and follow the same distribution. In real applications, this is not always the case. In this case, the role of transfer learning can be distinguished since transfer learning does not make the same distributional assumptions as traditional machine learning and reduces dependencies on the target task and training data, and has a wider knowledge migration. The article proposes a transfer learning algorithm for document categorization based on clustering. An experiment is also used to test the algorithm. The experiment shows that the algorithm proposed in this article has its advantages. Keywords: transfer learning, machine learning; classification of documents; ; data mining, based spatial clustering Introduction Most machine learning and data mining algorithms usually assume that the training and test data have the same feature space and data distribution, but in a real application, these two factors often change, so the trained model becomes outdated very easily.When the existing training data is outdated and there is very little new data, or labeling the new data is expensive, you might consider using the existing training data but a different distribution with test data to help the new data learn what transfer learning is. Cluster analysis comes from many areas of research, including data mining, statistics, biology, and machine learning. The main clustering methods include partitioning methods, hierarchical methods, density-based methods, grid-based methods, and model-based methods. In the algorithm considered and used below, D is a set (collection) of text documents of the department, W is a set (dictionary) of all words used in them, C is a set of document categories fixed in advance. Each document d ∈ D is a sequence of words слов (w1, . . . , wnd )𝑤1,… ,𝑤𝑑 from dictionary 𝑊, where d is the length of the document American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 05, June, 2022 280 | P a g e in words. The same word can be repeated many times in a document. The categorization problem is the problem of assigning a boolean value to each pair {𝑑, 𝑐} ∈ 𝐷 ∗ 𝐶.. Boolean value 1 means document d belongs to category c, while a value of 0 means the opposite. More formally, the categorization problem is the problem of recovering an unknown objective function Φ: 𝐷 ∗ 𝐶 → {1,0}. In many document categories, the training data set from the source field is always out of date, but if some existing stale data is similar to the test data in the target field, then we might consider using clustering technology to find them to help train targets and goals. In this article, the density-based spatial clustering (DSP) algorithm is applied to classify documents in higher education institutions. In this case, the documentation of the Department of "System and Software" at the Institute of Tashkent University of Information Technologies. The essence of classification is to reduce and filter characters and repeat words. Information in documents is treated as character labels and has no additional meaning. One of the difficulties of categorizing documents is the high dimension of the feature element space. Characteristic elements in the categorization of documents mainly refer to words obtained as a result of text processing, and the dimension of a functional element is equal to the number of different words. In this article, density-based spatial clustering The problem of non-hierarchical categorization can be considered as a multi-class classification problem, for which the set of classes is the set of categories C, the set of objects is the set of documents D, and the set of precedents is a previously known set of pairs {d,c}, where d ∈ D, c ∈ C . II. MATERIAL AND METHODS There are three approaches to solving the text classification problem: supervised learning, unsupervised learning, and confirmation learning. One of the popular approaches of most interest is classification based on machine learning. With this approach, the training of the classifier (a system of naming objects, each of which corresponds to a unique identifier) is carried out on a set of initial training data in the form of documents with categories assigned American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 05, June, 2022 281 | P a g e In formula (1), the vertical and horizontal coordinates are the keyword list index. 𝑎𝑖𝑗 (𝑖 ≠ 𝑗) indicates the number of words 𝑖𝑤 𝑎𝑛𝑑 𝑗𝑤occurring together in the same document. 𝑎𝑖𝑗 (𝑖 − 1,2, … 𝑛) expresses the frequency of words. The distance between words can be determined using the word matching matrix. The higher the frequency of matching two words, the smaller the distance between them. The transformation formula used here is: 𝑑(𝑤𝑖, 𝑤𝑗) = 1 (1+𝑐𝑜_𝑤𝑜𝑟𝑑𝑠(𝑤𝑖,𝑤𝑗)) (2) 𝑐𝑜_𝑤𝑜𝑟𝑑𝑠(𝑤𝑖, 𝑤𝑗)in formula (2) shows the number of words 𝑤𝑖, 𝑤𝑗 in the same document, denominator plus 1 to eliminate the possibility of infinite distance while protecting the standardized requirements.Using formula (1), formula 2𝑎𝑖𝑗can be converted into a distance to obtain a word matching matrix of documents. To initialize the Eps radius, a minimum number of points is considered using a "density-based spatial clustering" algorithm to achieve word clustering. The cluster should be output after clustering and cluster processing. An isolated point is removed. The more closely the words are connected in a cluster, the farther it is. Definitions in the "Density Based Spatial Clustering" algorithm: dense area: for each point in the cluster, the circle with radius contains at least the minimum number of points (Min points). The Epsilon neighborhood of a point P in the database is determined by the following formula: 𝑁(𝑝) = {𝑞𝜖𝐷|𝑑𝑖𝑠𝑡(𝑝, 𝑞) ≤∈} (3) With feature clustering, the new model of the vector space of documents can be expressed as the i-th cluster. If we consider 𝑁 as the number of documents in collection D. The weight formula will look like this[4]: 𝑤𝑖(𝑑) = 𝑇𝐹∗𝑙𝑜𝑔2(𝑁 𝑁𝑡+𝛽⁄ ) √∑ 𝑇𝐹∗[𝑙𝑜𝑔2(𝑁 𝑁𝑡+𝛽⁄ )]𝑛 𝑖=1 (5) Formula (5) is directly related to the vector space model, where 𝑇𝐹 is the word frequency of the characteristic word in the tth feature cluster, and 𝑁𝑡refers to the number of documents in the collection. The characteristic word appears in the tth characteristic cluster. The feature cluster weight can also be obtained by accumulating each feature word in a member of the cluster. The similarity between two documents can be obtained by calculating the cosine of the angle between the two vectors, assuming that the two documents 𝑑1 = (𝑡1, 𝑤1, 𝑡2, 𝑤2, … , 𝑡𝑛, 𝑤𝑛) и 𝑑1 = (𝑡1, 𝑥1, 𝑡2, 𝑥2, … , 𝑡𝑛, 𝑥𝑛) similarities between formulas: American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 05, June, 2022 282 | P a g e 𝑠𝑖𝑚(𝑑1, 𝑑2) = 𝑐𝑜𝑠 ∝= ∑ 𝜛𝑖∗𝑥𝑖 𝑛 𝑖=1 (∑ 𝜛2𝑛 𝑖=1 ∗∑ 𝑥𝑖 2𝑛 𝑖=1 ) 1 2 (6) The categorization task means assigning a boolean value to each pair of 𝑓𝑑fd {𝑑. 𝑐} ∈ 𝐷 ∗ 𝐶 A boolean value of 1 means that document d belongs to the given category, while a value of 0 means the opposite. The categorization problem is the problem of recovering an unknown objective function : Ф: 𝐷 ∗ 𝐶 → {1,0} All categories can be considered symbolic labels, and their meaning does not have any additional meaning. When categorizing documents, first of all, the secondary training data with the target training data are combined for clustering. The secondary training data that is not collected together with the training target data in the same cluster is filtered out. The rest is higher than the target data, and it will be trained along with the training target data. This will greatly improve the classification performance. Some definitions will be given for the main characters used in the article. If you set the target pattern space to 𝐹′ 𝑎𝑛𝑑 𝐹 for the secondary pattern space, 𝑌 = {0, 1} for the class space. test data set: 𝑆𝑐 = {(𝑥1 𝑐, 𝑥2 𝑐, … , 𝑥𝑝 𝑐)}, 𝑥𝑘 𝑐 𝜖𝐹′ , 𝑘 = 1.2.3, … 𝑝. The training dataset consists of two parts : the target training dataset: 𝐷′ = {(𝑥1 𝑡, 𝑦1 𝑡), (𝑥2 𝑡 , 𝑦2 𝑡), … , (𝑥𝑛 𝑡 , 𝑦𝑛 𝑡)} 𝑥𝑖 𝑡𝜖𝐹𝑡 , 𝑦𝑖 𝑡𝜖 𝑌(𝑖 = 1,2, … 𝑛) and a set of secondary training data : 𝐷𝑠 = {(𝑥1 𝑠, 𝑦1 𝑠), (𝑥2 𝑠, 𝑦2 𝑠), … , (𝑥𝑛 𝑠 , 𝑦𝑛 𝑠)} 𝑥𝑗 𝑠𝜖𝐹𝑠 , 𝑦𝑗 𝑠𝜖 𝑌(𝑖 = 1,2, … 𝑚) weight of samples in 𝐷′is: 𝑤1 , 𝑡 𝑤2 𝑡, … , 𝑤𝑛 𝑡{}; prediction objective function: ℎ(𝑥𝑖): 𝑥𝑖 → 𝑦𝑖 , �̃�(𝑥𝑖 1)~ is the prior probability of 𝑥𝑖 1 в 𝐷′. Algorithm steps: The training data sets 𝐷𝑆and the target data set 𝐷𝑡, the test data set 𝑆 are fed into the input. Output: classified ℎ′ (𝑥′) a) into the input 𝐷𝑆 and 𝐷𝑡 set 𝑝(𝑥𝑗) = 𝑤𝑖/∑ 𝑤𝑖 𝑛𝑖 𝑖=1 ; b) according to the class standard, the training data can be divided into N classes: 𝐷𝑖 (𝑖 = 1,2,3, … 𝑁) , Di (i = 1, 2,``` N), где 𝐷𝑖 where 𝐷𝑖 means the set of instance classes labeled i; c) for 𝑖 = 1 𝑡𝑜 𝑁; d) The k means clustering algorithm for 𝐷𝑖 clustering is invoked and returns the clustering results; e) scan 𝐷𝑖 deleting a cluster of instances in secondary data that were not collected along with the target data; f) end of this part g) derived a classification model from the filtered training data and test data S by calling the 𝐾𝑁𝑁 algorithm ℎ(𝑥𝑖)(𝑥𝑖 ∈ 𝐹𝑡 ∪ 𝐹𝑆); h) calculate the error rate ℎ(𝑥𝑖 𝑡)𝑜𝑛 𝐷𝑡 American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 05, June, 2022 283 | P a g e 𝛿𝑡 = ∑ 𝑝 𝑛𝑖 𝑗=1 |(𝑥𝑖 𝑡 − 𝑦𝑖 𝑡)| set 𝛽 = 1 2 ln(1 − 𝛿𝑡)/𝛿𝑡⁄ ; j) update the weight vector of the target training data, the weight of the first 𝐾 + 1 iterations is 𝑤𝑖 𝑡(𝑘 + 1) = { 𝑤𝑖 𝑡(𝑘)𝑒−𝛽, ℎ(𝑥𝑖 𝑡) = 𝑦𝑖 𝑡 𝑤𝑖 𝑡(𝑘)𝑒−𝛽, ℎ(𝑥𝑖 𝑡) ≠ 𝑦𝑖 𝑡(6) k) at the entrance: ℎ𝑖(𝑥𝑡) {1, ∏ 𝛽𝑡 −ℎ𝑖 𝑡 (𝑥) ≥ ∏ 𝛽𝑡 −1/2𝑁 𝑡=[𝑁/2] 𝑁 𝑡=[𝑁/2] 0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 (7) III. Application implementation In the experiments, I used the documents of the Department of Systematic Practical Programming of the Tashkent University of Information Technologies. The data set contains categories of documents of the department, including information about the department, about students, articles, etc. Each large class also contains several sub- categories below and includes a total of 500 documents. In the experiment, the main categories are selected: department documents; documents related to teachers; and documents related to students, including the annual report, plans, and rating. In each selected category, there are subcategories. We chose the main categories because the objectives of the class and secondary documents are outdated. For example, the annual report of the department means that we select the report for 2021 and 2022 as target categories, for example, financial (wealth, consumption). The specific data distribution is shown in Table 1. Table I. Department Data Distribution Target dataset Initial Initial training data Auxiliary data Students' documents Themes of diploma work and master's theses Written work by part- time students and reviews Documents on student practice Documents on student practice Plan document control/documents to test students' knowledge (bases of written and oral control questions, written and electronic test questions, options for written work, block modules, and so on). report on spiritual and educational work. Scientific works Reviews of scientific works Diplomas, dissertations Teachers documents Documents of cooperation with professional colleges and enterprises of the department articles of teachers of the department / Individual work plans of teachers of the department Department documents Orders of the dean of the faculty and information on their implementation / Decisions of the University Council, Methodological Council, Faculty Academic Council (copy) Certificates and instructions of the rector and vice-rectors of the university on the activities of the department and their implementation American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 05, June, 2022 284 | P a g e The study compared the transfer learning algorithm, which is based on the application of knowledge gained from other studies, with the density-based spatial clustering algorithm. The article proposes a transfer learning algorithm based on clustering. The feature cluster is first achieved by the algorithm, then the algorithm is used for the dataset cluster, and finally, after the weight adjustment strategy, the K-means algorithm is used to classify the documents into different classes. IV. RESULTS The result after CLUSTERING data set before clustering after clustering Students' documents 532 250 Plan 400 190 Scientific works 500 220 Teachers documents 380 230 Departments document 450 341 ACKNOWLEDGMENT The work is carried out with the Department of System and Practical Programming of TUIT. based on the documentation of the department. VI. CONCLUSION This article considers the task of classifying documents in the electronic document management system of a scientific and educational institution. A comparative analysis of existing approaches to machine learning was carried out, on the basis of which it was concluded that the use of transfer learning gives a more effective result in the 0 100 200 300 400 500 600 Students' documents Plan Scientific works Teachers documents Departments document results after clustering before clustering American Journal of Interdisciplinary Research and Development ISSN Online: 2771-8948 Website: www.ajird.journalspark.org Volume 05, June, 2022 285 | P a g e classification of documents. educational institution to improve the quality of classification and. For solving the classification problem it is also necessary to select certain to which the initial set of documents will be distributed, for which the algorithm presented in the article is proposed. Thus, the algorithmic support presented in the article can be used as a theoretical basis for the integration of machine learning methods in the analysis and classification of documents of a scientific and educational institution. REFERENCES 1. Marszalek M., Schmid S., Harzalla H., Van de Weyer J. Learning object representations for class recognition of visual objects. In: Seminar on ICCV Visual Recognition Problems. 2007. [1] 2. Mikhalkova L., Mooney R.J. Transfer learning by matching against minimum target data. In: Proc. assoc. to advance the workshop on artificial intelligence transfer learning for complex tasks. 2008 [2] 3. Moreno O., Shapira B., Rokach L., Shani G. (2012) TALMUD—transfer learning for several areas. In: Proceedings of the 21st ACM International Conference on Information and Knowledge Management. 2012. [3] 4. Nam J., Kim S. (2015) Prediction of heterogeneous defects. In: Proceedings of the 10th 2015 Joint Meeting on Fundamentals of Software Engineering. 2015. [4] 5. Ng MK, Wu Q, Ye Y. Collaborative learning with a method based on a joint transition probability graph. In: Proceedings of the 1st International Workshop on Revealing Cross-Domain Knowledge in Web and Social Networks. 2012. [5] 6. W. Dai, Q. Yang, G. Xue and Y.Yu, “Boosting for Transfer learning”, Proc.24 International Conference. Machine Learning, pp.193-200, June 2007. [6] 7. Xinno Jialing Pan, Yang K. Survey on transfer learning. IEEE TKDE, 2009. [7] 8. Dai V, Yang Q, Xue GR, Yu Yu. Boosting for transfer learning. Proceedings of the Twenty-fourth International Conference on Machine Learning, 2007: 193 × 200. [8] 9. Dai Wee, Chen WK, Xue GR, Yang Q, Yu Yu. Transfer learning: Transferring learning to different functional spaces. Advances in Neural Information Processing Systems 21, 2009. [9].