DESIGN OF A RECOMMENDATION SYSTEM BASED ON THE TRANSITION GRAPH

N a t a l i a G u k Doctor of Physical and Mathematical Sciences, Professor, Head of Department* O l g a V e r b a Senior Lecturer* V l a d y s l a v Y e v l a k o v Corresponding author Postgraduate Student* Е-mail: yevlakov@gmail.com *Department of Computer Technologies Oles Honchar Dnipro National University Haharina ave., 72, Dnipro, Ukraine, 49010 A recommendation system has been built for a web resource’s users that applies statistics about user activities to provide recommendations. The purpose of the system operation is to provide recommendations in the form of an orderly sequence of HTML pages of the resource suggested for the user. The ranking procedure uses statistical information about user transitions between web resource pages. The web resource model is represented in the form of a web graph; the user behavior model is shown as a graph of transitions between resource pages. The web graph is represented by an adjacency matrix; for the transition graph, a weighted matrix of probabilities of transitions between the vertices of the graph has been constructed. It was taken into consideration that user transitions between pages of a web resource may involve entering a URL in the address bar of a browser or by clicking on a link in the current page. The user’s transition between vertices in a finite graph according to probabilities determined by the weight of the graph’s edges is represented by a homogeneous Markov chain and is considered a process of random walk on the graph with the possibility of moving to a random vertex. Random Walk with Restarts was used to rank web resource pages for a particular user. Numerical analysis has been performed for an actual online store website. The initial data on user sessions are divided into training and test samples. According to the training sample, a weighted matrix of the probability of user transitions between web resource pages was constructed. To assess the quality of the built re commendation system, the accuracy, completeness, and Half-life Utility metrics were used. On the elements of the test sample, the accuracy value of 65–68 % was obtained, the optimal number of elements in the recommendation list was determined. The influence of model parameters on the quality of recommendation systems was investigated


Introduction
One of the most popular search queries among Internet users is directly related to commercial activities, that is, the search and purchase of certain products and services [1]. E-commerce, today, is a strong area that is constantly expanding, improving, and covering different areas of the life of a modern person. To increase the efficiency of online stores, recommendation systems are most often introduced into their functionality [2]. Based on the accumulated data and algorithms for their processing, the recommendation system can provide the user with recommendations that take into consideration his preferences and interests at the current time regarding the choice of goods and services.
During the operation of a web resource (online store or information portal), a large amount of commercial information accumulates, which requires automatic processing and can be used to build a recommendation system.
From the point of view of practical implementation, the simplest is non-personalized recommendations that are built, for example, based on the rating of goods according to buyers' estimates, based on the frequency of sales of a product or group of goods. When building such recommendations, researchers face a number of issues, the main among which is the problem of cold start and the relevance of the formulated recommendation. For new products and new users, the necessary information for ranking is missing, so the recom-mendations may be unreliable. Different ways of smoothing data and calculating credibility intervals do not eliminate these problems. Therefore, the most promising is to build systems of personalized recommendations that are based on accumulated transaction data and a built-in model of user behavior or a group of similar users. When building a model of the recommendation system, it is important to distinguish data related to a particular user from noise. It is also necessary to take into consideration the peculiarities of behavior that determine the specific preferences of users to a particular product, and highlight similar users to provide group recommendations. To eliminate the problem of the previous lack of some user and product data, it is relevant to develop heuristic approaches by which the necessary initial data can be generated.

