On a Modeling of Online User Behavior Using Function Representation

Understanding the online user system requirements has become very crucial for online services providers. The existence of many users and services leads to different users’ needs. The objective of this presented piece of work is to explore the algorithms of how to optimize providers supply with proposing a new way to represent user requirements as continuous functions depending on time. We address the problems of the prediction the of system requirements and reducing model complexity by creating the typical user behavior profiles.


Introduction
Ubiquitous computing represents a new generation of interaction with computers and is a promising way for users to obtain the needed services, as well as for the distribution companies to distribute their applications with lower distribution costs and attract customers for longer time period.It has emerged as a natural evolution step in computer sciences as the computer-based appliances are becoming smaller, more mobile, and more interconnected than ever before.
The aim of this paper is not to discuss the future potential of ubiquitous computing as we believe that there are already enough articles concerning it or to describe the general principles of computing and software engineering innovation adherent to ubiquitous computing, but rather to propose a new approach to modelling of ubiquitous computing online user requirements further UCUR and behavior, compute system level agreement with the UCUR provider, and reach the optimal infrastructure by user allocation among particular sources in order to fulfil the user's needs.
The ubiquitous computing service has not been very clearly defined yet.We will therefore assume, for the purpose of our paper, that ubiquitous computing service is every regular service fulfilling ubiquitous computing requirements-that is, the service is accessible everywhere, fully integrated into everyday objects and activities and is not connected with any single type of hardware.
There are apparently some differences in the intensity of different service usage.For a company which provides more than one service, it seems to be only rational to adjust the level of services provided during the daily hours in order to optimize the usage of available resources and keep the level of services according to the client needs.We can assume that different users will require a different kind of services in different time, for example, i marketing user-during work time he/she uses mainly databases, storage, marketplace and email services, in his/her free time mainly web services; ii accountant-during work time uses mainly billing and accounting services, partly also infrastructure and databases; at the same time, it must be noted that the usage of services differs during the month, for example, the use of accounting and billing services intensifies during thanks to financial statements preparation, the use of data sharing increases during the financial audit, and so forth; iii school child-will use mainly web services, e-mail, and data sharing, however, in different time period than the full-time employee.
The examples shown above illustrate the differences in the intensity of service use.
In this piece of work we assume that our model company provides several different services and serves different types of users as mentioned above.This company operating model can in an optimal mode bring significant savings from the scale of the services provided; nevertheless, on the other hand it can cause some significant issues with the set-up and managing the system.
The service provider has to manage and monitor its services level provided at any time for each particular service.Based on our research, one possible way is of reaching the optimal level of the service management and monitoring lies in computing the system development and predicting its changes by the modeling of typical user behavior.Our approach is based on the possibility to model user needs as functions and then to use these typical user needs as a representative of one of the groups created by using function data clustering techniques.
The further parts of this paper are organized as follows.In Section 2, the current studies in the field of ubiquitous computing and curve clustering techniques are briefly reviewed.In Section 3, the user behavior and the attributes that influence it are described.The methods of functional data clustering used in order to create typical user behavior requirements are described in Section 4. In Section 5, the overall system requirements are computed and system changes are discussed.The algorithms of system source's allocation are proposed in Section 6.Finally, a conclusion is summarized in Section 7.

