1. Introduction
Predicting the profits of service companies has been studied for years with different methods and tools, studying the past to understand the present and anticipate the future. On the other hand, companies have started trying to reach the target audience via social media, where platforms such as Facebook, Twitter and Instagram allow users to express their thoughts and opinions through the buttons on the platform.
Therefore, many companies and business strategists consider social media an important area and are constantly trying to figure out different ways to increase their profitability using the data extracted from it [1], as the importance of social media in business grows very rapidly as the number of people who join and use social media sites regularly increases.
As button is a part of interactions available to users, it can be used directly to identify users' feelings and emotions, and it can help determine satisfaction with the post in social media [2-11].
Social media marketing is not a new trend, and is a way to help companies easily reach targeted customers. Social media marketing can be defined simply as using social media channels to promote a company and its products [3-4].
Some researchers consider social media marketing to be one of the basic components of marketing, and it is a tool for analyzing and knowing customers' behavior and an opportunity to learn about their desires to analyze and try to achieve them, and this is done by establishing relationships with customers and providing them with the opportunity to express their opinions in the development of the company's products[5-12].
Social media can provide unlimited information about customers without human intervention, this is an advantage over other forms of communication because the amount of information that can be provided is much larger than any other form of communication, in addition, a company that adopts social media marketing can allow customers to design products and services that meet their specific requirements, for example"[13,14,15].
2. Related Work
Forouzani mentioned that "Using social media and machine learning to predict financial performance of a company" [6], which state that traditional models to predict future sales of a product or service depend on past and not up-to-date data, which provide unsatisfactory and inaccurate forecast results.
Another research predicted the profitability of a film using social media data via film-related input parameters such as actor, director, writer, etc. [7].
This study includes three key components (data collection, advance data processing, Data Mining), and this project follows a mathematical model of the k-NN algorithm used in the classification and results obtained from the project were observed close to IMDB classifications.
On the other hand, research [8] took advantage of internet data such as the number of online product reviews, the number of comments, the number of answers to questions asked and the evaluation of customer review, and then these data were entered into the forecasting system in order to predict product sales in an online environment.
Chavan et. in [9], handled profit forecasting in a different way through the training of machine learning algorithms (Linear Regressor, K-Neighbors Regressor, Xgboost Regressor, Random Forest), with data collected from previous grocery store sales. The data consisted of variables such as item weight, item fat content, item shape, item type, and random Forest's algorithm has the highest accuracy with 93%.
In research "A machine learning-based approach to enhancing social media marketing" [10,17], researchers examined social media data analytics using machine-learning tools, this approach used the WEKA environment to develop a social media marketing strategy.
The proposed model (ML-SMM) includes the concepts of social media marketing and machine learning, and integrates the WEKA machine-learning tool to predict online consumer behaviour to ensure effective marketing.
Based on these previous studies, it was noted that the data used are static non-dynamic data and the current research will try to solve this problem by relying on constant and variable data.
The research is based on collecting data from the company's posts via Facebook platform, training machine-learning algorithms on this data, comparing them and selecting an algorithm with the highest accuracy, to try to predict the profitability of a new service through interactions on the post of this service via Facebook.
3. Proposed model
(Figure .1) depicts our research methodology, the first stage is data collection (numerical data and text data), the numerical data are the interactions which users interact on company's posts, in addition to the profit feature which expresses the profitability of services advertised through the company's posts, and text data are number of comments (about 4500 comments).
Comments classification system will be trained (using NLP techniques) on text data, this system will determine the percentage of positive comments within the posts to complete the system database.
System inputs are interactions (likes, haha...) + comments positivity percentage + profitability of services, and system output is a numerical value (one to six), where value 6 expresses higher profitability.
The next stage is to train prediction algorithms on the system database and compare them to determine the best algorithm to be able to correlate interactions with the profitability of the service in the post.
new service profit
A. Collect data
A.1. Numerical data collection
The data will be extracted from each post published by the company and contains a service, product or offer offered by the company for a period from 2013 to 2021, and data collected via Facebook graph API.
(Figure .2) shows the numerical data file collected from the company's posts via Facebook platform, the data is the number of interactions on each post, there is a field containing the URL to the post in order to be able to access the post when necessary.
A.2. Text data collection
Text data are the texts (comments) written by users on Syriatel's page posts.
The textual data are 4,550 comments, compiled in one file, and then these comments were classified into three sections [positive (1), negative (0) and neutral (2)], and this was done manually on the 4550 comments where each comment was classified into one of the sections, and then comments processed through several techniques (Text pre-processing).
Classification algorithms were trained on these comments to select the best model and build a model that can determine the positive percentage of comments written on posts.
A.2.1. Comments classification
The goal of classification is to predict accurately the target class for each case in the data, to achieve this goal we perceptually split comments dataset into two disjoint sets 80% training set and 20% test set, training set used to build the model and test set used to validate it.
There are many types of classification algorithms, and we will go to use (Random Forest, Support Vector Machine, Stochastic Gradient Descent, K nearest neighbours, and Ensemble: Random Forest, and KNN).
A.2.2. Comments classification experiments Comments classification algorithms will be compared across different metrics to choose the most accurate algorithm:
Accuracy: The basic metric used to evaluate the model is often accuracy, describing the number of correct predictions on all predictions.
Recall: is a measure of the number of positive cases correctly predicted by the classifier, for all positive cases in the data.
F1-Score: A measure that combines precision and recall, generally described as the consensual average of both.
Training results as shown in (table .1).
As shown in (table .1), Random Forest is the best algorithm to classify comments. Figure 3 shows
testing the model on three different sentences.
Let's assume that the 3 sentences in (figure .4) are comments on a post, the system will return a value of 0.33 as the proportion of positive comments from the number of total comments.
B. New service profit
Initially, the numerical data has been combined with the percentage of positive comments within each post. All features of the data set are presented in (Figure .4).
By using machine-learning algorithms, we try to implement a predictor model for the Telecom Company. Now we have a data set, and by pre-processing and feature selection, we divide the data set for training and testing. For these algorithms, we have made some feature engineering to have more efficient and accurate results. (Here we divided data into 70% - training, 30%-testing).
We used five algorithms to know which will provide us with results that are more accurate: (Random Forest, DT, Gradient Boosting, K nearest neighbors, NB). Also we used the same dataset to train all models and tested it out to get the results.
4. Results
We performed several experiments on the proposed profit prediction model using machine-learning algorithms on the dataset. The result obtained from the algorithms are shown in (table .2), where we can observe the accuracy obtained by using the algorithms.
Random Forest (RF) is a useful algorithm that suite for classification and can handle nonlinear data very efficiently. RF produced better results and better accuracy and performance compared to the other techniques. We can observe the results obtained when using the Random Forest technique (Figure.5) and NB (Figure.6).
Real values can be compared with the predicted values to evaluate the performance of the algorithm's, (figure .7) and (figure .8) show the predicted value and real value of random forest algorithm and Decision Tree algorithm for 22 samples.
value of Decision tree.
Then to get the final decision by the system about the profitability of the service within a criterion of 1-6, a file containing the value of interactions on the selected post is sent to the Random Forest model and the output is as shown in (Figure .9).
Previous results showed that Random Forest algorithm is the algorithm with the best performance with an accuracy of up to 67%, and the ROC_AUC value is 0.75, which means a good ability of the model to distinguish between the classes when predicting the value of a class, in addition to its superiority in the values of (F1-score) and (Recall).
From the results, we conclude that:
The number of data qa is relatively small with 690 records. The reason for the low accuracy is due to the nature of the target community and the nature of the studied company, since there is no clear difference between the interaction obtained on publications with high-profit and low-profit services. There is no real correlation between the service's profitability and the interactions on the post containing the service. For example, there are services whose profitability rating is 2 and some is 6, but are very similar in the number of interactions on posts when they are promoted in the company's Facebook posts. We conclude from the previous point that there is some randomness due to the appearance of the post for multiple categories of users and not only the target group of the service provided. All categories consider the company's Facebook post as a way of expressing their problems and asking page admins about various complaints and not necessarily expressing their opinion about the service provided in the post.
5. Conclusion
The importance of profit forecasting will help many companies, especially in the telecommunications industries, to increase its income and achieve good revenues.
Social media is an environment that includes a huge amount of data, which, if taken advantage of, provides very important information about the market and users.
The research focused on the possibility of predicting the profitability of telecom company's new services through machine learning technologies, data processing and taking advantage of the data provided company's previous posts via Facebook. Text and numerical data were collected, to take advantage of every detail of the post, and machine-learning algorithms were trained on the text data to help determine the overall orientation of the comments on the post.
In the last step, machine-learning algorithms were trained to try to find a link between the interactions of the post containing the service and its profitability obtained from Syriatel. Several algorithms were chosen for comparison between them, due to their applicability and versatility in this type of application (Random Forest, DT, Gradient Boosting, K nearest neighbors, NB).
By using Random Forest, we will get more accuracy comparing other algorithms. A possible improvement in the future to improve the accuracy of the system and obtain better results, is increasing the number of data used, and to look for a possible relationship between the type of post (photo, text, video), with the interactions obtained by the post with the profitability of the service within the post.