Literature review and problem statement
In the last few years, many technological advances have been made in the field of building and implementing recommendation systems for web resources. Several approaches are used. The main types of recommendation systems on the Internet are based on methods for evaluating the content of an Internet resource or collaborative filtration. These approaches were studied in work [3], which considered the methods of constructing classifiers for content filtration and ways to calculate the coefficient of similarity of users or objects in collaborative filtration.
Content filtering involves images of units of content in a feature space that makes it possible to compare them to the interests of users who have previously saved them to a user's profile. The rating of the goods in the list of recommendations is determined by the degree of conformity of the goods to the interests of the user. The difficulties arising from the application of this approach are associated with the impossibility of a structured image of some features of the object, for example, its text description provided to the object of review, etc. In this case, a vector description of the sign in the space of words is used. In the same space, it is necessary to obtain a description of the user's interests, then it becomes possible to compare the vectors of objects and users in order to determine their proximity. To improve the vector description of objects, Tf-Idf metrics are widely used, which take into consideration the frequency of use of words in the description [4]. Thus, matching words that are used less frequently has greater significance to make recommendations than coincidences on signs that are used more frequently.
The second approach in the construction of recommendation systems relies on collaborative filtration. Paper [5] devised a methodology for selecting the current video content, taking into consideration the needs of the user. The recommendation system is built in the form of a web application, the algorithm for providing recommendations uses the method of collaborative filtration. Input data for the algorithm operation are formed by users by providing assessments of the video materials being viewed. The quality assessment of the developed system was checked and evaluated on YouTube video materials.
Work [6] compares the quality of recommendation systems that use content and collaborative filtering using wellknown movie rating data sets MovieLens and Netflix. It has been shown that taking into consideration the content makes it possible to build a recommendation system that is aimed at the needs of a certain user, and collaborative filtration systems have a better predictive ability.
Algorithms based on collaborative filtering collect information about users' preferences and find the most similar ones among them. Therefore, they are able to supplement the missing user data with available data about similar neighbors, so that they can eliminate the problem of cold start. The similarity of users means the convergence of their interests and preferences, and to determine the similarity, various metrics are used, such as the Pearson correlation, the cosine distance between vectors, the distance of Jacquard, the distance of Hemming. A significant drawback of such algorithms is their quadratic complexity, for the elimination of which simplifications are used associated with modifications of the algorithm for calculating paired distances between objects. Assumptions that simplify the user behavior model are also used. For example, a hypothesis is formulated about the immutability of the user's interests over time and the hypothesis about the complete coincidence of preferences for users whom the algorithm recognized as close to each other. In addition, such algorithms require normalization of the results of the evaluation of goods provided by users.
More difficult to implement in practice is the approach based on the formalization of expert knowledge about the subject area -ontology. The use of this approach makes it possible to take into consideration the complex dependences between objects and make the recommendations more accurate.
An overview of recommendation systems and their ability to take into consideration the context in the formation of individual recommendations is given in [7]. The authors indicate that the creation of semantically developed images with formal axiomatization is a complex and lengthy process. In addition, during the existence of such systems, knowledge must be updated and maintained up to date.
In addition, when building recommendation systems, a hybrid approach is developing that combines the ideas of pre vious methods of providing recommendations [2]. With the use of hybrid methods, a balanced combination of results is built, for example, recommendations for collaborative and content filtration, or a mixture of recommendations from several sources is provided. Sequential processing of recommendations is also possible when the results selected by content filtering are sent to the collaborative filtration algorithm [8]. However, the use of a hybrid approach requires justification of the technique of combining recommendations and determining the weights of each component of the integrated recommendation.
The above review reveals that existing approaches to the construction of personalized recommendation systems do not solve the problem of cold start, significantly simplify the model of user behavior during a search, have high computational complexity, and are poorly scalable. The solution to this problem may be the development of new algorithms specific to this class of data processing tasks.

The aim and objectives of the study
The purpose of this study is to develop a recommendation system for a web resource, which is based on semantic links of web resource pages and the results of processing statistical data on user actions. This could eliminate the cold start problem for new users and build recommendations online.
To accomplish the aim, the following tasks have been set: -to build a web resource model in the form of a web graph and a model of user behavior in the form of a navigation graph; -to apply a Random Walk with Restarts method to rank HTML pages of the web resource recommended for viewing, build an algorithm and program implementation of the proposed technique; -to select appropriate metrics to assess the quality of the built recommendation system; -to apply the proposed approach to an actual web resource and analyze the results of the computational experiment.