Related Work
Our work is not fully concentrating on the theory of the ubiquitous computing, although it influences our research deeply.The basic ideas of ubiquitous computing are very well summarized in the work by Greenfield 1 .The possibilities of future development in this field are named by many authors.Fano and Gershman 2 deal with some of them especially in the field of medical services and mobile wallet, and Yu with Guo 3 study the role of ubiquitous computing in retail banking.
We concentrate mainly on the ubiquitous computing online user requirements.Some authors even use the term ubiquitous cloud computing when they are writing about ubiquitous computing services, so the term cloud computing is in many aspects very close to ubiquitous computing itself.The ideas of cloud computing and its future role are very well described by Carr 4 , who is mainly known for his comparison of IT systems to standard commodity rather than to a competition advantage.According to him, the switch to cloud computing services and also to ubiquitous computing services will be probably very similar to the switch from single electricity generators to the electricity grid.
In many science sources we find many classifications of the cloud computing services; very well known is the classification of cloud computing services by Cearley and Smith 5 .
i Infrastructure as a Service IaaS -basically raw compute and storage servicesthis option provides only an infrastructure without any software, so the modeling of the requirements is not particularly difficult.
ii Platform as a Service PaaS -higher-level of development environments which abstract the underlying technology and provide for scalability and rapid application development.
iii Software as a Service SaaS -classical online software provided as a service with minimal requirements on installation on user's computer and almost all data are stored on the provider's side.
For the purpose of this paper, we introduce our UCUR model under the category SaaS; however, we strongly believe that our model is also suitable for other cloud computing categories even though they are not as complex as SaaS .Another view on ubiquitous computing services can be found in the work of Kim et al. 6 , where the authors deal with the idea of Offload Socket Processing-these changes in the socket processing can be viewed as another method of resources optimization.
It is obvious that the UCUR model encompass diverse types of services.Weinhardt et al. 7 distinguish the following types of services: Infrastructure, Storage, Database, Business Process Management, Marketplace, Billing, Accounting, Email, Data sharing, Data processing, and Web services for Software as a Service approach as a part of cloud computing services , and we can also apply this categorization to the ubiquitous computing services.There are of course some other services, like webgames, location-based services, and so forth, but they are generally included in the Web services category.
In our research we concentrate on searching for typical user behavior; hence, we need define and classify the clustering techniques.Clustering is a process of grouping data of similar character into the same class or same cluster.However, it is important to note that in case the data are measured as a function of a dependent variable such as time, which applies to our case user requirements , the most frequently used clustering algorithms, such as hierarchical and partition-based ones, may not pattern each of the individual shapes properly.That is why we have to choose more sophisticated and special methods of functional data clustering that are able to attend to the whole space among the measurements and are not limited to the obtained measurements set.
Recently, density-based clustering methods using the Maximum Likelihood Estimation MLE have been mostly developed to recognize most homogenous partitioning of functional data.There are two types of the density-based methods which differ in their approach to the cluster memberships.Firstly, these memberships may be assumed to be some of the model parameters.These methods are called the Maximum Likelihood Approach MLA methods.They are thoroughly described by Fraley 8 and Banfield and Raftery 9 .The classification is a twofold one.
i The likelihood is analytical or approximately maximized over the jointed parameters.
ii By the use of estimations the likelihood function criterion is maximized over the cluster memberships.
Secondly, it can be assumed that the cluster membership is a random variable, and, hence, the mixture models will be used.Due to the height and the criticality of computational cost of finding the global minimum, only the local one is looked for through the application of the Expectation-Maximization EM algorithm described by Dempster et al. 10 .The classification is processed in the following way.
i The cluster memberships are iteratively estimated.
ii The jointed model parameters are estimated using the membership probabilities.
Nevertheless, most of these methods are almost unusable for our model as their efficiency decreases if a considerable variability exists within each subpopulation or group, which can be expected when dealing with user requirements.
It is very important to keep the possibility of an individual to differ partly from one or more characteristics of his or her group yet still exhibit the underlying behavior that distinguishes this group from the rest.In fact, there are only two suitable basic methods which solve the problem of atypical data sets: i untraditional including of estimated regression coefficients into the K-means algorithm innovatively proposed by Tarpey 12 , ii the random effects regression mixtures with a hierarchical model with a mixture on parameters at the top level and an individual-specific regression model at the bottom level which were studied by Gaffney and Smyth 11 .

