Learning method, learning model, prediction method, prediction device, and computer program
The learning method and model utilize feature engineering to create relevant features from sales performance data, addressing the inefficiencies and low accuracy of conventional demand forecasting methods by achieving high-accuracy predictions without extensive data collection.
Patent Information
- Application Number
- JP2021058145
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2041-03-30
AI Technical Summary
Conventional demand forecasting methods require a large number of data types, leading to increased time and cost for data acquisition and analysis, while also not providing high accuracy in predictions.
A learning method and model that uses feature engineering to create relevant feature data from sales performance, including calendar-related features, statistical features, and sales amount features, which are then used to train a learning model for accurate demand forecasting without the need for extensive data collection.
This approach enables high-accuracy demand forecasting by focusing on key features from sales performance data, reducing the need for extensive data collection and analysis, thereby improving efficiency and reducing costs.
Smart Images

Figure 0007666966000001 
Figure 0007666966000002 
Figure 0007666966000003
Abstract
Description
[Technical field]
[0001] The present invention relates to demand forecasting, and to a learning method, a learning model, a forecasting method, a forecasting device, and a computer program that realizes forecasting with higher accuracy. [Background technology]
[0002] For businesses that sell goods and provide goods services, it is important to forecast demand in order to procure raw materials and supplies, as well as to secure human resources. Conventionally, there have been various methods for forecasting the number of visitors and product sales (Patent Document 1).
[0003] In demand forecasting, learning using various models such as exponential smoothing, moving average method, and multiple regression analysis has been used. With the advancement of computing resources, forecasting methods using deep learning have also been proposed. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Application Publication No. 4-000596 Summary of the Invention [Problem to be solved by the invention]
[0005] In conventional prediction methods, the parameters that contribute to improving accuracy have been studied. For example, in Patent Document 1, multiple regression analysis is performed by inputting data such as weather, day of the week, season, temperature, and the presence or absence of a campaign.
[0006] Accuracy may be improved by acquiring, analyzing, learning from, and making predictions on a large amount of data, but the time required to output the results or the cost required to acquire the data increases.
[0007] The present invention aims to provide a learning method, a learning model, a prediction method, a prediction device, and a computer program that realizes highly accurate demand prediction without the need to collect many types of data. [Means for solving the problem]
[0008] A learning method according to one embodiment of the present disclosure is a learning method that uses data regarding the provision of an item or service at a specific location as input data and causes a learning model that outputs data indicating demand for the item or service to learn using sales records of the item or service as training data, and includes a step of creating at least one type of feature data from the sales records, among features related to the calendar of the day on which the item or service is provided, statistics related to the item or service in the sales records, and features related to the sales amount of the item or service, and a step of executing learning of the learning model using the created feature data as input data.
[0009] A learning model of one embodiment of the present disclosure is a learning model that is trained to obtain data indicating demand for an item or service when a computer inputs data regarding the provision of the item or service at a specific location, and the learning model learns using feature data created from sales records of the item or service, where at least one type of feature data is used as input data and the data indicating the demand in the sales records is used as a target variable.
[0010] A computer program according to one embodiment of the present disclosure is a computer program that causes a computer to learn a learning model that uses data regarding the provision of a good or service at a specific location as input data and outputs data indicating demand for the good or service, using sales records of the good or service as training data, and causes the computer to execute a step of creating at least one type of feature data among features related to the calendar of the day on which the good or service is provided, statistics related to the good or service in the sales records, and features related to the sales amount of the good or service, and a step of performing learning of the learning model using the created feature data as input data.
[0011] In the learning method disclosed herein, feature engineering is performed on sales performance as preprocessing of data to be input to a learning model (learning algorithm) used to predict demand. In feature engineering, features of the calendar of the day on which an item or service is provided, such as the day of the week or whether it is a holiday such as Saturday, Sunday, or public holiday, are created as features because the number of items provided, the number of people receiving the items, etc. are affected by these features. In addition, accuracy is expected to improve by using data such as trends regarding the number of items or services sold, the average customer price, and the presence or absence of discounts as features.
[0012] In a learning method of one embodiment of the present disclosure, the feature data may include any one of a binary value indicating whether the day on which the goods or services are provided falls on a specific calendar day, a continuous value indicating the calendar characteristics of the day on which the goods or services are provided, an average of performance values of the goods or services in a most recent specific period, performance values for the same day of the week on the calendar as the day on which the goods or services are provided, and performance values relating to the impact of discounts on the goods or services.
[0013] In the learning method disclosed herein, the feature data includes continuous values (numerical values when the cycle is expressed by a trigonometric function) indicating whether or not the day corresponds to a specific day such as a holiday, a long consecutive holiday, or a payday, which day in the year it is, and where it is located on a cycle that exists in a calendar such as a year, a month, or a week. The feature data may include data on trends such as averages in the most recent specific period, or may include actual demand for the same attribute on the calendar. By using such data as features, it is expected that the accuracy will be improved.
[0014] In one embodiment of the learning method of the present disclosure, the sales history is POS data regarding goods or services at the particular location.
[0015] In the learning method of the present disclosure, the data on which the feature data is based is POS data. By using data that is normally available at the location where the goods or services are provided, learning is possible without using external data. Of course, learning may also be performed using weather data or other data that may be related to the demand for the goods or services.
[0016] A prediction method of one embodiment of the present disclosure is a prediction method for predicting demand for a good or service at a specific location, and includes the steps of: creating, by a computer, feature data from sales performance at the specific location that is identical to the feature data used in training a learning model trained by any of the above-mentioned learning methods; inputting, by the computer, the created feature data into the learning model; and outputting data indicating demand obtained from the learning model.
[0017] A prediction device according to one embodiment of the present disclosure is a prediction device that predicts demand for a good or service in a specific location, and includes a creation unit that creates, from sales records at the specific location, at least one type of feature data used in learning a learning model trained by any of the above-mentioned learning methods, including feature data related to the calendar of the day on which the good or service is provided, statistics related to the good or service in the sales record, and feature data related to the sales amount of the good or service; an input unit that inputs the created feature data into the learning model; and an output unit that outputs data indicating demand obtained from the learning model.
[0018] A computer program according to one embodiment of the present disclosure is a computer program that causes a computer to predict demand for a good or service at a specific location, and causes the computer to execute the steps of: creating, from sales performance at the specific location, at least one type of feature data used in learning of a learning model that uses data regarding the provision of a good or service at a specific location as input data and outputs data indicating demand for the good or service, the feature data being at least one type of feature data selected from features related to the calendar of the day the good or service is provided, statistics related to the good or service in sales performance, and features related to the sales amount of the good or service; inputting the created feature data into the learning model; and outputting data indicating demand obtained from the learning model.
[0019] In the prediction method disclosed herein, the feature values used in the learning model, which has been trained using the created feature values, are similarly created and input for the period to be predicted, and data indicating demand obtained from the learning model is used as the prediction result. The prediction method disclosed herein does not use the feature values of the sales record themselves, but rather extracts or calculates the necessary feature values from the sales record to create feature value data, and uses the created feature values. This improves the prediction accuracy.
[0020] In a prediction method of one embodiment of the present disclosure, the learning model outputs an importance coefficient for each input feature data, and the computer extracts feature data having an importance equal to or greater than a predetermined value based on the importance coefficient, and outputs data indicating demand obtained from the learning model together with the extracted feature data.
[0021] In the prediction method of the present disclosure, information on the feature quantities that had a large influence in the learning is output, and the provider of the goods or service can understand what data, such as whether it is a specific date on the calendar, has a large influence on the demand. Effect of the Invention
[0022] According to the learning method, learning model, prediction method, prediction device, and computer program disclosed herein, demand forecasting can be achieved with high accuracy by learning using appropriately created features, without the need to collect many types of data. [Brief description of the drawings]
[0023] [Figure 1] FIG. 1 is a schematic diagram of a prediction device according to the present disclosure. [Diagram 2] 1 is a block diagram showing a configuration of a prediction device according to a first embodiment. [Diagram 3] FIG. 1 is a schematic diagram of an example of a learning algorithm; [Figure 4] 13 is a flowchart showing an example of a learning process procedure of a learning algorithm. [Diagram 5] 13 is a flowchart illustrating an example of a prediction process procedure performed by the prediction device. [Figure 6] FIG. 13 is a diagram illustrating a display example of predicted data. [Figure 7] FIG. 13 is a block diagram showing the configurations of a prediction device and a terminal device according to a second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0024] Hereinafter, a learning method, a learning model, a prediction method, a prediction device, and a computer program according to the present application will be described with reference to the drawings showing embodiments.
[0025] (First embodiment) FIG. 1 is a schematic diagram of a prediction device 1 according to the present disclosure. The prediction device 1 is connected to a counting device 2 installed in a store that sells goods or a store that provides services. The prediction device 1 is a device that predicts demand based on sales results counted by the counting device 2. Examples of demand include the number of visitors or the number of sales during a set period. In the following description, the counting device 2 is a POS (Point Of Sales) system, and the sales results are POS data. In this embodiment, the prediction device 1 and the counting device 2 are installed in each store as shown in FIG. 1, and demand is predicted for each individual store. Note that this is not limited to this, and while the counting device 2 is installed in each store, one prediction device 1 may communicate with the counting device 2 of each store and centrally manage the POS data of each store. In addition, one demand forecast may be performed for the entire multiple stores by centralizing the POS data of multiple stores. However, since the feature values described later often differ depending on the store, it is preferable to predict demand for each store.
[0026] The prediction device 1 of the present disclosure predicts demand by machine learning using POS data corresponding to sales results as input data. In the following description, the prediction device 1 predicts the number of visitors per day to one store as demand. Of course, the demand predicted by the prediction device 1 is not limited to the number of visitors, and the prediction target (type of prediction target) may be different, such as the number of sales items or the number of visiting groups. In addition, the prediction period (prediction target period) may be different, such as the number of visitors per week or the average number of visitors over three days. Furthermore, in this embodiment, the prediction device 1 predicts the number of visitors one day ahead, but is not limited thereto, and may predict the number of visitors more than one day ahead, one week ahead, four weeks (28 days) ahead, etc.
[0027] 2 is a block diagram showing the configuration of the prediction device 1 of the first embodiment. The prediction device 1 is a personal computer or a server computer. In the following description, the prediction device 1 is described as being configured by one computer, but may be configured in a manner in which a plurality of computers are communicatively connected via a network to perform distributed processing. The prediction device 1 may be realized as a part of the functions of a computer that also has other uses.
[0028] The prediction device 1 includes a processing unit 10, a storage unit 11, a communication unit 12, a display unit 13, an operation unit 14, and the like.
[0029] The processing unit 10 is a processor using a CPU (Central Processing Unit) and / or a GPU (Graphics Processing Unit). The processing unit 10 executes a prediction process based on a prediction program 1P and a learning algorithm (learning model) 1L stored in a storage unit 11.
[0030] The storage unit 11 uses a non-volatile memory such as a hard disk, a flash memory, or an SSD (Solid State Drive). The storage unit 11 stores data referenced by the processing unit 10. The storage unit 11 stores a prediction program 1P. The storage unit 11 stores a learning algorithm 1L. The prediction program 1P and / or the learning algorithm 1L may be a prediction program 9P and / or a learning algorithm 9L stored in a recording medium 9 that is read by the processing unit 10 and copied to the storage unit 11.
[0031] The learning algorithm 1L includes a library group for implementing machine learning and learned parameters. The learning algorithm 1L is trained to output forecast data of demand for a specified period when input data obtained based on POS data as described below is input. In the first embodiment, the learning algorithm 1L uses, for example, LightGBM (Light Gradient Boosting Machine). The learning algorithm 1L may be other supervised learning algorithms that realize machine learning based on a decision tree, but it is more preferable to use gradient boosting or a leaf-wise algorithm.
[0032] The input POS data is stored in the storage unit 11. The POS data is stored for a set period (for example, 10 years, 4 years, 1 year, half a year, 3 months, etc.).
[0033] The communication unit 12 realizes communication with the POS system via the local network. Specifically, the communication unit 12 is, for example, a network card. The communication unit 12 may be a serial communication interface. The communication unit 12 may be a wireless communication module. The processing unit 10 reads POS data from the POS system via the communication unit 12 and stores the data in the memory unit 11.
[0034] The display unit 13 is a display such as a liquid crystal display or an organic EL (Electro Luminescence) display. The display unit 13 displays a screen including the results of the prediction. This screen may include an interface that accepts settings for the prediction. The display unit 13 may be a display with a built-in touch panel.
[0035] The operation unit 14 is a user interface such as a keyboard and a pointing device capable of inputting and outputting data to and from the processing unit 10. The operation unit 14 may be a voice input unit. The operation unit 14 may be a touch panel of the display unit 13. The operation unit 14 may be a physical button.
[0036] The prediction device 1 configured in this way predicts demand (number of customers per day) for a specified period (one day ahead, one week ahead, one month ahead) using POS data acquired from the POS system, and displays the prediction result on the display unit 13. As described below, the prediction device 1 does not input the POS data directly into the learning algorithm 1L, but executes feature engineering to extract appropriate features from the POS data based on the prediction program 1P and create feature data. The prediction device 1 inputs the input data obtained by the feature engineering into the learning algorithm 1L, and acquires and outputs demand data derived by the learning algorithm 1L.
[0037] Fig. 3 is a schematic diagram of an example of the learning algorithm 1L, and Fig. 4 is a flowchart showing an example of the learning process procedure of the learning algorithm 1L. The learning algorithm 1L is a Leaf-Wise decision tree algorithm. The explanatory variables and the target variables are set in the learning algorithm 1L so that when feature data (explanatory variables) based on POS data is input, the learning algorithm 1L outputs a predicted number of customers (target variable) on a date to be predicted (i.e., a date on which goods or services are provided at a specific location).
[0038] The processing unit 10 executes the processing procedure shown below every day. The execution frequency may be configurable. In this case, the execution frequency is determined, for example, based on the designated prediction period and the period of the demand to be predicted (per day in this embodiment). If the designated prediction period is one day ahead, the execution frequency may be determined to be daily, if it is one week ahead, the execution frequency may be determined to be at least once a week, if it is one month (4 weeks, 5 weeks) ahead, the execution frequency may be determined to be at least once a month. Note that if the demand to be predicted is the number of customers per week, not the number of customers per day, the execution frequency is determined to be once a week at the shortest.
[0039] The processing unit 10 reads out POS data for a predetermined period (for example, four years) from the storage unit 11 (step S101). The processing unit 10 may obtain the POS data in units that match the cycles of the calendar, such as yearly, monthly, or seasonal units.
[0040] The POS data includes, for example, the date and time of the sale, the receipt number, the department code, the department name, the classification code, the classification name, the product code, the product name, the sales amount, and the number of items sold, etc. It is not essential that all of these are used as the POS data, and only a part of these may be used as the POS data, or other elements may be used as the POS data.
[0041] The processing unit 10 generates, for each day, multiple calendar-related features, statistics regarding the demand to be predicted (here, the number of visitors), and features regarding the sales amount from the read POS data through feature engineering (step S102).
[0042] In the feature engineering in step S102, the processing unit 10 creates a feature of binary values (TRUE or FALSE) indicating whether the day on which the product or service is provided at the store (the day to be predicted) corresponds to a specific day on the calendar, such as "whether it is a holiday," "whether it is a Saturday, Sunday, or holiday," "whether it is the year-end and New Year period," "whether it is during a long holiday," "whether it is during a long holiday in a foreign country," "whether it is the day before a holiday," "whether it is the first day of the month," "whether it is the last day of the month," "whether it is the start day of a quarter," "whether it is the last day of a quarter," "whether it is a payday," etc., as the feature of the calendar, the processing unit 10 creates a feature of continuous values (non-binary values) indicating the features of the calendar on the day on which the product or service is provided at the store, such as "number of consecutive holidays," "number of days from payday (by payday)," "N whether it is the Nth day of the week in the month," "value of a cosine function with a 365-day cycle," "value of a cosine function with a 7-day cycle," "percentage of the year," "logarithm of the percentage of the year." For example, if the "Nth day of the week in a month" is the third Wednesday, then the feature value is "3.0." For example, if the "value of the cosine function with a 365-day cycle" corresponds to 1 / 4 of the year, then the feature value is "1.0," if it corresponds to 1 / 2 of the year, then the feature value is "0.0," and if it corresponds to 3 / 4 of the year, then the feature value is "-1.0."
[0043] Similarly, in the feature engineering in step S102, the processing unit 10 creates average feature values of the actual number of visitors to be predicted in a recent specific period, such as the "average number of visitors in one week," "average number of visitors in four weeks," and "average number of visitors in two months" as statistics related to the number of visitors. The processing unit 10 creates feature values of the actual number of visitors to be predicted on a day with the same attributes (day of the week, month) on the calendar as the day on which the product or service is provided in the store, such as the "number of visitors one week ago (four weeks ago)," "number of visitors 52 weeks ago," "median number of visitors for the same day of the week for four weeks," "standard deviation for the same day of the week for four weeks," "maximum number of visitors for the same day of the week for four weeks," "minimum number of visitors for the same day of the week for four weeks," and "difference between the average number of visitors for the same day of the week for four weeks and the average number of visitors for four weeks." The processing unit 10 creates features related to the trend (tendency of change) of the actual number of visitors to be predicted, such as "the difference between the average number of visitors over one week and the average number of visitors over four weeks," "the number of visitors two days ago," "the number of visitors on the previous business day," "the standard deviation of the number of visitors over one week," and "the standard deviation of the number of visitors over four weeks."
[0044] Similarly, in the feature engineering in step S102, the processing unit 10 creates a feature of the most recent (most recent input data) cash payment ratio, such as "cash transaction count (number of receipts paid in cash) / number of customers per day (number of receipts) averaged over four weeks" as a feature related to the sales amount. The processing unit 10 creates a feature of the actual value of the number of customers related to the influence of the most recent discount, such as "average of {(number of discounted groups (number of receipts with discounts)+number of discounted groups (number of receipts with discounts)) / number of customers per day} over three days," "average of {(number of discounted groups+number of discounted groups+number of promotional groups (number of groups that visited due to promotions)) / number of customers per day} over four weeks," and "average of {(number of discounted groups+number of discounted groups+number of promotional groups+number of takeout discounts) / number of customers per day} over four weeks." The processing unit 10 creates features of actual values related to the most recent average customer spending, such as "three-day average of sales amount / number of visitors" and "three-day average of number of visitors per group (number of visitors / number of visiting groups)."
[0045] The processing unit 10 executes learning of the learning algorithm 1L using the training data with the feature data for each day generated in step S102 as input data and the actual number of visitors on that day as the objective variable (step S103), and terminates the learning process.
[0046] In the learning in step S103, the processing unit 10 may use the most recent data in a unit (month) smaller than the unit (year) of the predetermined period corresponding to the data read in step S101 for validation of the number of learning times, which is called iteration, round number, cycle number, etc. For example, when the processing unit 10 reads POS data for four years in step S101, the processing unit 10 designates the data of the feature amount of each day for three years and eleven months and the actual number of visitors as teacher data in step S103, and the data of the feature amount of each day for one month and the actual number of visitors as test data. The processing unit 10 may derive an evaluation function for each number of learning times from the test data, and execute learning by determining the optimal number of learning times. In step S103, the processing unit 10 may designate a hyperparameter in the learning algorithm 1L, for example, the depth of a decision tree.
[0047] In the learning in step S103, the learning algorithm 1L creates branching conditions for predicting a target variable when input feature amount data (input data) is used as an explanatory variable, and creates a decision tree.
[0048] Through the process shown in the flowchart of FIG. 4, the processing unit 10 creates a learning algorithm 1L for predicting the number of visitors per day in a specified period, for example, every day.
[0049] 4, in steps S101 and S102, the processing unit 10 may read only the newly added POS data, generate features for each day during the added period, and store the generated features in association with data identifying the date. The processing unit 10 may accumulate data generated by feature engineering processing in the storage unit 11 and then use the data, without using the POS data itself.
[0050] 5 is a flowchart showing an example of a prediction processing procedure by the prediction device 1. The processing unit 10 executes the following processing, for example, every day.
[0051] The processing unit 10 reads out the POS data acquired up to the previous day from the storage unit 11 (step S201).
[0052] The processing unit 10 creates features (calendar-related features, demand-related statistics, and sales amount-related features) for the period (one day) of the demand to be forecasted, similar to the features used during learning, from the POS data read out in step S201, by feature engineering (step S202).
[0053] The processing unit 10 reads out the learning algorithm 1L that has been learned using the POS data up to the previous day (step S203).
[0054] The processing unit 10 inputs the feature amount data created in step S202 to the learning algorithm 1L read out in step S203 (step S204), and obtains prediction data obtained from the learning algorithm 1L (step S205).
[0055] The processing unit 10 extracts data on features determined to have a predetermined importance or more in the learning algorithm 1L in step S203 (step S206). In the learning algorithm 1L using LightGBM, a coefficient of importance for each feature is obtained, so the processing unit 10 calculates the ratio of the coefficient to the sum of the obtained coefficients as the importance, and extracts data on features with an importance equal to or more than a predetermined value together with the importance.
[0056] The processing unit 10 stores the obtained prediction data and feature amount data in the storage unit 11 in association with data indicating the date of the prediction target (step S207).
[0057] The processing unit 10 judges whether the necessary amount of predicted data has been stored (step S208). In step S208, the processing unit 10 may judge whether all the predicted data for the next day has been stored, or may count the predicted data. In step S208, the processing unit 10 may judge whether the predicted data for the next month (28 days) has been stored. In step S208, the processing unit 10 may judge whether it is a specified day to be counted. For example, when one month (4 weeks) ahead is specified as the date to be predicted, the specified day may be the day one week before the last day of each month. If it is judged that the data has not been stored (S208: NO), the processing unit 10 ends the processing and ends the processing for that day.
[0058] If it is determined in step S208 that the data has been stored (S208: YES), the processing unit 10 reads out the necessary amount of predicted data, for example, one month's worth of predicted data in association with the date when one month (four weeks) ahead is specified (step S209). The processing unit 10 plots the read predicted data against the date and outputs the data to the display unit 13 (step S210), and outputs the extracted data of the feature amount having a predetermined importance or higher together with the plot of the predicted data to the display unit 13 (step S211), and ends the process.
[0059] Fig. 6 is a diagram showing a display example of predicted data. Fig. 6 shows a graph 131 with the horizontal axis representing the date and the vertical axis representing the number of visitors, which is a target variable, and data on the feature amount extracted during the period of the graph. And heavy A list 132 is shown in which the degree of necessity is associated with the number of customers. Graph 131 shows the value of predicted data and its trend with a solid line, and actual data with black circles. Graph 131 may also show the absolute value of the number of customers for each day, and the increase or decrease from one month or three months ago. This allows the manager of each store to estimate the number of staff, materials, etc. for the next month.
[0060] Compared to simply inputting POS data into learning algorithm 1L, accuracy was improved by using feature engineering to create binary features indicating whether the date to be predicted (the date on which the goods or services are provided) falls on a specific day, and continuous features indicating the calendar characteristics of the date to be predicted. Despite events that were difficult to predict, such as requests for business closures from the national and local governments in 2020, it was confirmed that accuracy improved for certain types of stores, from 42.7% to 49.6%, 61.1% to 66.1%, 49.4% to 62.1%, 50.3% to 55.8%, and 56.5% to 60.7%, etc. In addition, the importance of features such as "whether it is a weekend or public holiday," "median number of customers in the same four-week period," "percentage of customers over the year," "value of the cosine function with a 365-day cycle," "number of consecutive holidays," and "number of customers 52 weeks ago" tended to be calculated as high. In feature engineering, explanatory variables that represent the periodic characteristics of the calendar of the date to be predicted were highly important. Additionally, for stores with different business formats, it was confirmed that the accuracy improved from 40.3% to 60.6%, 44.9% to 64.5%, 45.4% to 63.6%, 47.0% to 64.5%, 42.3% to 58.5%, etc. The importance of the features "whether it is a weekend or public holiday", "number of consecutive holidays", "number of customers 52 weeks prior", "number of customers on the previous business day", "number of customers two days prior", and "average number of customers in the week from two days prior" tended to be calculated as high.
[0061] Second Embodiment 7 is a block diagram showing the configuration of the prediction device 3 and the terminal device 4 in the second embodiment. This is a block diagram showing the configuration of the prediction device 3 in the second embodiment. The configuration of the prediction device 3 in the second embodiment is the same as that in the first embodiment, except that, as shown below, the prediction device 3 and the terminal device 4 are in a server and client format.
[0062] In the second embodiment, the prediction device 3 is a so-called cloud server that can transmit and receive data to and from terminal devices 4 installed in each store or each group by communication via the Internet. The prediction device 3 uses a server computer. The prediction device 3 may be configured to perform distributed processing by connecting a plurality of computers to each other via a network.
[0063] The prediction device 3 includes a processing unit 30, a storage unit 31, and a communication unit 32. The processing unit 30 is a processor using a CPU and / or a GPU. The processing unit 30 executes a prediction process based on a prediction program 3P and a learning algorithm 3L stored in the storage unit 31.
[0064] The storage unit 31 uses a non-volatile memory such as a hard disk, a flash memory, or an SSD. The storage unit 31 stores data referenced by the processing unit 30. The storage unit 31 stores a prediction program 3P. The storage unit 31 stores a learning algorithm 3L. The prediction program 3P and / or the learning algorithm 3L may be a prediction program 8P and / or a learning algorithm 8L stored in the recording medium 8 that the processing unit 30 reads out and copies to the storage unit 31.
[0065] The learning algorithm 3L is data including a library group for implementing machine learning using LightGBM similar to the learning algorithm 1L of the first embodiment, and learned parameters.
[0066] The storage unit 31 stores the POS data collected from each of the multiple terminal devices 4 for each department code and for each source terminal device 4. The storage period for the POS data is set in the same manner as in the first embodiment.
[0067] The communication unit 32 realizes communication with the terminal device 4 via a network including the Internet. Specifically, the communication unit 32 is a network card. The processing unit 30 collects POS data from the terminal device 4 via the communication unit 32 and stores the data in the storage unit 31.
[0068] The terminal device 4 is a personal computer. It may be a desktop type, a laptop type, a tablet terminal, or a smartphone. The terminal device 4 includes a processing unit 40, a storage unit 41, a first communication unit 42, a second communication unit 43, a display unit 44, and an operation unit 45. The terminal device 4 can be connected to a POS system of a store via a local network (which may be the Internet).
[0069] The processing unit 40 is a CPU, and executes processing based on the terminal program 4P stored in the storage unit 41. The processing unit 40 transmits POS data acquired from the POS system via the second communication unit 43 to the prediction device 3 from the first communication unit 42 in association with identification data for identifying the terminal device 4. The processing unit 40 receives the results of the prediction process in the prediction device 3 (prediction data and feature amount data).
[0070] The storage unit 41 uses a non-volatile memory such as a hard disk, a flash memory, or an SSD. The storage unit 41 stores the terminal program 4P. The storage unit 41 stores POS data. The storage unit 41 stores the result of the prediction process received from the prediction device 3.
[0071] The first communication unit 42 realizes a communication connection with the prediction device 3. The first communication unit 42 is a network card or a wireless communication module.
[0072] The second communication unit 43 realizes communication with the POS system via the local network. The second communication unit 43 may be a network card, a wireless communication module, or a serial communication interface. The processing unit 40 can communicate with the POS system via the second communication unit 43.
[0073] The display unit 44 is a display such as a liquid crystal display or an organic electroluminescence display. The display unit 44 displays a screen including the results of the prediction. This screen may include an interface that accepts settings for the prediction. The display unit 44 may be a display with a built-in touch panel.
[0074] The operation unit 45 is a user interface such as a keyboard and a pointing device capable of inputting and outputting data to and from the processing unit 40. The operation unit 45 may be a voice input unit. The operation unit 45 may be a touch panel of the display unit 44. The operation unit 45 may be a physical button.
[0075] The prediction device 3 in the second embodiment does not directly acquire POS data from the POS system, but receives it from the terminal device 4, and other than that, executes the same learning process as that shown in the flowchart of Fig. 4 in the first embodiment, and therefore a detailed description thereof will be omitted here. Also, the prediction device 3 in the second embodiment executes the same prediction process as that shown in the flowchart of Fig. 5 in the first embodiment, and other than that, displays the prediction result on the display unit 44 of the terminal device 4, and therefore a detailed description thereof will be omitted here.
[0076] As shown in the first and second embodiments, the prediction device 1 (3) uses feature engineering to create features such as calendar-related features including whether the date to be predicted falls on a specific calendar day, the average of the target variable in the most recent specific period, and the target variable for days with the same attributes (day of the week, month) on the calendar as the date to be predicted. This can improve the accuracy of prediction by the learning algorithm 1L (3L), which is a decision tree algorithm.
[0077] (Modification) In the first and second embodiments, the prediction target based on POS data is the demand such as the number of visitors to a store or the number of sales, but is not limited to this. Instead of POS data, the prediction target may be, for example, location information obtained from a smartphone or mobile phone carried by each person, the time distribution of the number of times passing through an automatic ticket gate at each station in a transportation facility, or the result of a survey of the number of pedestrians in a city. These data are behavior data of people in a specific location (store, station, city). The prediction target may not be the number of visitors or the number of sales, but may be information that is correlated with calendar features like the number of visitors, such as the number of visitors or the number of pedestrians. The information of these prediction targets is the behavior of people who come to a specific location with some purpose, and can be said to be the demand for goods or services provided at a specific location.
[0078] The embodiments disclosed above are illustrative in all respects and are not restrictive. The scope of the present invention is defined by the claims, and includes all modifications within the meaning and scope of the claims. [Explanation of symbols]
[0079] 1 Prediction device 10 Processing section 11 Storage section 1P Prediction Program 1L Learning Algorithm (Learning Model) 13 Display section
Claims
1. A learning method in which a computer learns a learning model that uses data related to the provision of a product or service at a specific location as input data and outputs data indicating demand for the product or service, using data corresponding to the input data and data indicating the demand, which are created based on sales records of the product or service, as training data, The computer, creating feature data from the sales performance, the feature data including a feature related to a periodic position in a calendar of a target date on which the product or service is provided, and a statistic related to a sales performance value of the product or service prior to the target date on a date having the same periodic position; and A step of using the feature amount data created for the target date as input data, using data indicating demand on the target date as a response variable, and executing learning of the learning model by changing the target date. Learning methods including:
2. Among the feature data, a feature relating to a periodic position of the target day in a calendar is A continuous value characteristic of the periodic position in the calendar of days on which the goods or services are provided The learning method according to claim 1 .
3. Among the feature data, the statistics regarding the actual value of the sales performance include statistics of the actual value of the sales performance on the same day of the week on the calendar as the day on which the product or service is provided. The learning method according to claim 1 .
4. The sales performance is point-of-sale data regarding goods or services at the particular location. The learning method according to any one of claims 1 to 3.
5. 1. A method of forecasting demand for a good or service at a particular location, comprising: The computer, creating new feature data, which is the same as the feature data used in training a learning model trained by the training method according to any one of claims 1 to 4, from sales records in the specific location; inputting the generated new feature data into the learning model; and outputting data indicating demand obtained from the learning model; A forecasting method that performs processing including:
6. The learning model further outputs a coefficient of importance for each of the input feature data; The computer includes: extracting feature quantity data having an importance equal to or greater than a predetermined value based on the importance coefficient; Data indicating demand obtained from the learning model is output together with the extracted feature amount data. The prediction method according to claim 5.
7. A forecasting device for forecasting demand for a product or service at a particular location, comprising: a creation unit that creates new feature data from the sales performance at the specific location, the new feature data being the same type as the feature data used in training a learning model trained by the training method according to claim 1, the new feature data including a feature related to a periodic position in a calendar of a target day on which the product or service is provided, and statistics related to actual sales values of the product or service prior to the target day on a day that has the same periodic position; an input unit that inputs the newly created feature data into the learning model; an output unit that outputs data indicating demand obtained from the learning model; A prediction device comprising:
8. A computer program for causing a computer to learn a learning model that receives data on the provision of a product or service at a specific location as input data and outputs data indicating demand for the product or service, using data corresponding to the input data and data indicating the demand, the data being created based on sales performance of the product or service, as training data, The computer includes: creating feature data from the sales performance, the feature data including a feature related to a periodic position in a calendar of a target date on which the product or service is provided, and a statistic related to a sales performance value of the product or service prior to the target date on a date having the same periodic position; and A step of using the feature amount data created for the target date as input data, using data indicating demand on the target date as a response variable, and executing learning of the learning model by changing the target date. A computer program that executes the following:
9. 1. A computer program for causing a computer to forecast demand for a good or service at a particular location, comprising: The computer includes: creating new feature data from the sales record at the specific location, the new feature data being the same type as the feature data used in training a learning model that uses data on the provision of a product or service at a specific location as input data and outputs data indicating demand for the product or service, the new feature data including a feature related to a periodic position in a calendar of a target day on which the product or service is provided, and statistics related to actual sales values of the product or service prior to the target day that are in the same periodic position; inputting the generated new feature data into the learning model; and outputting data indicating demand obtained from the learning model; A computer program that executes the following:
Citation Information
Patent Citations
Method and device for forecasting number of visiting customers
JP1992000596A
Learning system, method, and program
WO2016151640A1
Information processing system, information processing method, and storage medium
WO2019187968A1