The study materials and methods
The task of building a recommendation system is formulated as follows: let U be a set of users, V -a set of HTML pages of a web resource. It is required to construct the mapping of F [2]: where r is the rating of page vÎV for user u ÎU, r ÎR.
The mapping of F measures the feasibility of a v ÎV page recommendation for u ÎU user. The task of the recommendation system is to select for each user u ÎU such a page v¢ÎV, which We propose an approach to building a recommendation system based on the ranking of web resource pages. To perform the ranking procedure, it is proposed to analyze the structure of the web resource and take into consideration information about the behavior and actions of users when visiting the resource, which is accumulated by the system of collecting statistics of visits.
To build a recommendation system, the theory of Markov processes was used. It is believed that the process of user transitions between HTML pages of a web resource corresponds to a state change in the Markov homogeneous chain. The web resource model is depicted as a graph. Statistical information about user transitions accumulates and is displayed as a weighted navigation graph. The process of user transition between web resource pages is considered as a process of random walk on the graph. A Random Walk with Restarts method is used to rank graph vertices.
To assess the quality of the formulated recommendations, metrics of accuracy, completeness, and Half-life Utility (HLU) were used. The graph of an actual web resource is constructed using the crawler program. JavaScript scripts are embedded to aggregate user transition data into the HTML page structure. The analysis of constructed graphs is carried out using metric characteristics: diameter, average vertex degree, average path length between two vertices, graph density. Existing user conversion observation data between web resource pages is divided into a training and test sample. The quality analysis of the built recommendation system is carried out using the average values of accuracy, completeness, and HLU metrics for the list of users from the test sample.

Results of the development of the system of providing
recommendations to users of the web resource

1. Construction of mathematical models of the web resource and user behavior when viewing web resource pages
Discrete mathematical models are widely used to describe the structure of the site. With the help of such models, semantic clustering of web resource pages is carried out, communities of web space users are separated according to certain characteristics, metric characteristics of graphs are studied to determine the types of web resource pages.
To represent the structure of a web resource, it is proposed to use the hypertext model in the form of a graph given in [9,10].
A web resource is represented as a G(V,E) graph, in which the vertices are HTML pages and the edges are the links between them; V is the set of vertices; E is the set of edges; The hypertext model is supplemented by information about user actions on the site. The user's transition between hypertext pages can be aimed at finding a landing page that matches the query or to visit pages of a specific topic. To simulate user behavior when searching for information on the site, we shall use the user transition graph between the pages of the web resource, based on the G(V,E) web graph. The transition graph is depicted by a weighted graph G(V,E,W), where W is the set of weights of the edges.
The weight of the edge e(v i ,v j ) is determined by the number of user transitions between pages v i , v j ÎV. In the case when there is no transition between the pages of the site v i , v j ÎV, the weight of the corresponding edge is 0.
Then each user's route between the hypertext pages can be represented as an ordered sequence: where l is the number of HTML pages visited by the user during one session.
Since user transitions between pages in different sessions do not depend on each other, we can consider the movement of users between pages of the site as a random process. When a web resource is visited, the user views the vertices as independent equally distributed random variables. Assume that at any given time the conditional distribution of future states of a process with specified current and past states depends only on the current state and does not depend on past states. That is, the user's transition to a specific page of the site depends only on the current page on which the user is currently located [11].
Given these features, the process of user transition between pages is a Markov process with discrete time and discrete states.
In this case, each route P k of the user within one session can be depicted as a subgraph: where V Pk ÌV is a set of vertices visited by the user; E Pk ÌE is a set of edges through which the transitions between vertices were made; W Pk ÌW is a set of edge weights in the subgraph. The weight of each edge e(v i ,v j ) in the subgraph corresponds to the number of transitions between the HTML pages v i , v j within the P k route. The resulting user subgraphs are combined to form a directed weighted transition graph: in which the weight of the edge is calculated as the sum of the weights of the edges between pairs of vertices v i , v j from each subgraph. The adjacency matrix of the transition graph takes the following form: Using the adjacency matrix of the navigation graph, a matrix of probabilities of transitions between the pages of the M ij web resource is built. Considering that the probability of navigation between pages is directly proportional to the number of user transitions between these pages, we obtain: where n is the number of vertices of the graph. The matrix elements are m ij ≥ 0 and normalized for columns.
When moving through a web resource, the user can navigate in two ways -by entering a URL in the browser address bar (INPUT) or by navigating (CLICK) to the page by a link from the current page. Therefore, our proposed model adequately describes the process of moving the user through the web resource. In terms of graph theory, the user can jump from the starting vertex v * or to an adjacent vertex, or to an arbitrary vertex of the graph.