User Behavior
The form of our solution to the allocation problem is largely influenced by several issues which we are confronted within the process of the UCUR model establishment and management.Firstly, different ubiquitous computing users have different requirements for provided services, and their demands are placed at different time during the day.Secondly, we have to face the logical problem of task's backlog with large number of users.A purely individual approach to each of them cannot be assured.Therefore, we propose to modify the tasks by the use of modelling a much lower number of typical behavior profiles.Let now N be the number of ubiquitous computing users.For each N we assume there is a sufficient history of their requirements' measures.These measures have to be assigned to several monitored attributes in the solution.Basic attributes characterizing the user needs are at least five: i type of requested service web, data based, accounting, billing, etc. , ii requested memory for the service, iii requested computing power both CPU and graphics card , iv hard disk space for the operations and for saving of the results as well , v claims on the line capacity for the connection between the service provider and its users.
However, generally it is possible to include even more attributes, for example, the speed of response.This can increase the model complexity.
Let H be the number of attributes included in our model.In our analysis we have identified some underlying premises.
i The measures have to stem from the aggregations of requirements from previous time frames so that the period between two data points is included therein.
ii Number of measures has to be relatively large with only small time differences as the user access to services may change any time.
iii Due to the restrictions included in the problem we assume the measures in the form of averages from a longer period of time e.g., a month rather than from a shorter period of time e.g., one day .
iv Due to different nature and needs of different attributes we consider various frequencies of measures.
Monitored functions are determined by many variables; some are more critical e.g., connection time, bandwidth, user habits, day of week than others speed of computer control, etc. .In our model, we assume that user access to services within one time zone follows the biological needs and work rhythm.
Given the definition of measures mentioned above let be for the ith ubiquitous computing user, i 1, . . ., N, the hth attribute, h 1, . . ., H, and its m h -length data points x h x h 1 , . . ., x h m h T represented by the vector y h i y h i 1 , . . ., y h i m h T .However, these vectors are not sufficient if we want to understand the user requirements thoroughly by all means.In our opinion, it is more useful to model user behaviour as a continuous function depending on time which reflects its actual demand behaviour .Taking into account this consideration we see y h i as a vector of some function data points' measures.
To define a profile of typical behavior we have to deal with the clustering of tasks which we can build on the averages of overall user requirements classified into one cluster.Our aim is to find a partitioning into some certain number of groups so that objects in the same cluster have high similarity when considering their shapes and, at the same time, objects in the different clusters have lower similarity.

Typical Users' Profiles
To be able to define a typical behaviour profile we need to focus on the clustering techniques.As we have mentioned in Section 2, we may use both-random effects regression mixtures with a hierarchical model and plugging estimated regression-coefficients into the K-means algorithm according to functional data character.
The basic advantages of the K-means algorithm, which is in fact a specific case of the EM approach, are that it is a computationally less demanding solution and does not neglect naturally periodic character of measures.Moreover, there are also other reasons why we should consider the use of it.
i All prerequisites of the algorithm are satisfied-trajectories belonging to one attribute are measured in the same data points and have the same length e.g., one day .
ii Measurements are naturally periodic days in a week -we are looking for the solution that does not neglect this fact.
The K-means algorithm iterative relocates, see Hartigan 13 for more details, the objects y h i into S h k clusters; let us suppose k 1, . . ., K h , by minimizing the within-cluster variance where d is the considered distance and c h k represents the S h k class centroid.However, in our model we consider functional data clustering.Following the Tarpey's research, an individual regression model can be used to estimate the functional responses at finite number of time points where r i is a p h × 1 vector of regression coefficients, X h is a m h × p h design matrix determined by the choice of basic functions and evaluated at x h , and ε h i is a m h ×1 vector of random errors.The estimated regression coefficients can be gained by using least-squares Therefore, a natural way to cluster curves y h i is to apply the K-means algorithm to the elements of the matrix According to the r h i classification, we classify the trajectory y h i and the requirements of the ith user in order to arrange the hth attribute into one of the S h k clusters.It is obvious that the choice of the interpolation model is an important part of the model.
i Clustering results can differ depending on how the curves are fit to the data.
ii Clustering results can differ depending on how the data is weighted-for example, using the cubic B-spline and natural cubic spline, despite the fact that the fitted curves are identical, the clustering can yield different results.
Our primary question of interest is which interpolation method to use.With regards to the periodic data character, we propose to include Fourier interpolation.

Let us denote d h x j
x h j π/6 , j 1, . . ., m h , and assume even number of measurements typically 12 daylight hours .For each object y h i we are now looking for function