2. Using the Random Walk with Restarts method to rank web resource pages. Algorithm and software implementation
The user's transition between vertices in a finite graph, taking into consideration the probabilities of transitions, is equivalent to changing states in the Markov homogeneous chain. Since the web resource model is represented as a graph, the user's movement between HTML pages should be considered as a random walk in the graph with the ability to jump to an arbitrary vertex of the graph [11].
Using data on semantic links between pages and taking into consideration the number of user transitions, it is necessary to rank the vertices of the graph associated with the arbitrary predefined vertex v * , where the user is located. To rank the vertices of the graph, taking into consideration the probability of getting to them from any vertex v * , we shall use the Random Walk with Restarts (RWR) method [12].
Unlike classical algorithms of random walk, the graph in the RWR algorithm takes into consideration the probability that the process can go not only to the adjacent one but also to any vertex of the graph, including the starting one. This corresponds to the user behavior model on web resource pages.
In addition, given the data of the probability matrix of transitions, we assume that transitions to vertices are carried out by chance but not exactly likely.
Random walk on the G(V,E,W) graph begins at some vertex v * , after t steps, it goes to the vertex v i , from this vertex, at (t+1) wandering step, can move to any vertex v j . In the random walk step, the user from the starting vertex v * , at probability (1-γ), goes to the arbitrary vertex of the graph v i , or, at a probability of γ, to one of the adjacent v * vertices.
The set of vertices and the probability of transition between them form the Markov chain, and the probability of getting from the initial (starting) vertex v * to any vertex v i can be determined by solving the following equation: where P (t) is a vector column in which the component P i equals the probability of getting to the vertex v i from the starting vertex v * ; M is the probability matrix of transition, m ij is the probability of transition from vertex v j to vertex v i ; q is the initial (start) vector-column, in which q v* = 1, and the other components are equal to 0. If random walk at the (t+1) iterative process step reaches the state when P (t+1) = P (t) , then the resulting distribution P (t) is stationary. Vector P (t) ) consists of probability values to get to each of the vertices of the graph, starting from the starting vertex v * .
Thus, the P i (t) value determines the degree of binding of the vertices v * and v i , and the resulting vector P (t) can be interpreted as a measure of the proximity of each of the vertices of the graph in relation to the starting vertex v * . By sorting the components of the resulting vector P (t) in descending order of values and selecting the first L vertices at the top of the list, one can create a list of graph vertices that are most relevant and recommended to the user to visit.
The iterative process (1) is carried out until the convergence of the sequence of ||P (t+1) -P (t) || 2 ≤ ε estimates in the norm of space L 2 or upon reaching the maximum step number of the iteration process.
Since the directed graph of the web resource contains a large number of vertices and may be poorly connected, a significant number of iterations may be required to achieve the convergence of the iteration process. The time it takes to obtain a solution depends linearly on the iteration number, and, due to the need to perform the operation of multiplying the matrix by a vector, the quadratic depends on the power of the set V. Therefore, the modification of the RWR method [13] is used in our work; equation (1) is depicted as follows: a solution to it takes the following form: where I is the unit matrix. The inverse of the matrix is found using the Gauss-Jordan method, which has a complexity of O(n 3 ). This determines the overall complexity of the applied algorithm since the operation of multiplying a matrix by a vector has a lower complexity of O(n 2 ).
The weighted matrix of transition probability is based on statistical information about users visiting web resource pages at the model construction stage, so it is the same for all users.
The iterative process (3) can be organized from any arbitrary vertex of the graph at which the user is located. That is, the search for graph vertices recommended for the user to view can be done for an arbitrary user by assigning vectors P (0) and q for him.
The estimation of the probability of hitting an arbitrary vertex of the graph from the starting one, obtained by the RWR method, has several advantages over methods that use pairwise metrics to assess the proximity of the graph vertices. To assess the relevance of crawl vertices for a particular user, our proposed approach takes into consideration the structure of the graph, the functional connections between the vertices of the graph, as well as data on the behavior of other users of the web resource.
The proposed approach to building a recommendation system involves the following sequence of actions: -build a web resource graph and its adjacency matrix; -construct a graph of user transitions and its weighted adjacency matrix; -construct a matrix of the probability of user transitions; -set algorithm parameters and initial data about a particular user; -organize calculations according to iterative formula (3) until the convergence is achieved; -sort the components of the resulting vector P (t) in descending order and create a list of pages recommended for visiting.
As a result, we obtain a vector, the components of which correspond to the probabilities of user transitions to certain pages of the web resource. According to the received vector for a certain user, a recommendation is built in the form of a sequence of pages of the site for viewing.
The proposed approach is implemented by the following algorithm: Initializing: Construct a web resource graph, build a navigation graph, and appropriate adjacency matrices. According to the adjacency matrix of the transition graph, construct a normalized weighted probability matrix M. Set t = 0; set the value for γ, vector P (0) , starting vertex v * . Form vector q; set L -the number of pages recommended for the user for viewing: 1. Form a matrix (I-γM), build an inverse matrix for it.
4. The resulting vector P (t) contains the probability of getting into each of the existing vertices of the graph, starting from the starting vertex v * .
5. Sort the components of the vector P (t) in descending order, select the first L components to form a list of recommendations to the user.
The g parameter value was set to 0.15. The selection was made in accordance with the PageRank model [11] taking into consideration observations of user movements over HTML pages of the web resource. It is believed that the user, starting from the starting vertex v * , first makes an average of 6 CLICK-type conversions by links, and then makes an INPUT type transition to get to the new start page.
For the practical implementation of the proposed approach, a web graph of the site was built using the crawler program [15]. In the resulting G(V,E) graph, all vertices are unique, that is, one HTML web resource page corresponds to one vertex in the graph. The web graph of the site is represented by an adjacency matrix.
To accumulate information about user actions over a certain time, the web resource was connected to the visit statistics collection system. The web analytics service recorded user transitions between HTML pages during the search session, as well as conversion types. JavaScript scripts were embedded to aggregate user transition data into the HTML structure of web pages. User actions are written to web server log files in chronological order in the form of data sets: <URL, DATA, TIME, TYPE>, where URL -address of the viewed web page, DATA -date of visit, TIME -viewing time, TYPE (INPUT/CLICK)a way to go to the page. The session denotes the active actions of the user on the site -page transitions. If within 30 minutes, the user does not perform any action, then a new session begins for him. In addition, a new session begins if the user enters a new search query in the address bar. Entries that are accumulated during one session and side by side form URL out -URL in pairs.
The presence of such pairs increases the weight of the corresponding web graph of the site by unity. As a result of combining session records of a significant number of users of the site, a corresponding transition graph was built.
For the RWR algorithm to work, a weighted matrix of probabilities of transitions between pages is constructed. For an individual user of the site, the initial approximation P (0) and the initial vector q with a defined starting vertex were formed.
The initial data obtained from the site user sessions were divided into sampling to train and test the recommendation system. According to the training sample, a transition graph was built. The sample for testing was used to assess the quality of the built recommendation system.

3. Selection of metrics for assessing the quality of the recommendation system
In recommendation systems, to assess the quality of the recommendation provided, it is usually used a measure of the deviation of the values obtained using the recommendation system, and the actual values of the product rating for a particular user. The deviation measure is calculated in the norm of space L 1 or L 2 on all elements of the test sample [12]. However, when providing recommendations in the form of a relevant sequence of pages for viewing, the use of these metrics for evaluating the quality of recommendations is impossible. Therefore, accuracy and completeness metrics were used, which are most often used to assess the quality of solutions in information analysis tasks and are calculated as follows [14]: where T is the number of elements from the test sample correctly determined by the RWR algorithm; F is the number of elements that are missing in the test set but determined by the algorithm; FN is the number of elements from the test sample that are not in the list obtained using the algorithm.
Since the recommendations are provided as a sequence of pages to view, the Half-Life Utility (HLU) metric [12] was also used to assess the quality. Using this metric enables finding the location of items in the recommendation list. An item farther away from the head of the recommendation list will gain less weight. The metric value is defined as follows: h is the number in the list of recommendations, which corresponds to the page, which, with a probability of 50 %, would be viewed by the user.

4. Results of computational experiment
We tested the proposed approach using an actual website of the Country Seeds online store (Ukraine) [16]. The web graph G(V,E) of the resource was built, the power of sets was determined: |V | = 486, |E | = 12,096. The web graph of the site is represented by an adjacency matrix. The navigation graph was based on user conversion analytics between web resource pages that accumulated over 180 days.
To evaluate the built web graph and transition graph, some of their metric characteristics were calculated. The diameter of the graph, the average degree of the vertex, the average length of the path, the density factor of the graph were determined: the values are given in Table 1. The diameter of the graph defines the maximum distance between the two vertices through the other vertices. The mean degree of the vertex is equal to the average number of vertices with which the vertex is associated. The average path length between two vertices is equal to the average number of edges that connect the vertices. The density of the graph is defined as the ratio of the number of edges of graph G(V,E) to the maximum possible number of graph edges with the same number of vertices.
To assess the quality of the proposed approach, the ave rage values of accuracy and completeness metrics for the list of users who found themselves in the test sample were evaluated. As elements of the test set, sequences consisting of the web resource pages visited by the user were considered, starting with some starting vertex. At the same time, the first 7 transitions (L = 7) were considered as recommended pages. Fig. 1 shows the distributions of relevant recommendations among the first L elements of the recommendation list. A solid line indicates the distribution obtained using the proposed approach. A dotted line shows the distribution calculated using the known PageRank technique [11].
The influence of the sample division proportions into the training and test ones on the quality of the results obtained from recommendations was studied. Fig. 2 shows the dependences of the HLU metric values on the number of items in the recommendation list, which are built for different ratios of the size of the training and test sampling.