4.6
We also project the data observed in 1, m h into the interval π/6, 2π , and for each curve we obtain a set of m h 2 parameters even though two of them are zero .This is an important advantage since the number of measures does not increase and does not complicate the computational cost.However, the K-means algorithm has one important disadvantage-the number of clusters K h has to be given in advance, which is not needed by the random effects regression mixtures model thanks to the ability to use the Bayesian Information Criterion BIC proposed by Schwarz 14 .What is more, the process is an iterative one which leads to the ability to choose the best result by setting the initial parameters and the rules of committing the individual steps.Finally, the trajectories do not have to be measured in the same data points and the measures belonging to different time series do not have to be of the same length although, as we have mentioned above, these requests are not necessary parts of our model case .
Mixtures model uses interpolation 4.2 again.Let Θ h {θ h 1 , . . ., θ h N } be the parameters of this data level which allow us to model the individual trajectory behavior.We may assume the ith conditional distribution taking the form f y h i | x h , θ h i for the hth attribute .At the top level of the hierarchy, there is another model that describes the distribution of the parameters r h i of each individual.Let Φ h {w h k , ϕ h k } be the parameters at this level where w h k is the probability that an observation belongs to the kth cluster and ϕ h k are the parameters of the distribution on r h i according to the known group template f k r h i | ϕ h k .That is why the unconditional class membership for r h i is a finite mixture model Since we know that and the equality f Θ h , Φ h f Θ h | Φ h f Φ h , we may use the maximum-a-posteriori-MAP -based EM algorithm in order to produce consistent parameter estimates.
The EM algorithm consists of two steps.In the first E-step, the expected value of the complete-data MAP function is taken with respect to the posterior condition which is prior of the cluster memberships.We also evaluate the expected value r h ik of r h i given y h i and z h ik 1, where z h ik 1 if y h i is a member of the S h k cluster and z h ik 0 otherwise, and we set the membership probabilities using in the previous M-step updated parameters to In the M-step this expectation is maximized over the parameters Φ h and Θ h .The completedata MAP objective function is for the set Y h of for all y h i and Z h of all z h ik given as This yields the following form of the EM-based algorithm: i randomly initialized membership probabilities w h ik ; ii calculated estimates for {Θ h − R} and Φ h ; iii w h ik and r h ik are made contemporary; iv loop to point 2 and its repetition until the expected value of the complete-data MAP function stabilizes.
Of course, the conditional distribution must be fitted with some real-world distribution and we recommend normal mixtures with Gaussian error term.
The main advantage of this method is the individual approach to each trajectory that is modelled by Eigen function and is allowed to be regulated by a parametric manner.It is also a very effective method in case considerably large innercluster variability exists in the model.The partitioning achieved by the use of the K-Means algorithm or random effects mixtures, may be represented by the vector z h i , where z h ik 1 if y h i is a member of the S h k cluster and 0 otherwise.
Individualy fitting functions from interpolation model 4.2 , let us denote D h i x .By setting this, it is possible to compute the looked for typical requirements' profiles c D h k x as the averages of all objects that belong to the S h k cluster More transparently, the c D h k x functions should be transformed into nonaggregated forms denoted as A,c D h k x .We have done some experiments in a general manner, and we can demonstrate some results of this kind of clustering technique in Figure 1.There are many users' requirements represented as particular curves and classified into three clusters.Bold curves display the profiles A,c D h k x .Note that all figures in this paper are only from experimental measurements and are not based on the real data.

4.11
To summarize the proposed process, the results are the following.
i The requirements of the ith user to the particular hth attribute are modelled as the functions D h i x .ii Each function D h i x is classified into one of the S h k clusters, which is identified by z h i values.iii Analytical view may be considered for only small number of the typical behavior profiles c D h k x computed thanks to partitioning of original objects.iv User individualities boil down to z h i values.

System Change and Overall Requirements
Modern UCUR is built on the premise that the needs of the enrolled users are constantly changing and evolving.However, this fact can be easily integrated into our profiles of typical behaviour.
i If the ith user decides to withdraw from the system, then it will be sufficient just to remove subtract all the curves D h i x from c D h k x , where z h ik 1. Recalculating the inclusion of other users is not necessary, assuming the high number of them.
ii If we identify a new N 1 th user, we will set its measurements y h N 1 y h N 1 1 , . . ., y h N 1 m h T and will allocate them into one of the created clusters by using modified Fisher's canonical discriminant analysis, see its basics described by Fisher 15 , in case that the K-means algorithm is used by clustering problem or discriminant functions quadratic or linear discriminant scores in case of random effects mixtures, see Ramsay and Silverman 16 for more details.Modification of the canonical discriminant analysis that we have specified consists in involvement of the estimation 1 r h N 1 of the new requirement's regression coefficients using the model 4.2 of Fourier interpolation and least squares instead of original measurements-it allows us to take into account the data functional character and to reduce the size of the task by detecting the most important data time points for classification.
iii If we identify the change of needs of the ith user on the basis of the user complaints or explicit user behavior observation or arbitrary correction , and we will remove all the curves D h i x from c D h k x , where z h ik 1, we will update y h i y h i 1 , . . ., y h i m h T and allocate it into one of the clusters in the same manner as if it were a new observation.
When there is the ability to reflect new or changing requirements by reallocating them into existing groups, we may focus on the detection of summary system requirements.Knowing the individual partitioning and profiles A,c D h k x allows us to give the summary hth attribute's requirements as the function