Discussion of results of the recommendation system performance
The analysis of the values of metric characteristics of graphs given in Table 1 is necessary to predict the time costs for the execution of the algorithm. The time for calculating the product of a matrix by a vector, which is necessary for the organization of iterative process (3), proportionally depends on the number of nonzero elements in the probability matrix of transitions. In the case when the transition graph has a large dimensionality and low density, RWR-based calculations may be performed too slowly. The low speed of obtaining an ordered list of pages recommended for viewing would make it impossible to form recommendations to the user under an online mode.
The comparison of the distribution of relevant recommendations obtained using our proposed approach with the distribution obtained using the well-known PageRank methodology [11] testifies to the effectiveness of the proposed approach (Fig. 1). Unlike the PageRank methodology, our proposed approach takes into consideration not only the semantic structure of the web resource but also the accumulated statistics on user behavior, which makes the model more accurate and more powerful.
It follows from the analysis of Fig. 2 that the size of the training sample significantly affects the quality of the recommendations. The best HLU metric values are 60-68 %; they are achieved when the sample division ratio is 80 % and 20 % for the training and test sampling, respectively. With a decrease in the size of the training sample, the quality of recommendations is significantly reduced. In the case when the training and test sample is equal, the worst accuracy indicators according to the HLU metric at the level of 30-35 % were obtained.
One can see from the analysis of Fig. 2 that the maximum values of the HLU metric were achieved for the first elements from the recommendation list v regardless of the proportions of the distribution into the training and test sample. As the item number in the recommendation list increases, the accuracy of HLU is significantly reduced. Since the highest accuracy values of 65-68 % were obtained for the first 7 items in the recommendation list, the optimal recommendation list size does not exceed 10 items.
In contrast to existing approaches to making recommendations, our proposed approach does not use information about the content and metadata of web resource pages, so it does not require syntax analysis of their content, which greatly simplifies the procedure for making recommendations and reduces the time to build them. The disadvantages of the proposed approach include the fact that the results of the algorithm operation significantly depend on the quality of the initial statistics, which take into consideration only the movement of users between pages. For pages whose visit frequency is low, the quality of recommendations would be worse. To improve the quality of the recommendation system, the source data may consider other characteristics of the user's behavior, for example, the time spent on the page, the request that landed the user at the vertex, the type of device used, and others. According to the obtained data, it is possible to pre-cluster both web resource pages and users, which could make it possible to form group recommendations.
The result of the recommendation system performance depends significantly on the computational accuracy of matrix operations, which is reduced due to sparsity, large size, and other features of the built matrix of probabilities of transitions between the pages of the web resource. To eliminate this problem, in the future, it is proposed to apply additional procedures for regulating the solutions obtained.