5.1
The UCUR provider has now precise information about requirements on its system in any point in time, which helps to prevent the overwhelming system's sources.Nevertheless, to be able to make a decision about the approval or rejection of the new user application, it is necessary to know firstly how the sources are heavy and how the current requirements are allocated.

Requirements Allocation
To define our algorithm of requirements' allocation, we assume that the UCUR provider disposes with Ω sources servers of certain capacities on the hth attribute evaluated as ε h ω , ω 1, . . ., Ω.The issue of requirements' allocation can be seen as a version of some clustering problem.We also propose the following process inspired by both the partitioned-based and agglomerative clustering algorithms.
Step 1. Choose randomly Ω user requirements identified with indexes i ω and allocate each of them to one source/cluster Ω C ω that represents the ωth server with the fulfillment of the capacity condition  ii Denote by Ξ the set of all indexes which belongs to the allocated requirements, so now only all i ω .
Step 2. For all sources and their charges we compute the cost/failure which is reached when adding particular number of profiles.We understand the cost as a state opposed to the optimal status.The most effective allocation is given by constituting the most constant requirement function as possible at any point in time for every attribute.Then we set for the hth attribute and weighted interval T 1 , T 2 the Ω × K h matrix s G h of the elements s g h ωu representing the possible cost:

6.1
The matrix determines the possible system costs/failures according to user's behavior.An example of this is illustrated in Figure 2. Bold curves represent typical profiles A,c D h v x and A,c D h u x , a dashed curve shows the summation of these curves, the constant function is the maximum of its summation, and the filled area is the cost/failure g h vu t .
The least values of g h vu t indicate the most optimal combinations of allocation.However, there are a lot of user requirements' classifications given by vectors z h i , also the sum of all combinations must be computed.We have recalculated only the elements belonging to the sources which allocation was previously changed.
i For the first requirement that has not been allocated yet, let it be the ith, i not in Ξ, and intend the cost of its allocation to s C ω with regards to all attributes where e h are the weights.The weights may be excided if all attributes are of the same importance, otherwise it is favourable to include them their values depend on empiric UCUR provider's setting .Allocate the ith requirements to s C γ if with the fulfillment of the capacity condition s Ψ h γ x A,c D h k x ≤ ε h γ , where z h ik 1. Increase the number of allocated requirements s s 1.If the condition is not met, allocate it into the most optimal according to Q ωi source that meets that condition denote it again s C γ .In case such source does not exist, the requirement cannot be acquired.
ii Update s Ψ h ω x the actual charge of the ωth source, so s Ψ h ω x s−1 Ψ h ω x , where ω / γ, and for the changed source s Ψ h γ x s−1 Ψ h γ x A,c D h k x , where z h ik 1.
Step 3. Return to Step 2 until there are some nonallocated user requirements which have not been detected yet as unacceptable because of objectively limited source capacity.

Conclusion
In the age of ubiquitous computing it will definitely be needed to discover a new way to provide the services to customers, where both provider and customer benefit from simple and attractive revenue logic, which is no longer based on the application development investment and makes possible the achievement of the level of functionality, flexibility, and time to market required by users.On the other hand, the UCUR model ultimately changes the provider-customer relationship from one-to-one to one-to-many and to a typical-utilitybased ecommerce relationship with a very crucial need to understand user's behavior and the effective algorithm of requirements' allocation.The model of the usage must be precise enough since the initial failure in the service delivery may result in the user's mistrust and the overcalling of service's hardware and software may result in high costs charges to the consumer or in the loss of the owner.The primary motivation of this paper was to define the novel algorithm of user requirements' allocation between available sources.In order to achieve this aim we have introduced a new way to represent individual user needs as functional data measured in time for each of the attributes included.We have been focusing on finding the typical user behavior profiles by solving functional data clustering problem.Hence, we have integrated the linear regression into the K-means algorithm and dealt with the random effects regression mixtures with the EM algorithm and parameters at two levels.We have discussed the system development and changes of actual user demand, and we have demonstrated how to compute the overall system requirements.Based on executed research we are finally able to define the innovative algorithm that leads to the optimisation of UCUR sources' utilising and user allocation.