Conclusions
1. The web resource model has been built as a web graph, and the user behavior model has been represented by a transition graph. The user's transition between vertices in a finite graph is carried out according to probabilities, which are calculated by the values of weights of the graph of transitions. We have determined that the user transition process between web resource pages is a Markov process with discrete time and discrete states.
2. A Random Walk with Restarts method is used to rank graph vertexes associated with an arbitrary predefined vertex. The use of this method makes it possible to perform random walks on the graph with the ability to jump to an arbitrary vertex of the graph, which corresponds to the model of user behavior when searching for information.
Taking into consideration data on the semantic links between web resource pages and at the same time statistics on user transitions between pages has allowed us to eliminate the cold start problem for the new user and improve the accuracy of recommendations.
To eliminate the computational complexities associated with the processing of a sparse matrix of probabilities of transitions, the proposed algorithm used a modification of the RWR method. The choice of algorithm parameters has been justified taking into consideration the peculiarities of the behavior of users of the web resource.
Software implementation involves the implementation of procedures for building a semantic structure of a web resource, collecting, and processing statistical data of user sessions.
3. To assess the quality of the recommendation system, the metrics of accuracy, completeness have been used, which could be applied in cases where there are no valid product rating values for a particular user. A Half-life Utility metric took into consideration the location of items in the list of recommendations, which is important when solving the problem of ranking the list of recommendations.
4. The proposed approach was applied to an actual website on the Internet. Using quality metrics, the comparison was performed with the well-known page ranking methodology PageRank, the influence of algorithm parameters and dimensions of the training sample on the quality of recommendations was investigated. The analysis of the performance of the accuracy metrics of the recommendations provided has allowed us to determine that the optimal size of the recommendation list does not exceed 7-10 HTML pages. It was established that the proposed approach could be applied to compile a list of recommendations to the user online.

Introduction
The relevance of evacuation from a building as a way to protect the population in peacetime has increased in recent years. The practice of modern life suggests that the popula-tion is increasingly exposed to dangers as a result of natural disasters, accidents and catastrophes in industry, fire in buildings, terrorist attacks, and this need may also be caused by poor-quality construction of administrative and residential premises. Especially prompt and successful evacuation is