Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7666966B2 - Learning method, learning model, prediction method, prediction device, and computer program - Google Patents
[go: Go Back, main page]

JP7666966B2 - Learning method, learning model, prediction method, prediction device, and computer program - Google Patents

Learning method, learning model, prediction method, prediction device, and computer program Download PDF

Info

Publication number
JP7666966B2
JP7666966B2 JP2021058145A JP2021058145A JP7666966B2 JP 7666966 B2 JP7666966 B2 JP 7666966B2 JP 2021058145 A JP2021058145 A JP 2021058145A JP 2021058145 A JP2021058145 A JP 2021058145A JP 7666966 B2 JP7666966 B2 JP 7666966B2
Authority
JP
Japan
Prior art keywords
data
service
product
learning
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021058145A
Other languages
Japanese (ja)
Other versions
JP2022154885A (en
Inventor
嗣瑠 笠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ogis Ri Co Ltd
Original Assignee
Ogis Ri Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ogis Ri Co Ltd filed Critical Ogis Ri Co Ltd
Priority to JP2021058145A priority Critical patent/JP7666966B2/en
Publication of JP2022154885A publication Critical patent/JP2022154885A/en
Application granted granted Critical
Publication of JP7666966B2 publication Critical patent/JP7666966B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Description

本発明は、需要予測に関し、より高い精度での予測を実現する学習方法、学習モデル、予測方法、予測装置、及びコンピュータプログラムに関する。 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 more accurate forecasting.

物品の販売、及び物品提供サービスの事業にとって、原材料及び資材の調達、並びに人的資源の確保のための需要予測は重要である。従来、多様な方法で来客数の予測、商品の販売予測等がなされてきた(特許文献1)。 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. Traditionally, there have been a variety of methods for forecasting the number of visitors and product sales (Patent Document 1).

需要予測では、指数平滑手法、移動平均法、あるいは重回帰分析など多様なモデルを用いた学習が用いられてきた。演算資源の進歩によって深層学習を用いた予測方法も提案されている。 In demand forecasting, learning using a variety of models such as exponential smoothing, moving average methods, and multiple regression analysis has been used. With advances in computing resources, forecasting methods using deep learning have also been proposed.

特開平4-000596号公報Japanese Patent Application Publication No. 4-000596

従来の予測方法においては、どのようなパラメータが精度向上に寄与しているのかが検討されてきた。例えば特許文献1では、天候、曜日、季節、気温、キャンペーンの有無等をデータとして入力して重回帰分析が実行される。 In conventional prediction methods, the parameters that contribute to improving accuracy have been examined. 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 campaigns.

多数のデータを取得して分析、学習して予測することにより、精度が向上する場合があるが、結果の出力に要する時間、又はデータの取得に必要なコストが増大する。 Accuracy may improve 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.

本発明は、多くの種類のデータを収集することを必要とせずに、高い精度で需要予測を実現する学習方法、学習モデル、予測方法、予測装置、及びコンピュータプログラムを提供することを目的とする。 The present invention aims to provide a learning method, a learning model, a forecasting method, a forecasting device, and a computer program that realizes highly accurate demand forecasting without the need to collect many types of data.

本開示の一実施形態の学習方法は、特定の場所での物品又はサービスの提供に関するデータを入力データとして、前記物品又はサービスへの需要を示すデータを出力する学習モデルに、前記物品又はサービスの販売実績を教師データとして用いて学習させる学習方法であって、前記物品又はサービスが提供される日の暦に関する特徴量と、前記販売実績における前記物品又はサービスに関する統計量と、前記物品又はサービスの売上金額に関する特徴量との内の少なくとも1つの種類の特徴量データを前記販売実績から作成するステップ、及び、作成した特徴量データを入力データとして前記学習モデルの学習を実行するステップを含む。 A learning method according to an embodiment of the present disclosure is a learning method that uses data related to the provision of goods or services at a specific location as input data and causes a learning model that outputs data indicating demand for the goods or services to learn using sales records of the goods or services as training data, and includes the steps 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 goods or services are provided, statistics related to the goods or services in the sales records, and features related to the sales amount of the goods or services, and executing learning of the learning model using the created feature data as input data.

本開示の一実施形態の学習モデルは、コンピュータが特定の場所での物品又はサービスの提供に関するデータを入力した場合に、前記物品又はサービスへの需要を示すデータを得られるべく学習される学習モデルであって、前記物品又はサービスの販売実績から作成される特徴量データであって、前記物品又はサービスが提供される日の暦に関する特徴量と、前記販売実績における前記物品又はサービスに関する統計量と、前記物品又はサービスの売上金額に関する特徴量との内の少なくとも1つの種類の特徴量データを入力データとし、前記販売実績における前記需要を示すデータを目的変数として学習する。 The 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 the sales history of the item or service, with at least one type of feature data being input data among feature data related to the calendar of the day the item or service is provided, statistics related to the item or service in the sales history, and feature data related to the sales amount of the item or service, and the data indicating the demand in the sales history being used as a target variable.

本開示の一実施形態のコンピュータプログラムは、コンピュータに、特定の場所での物品又はサービスの提供に関するデータを入力データとして、前記物品又はサービスへの需要を示すデータを出力する学習モデルを、前記物品又はサービスの販売実績を教師データとして用いて、学習させるコンピュータプログラムであって、前記コンピュータに、前記物品又はサービスが提供される日の暦に関する特徴量と、前記販売実績における前記物品又はサービスに関する統計量と、前記物品又はサービスの売上金額に関する特徴量との内の少なくとも1つの種類の特徴量データを作成するステップ、及び、作成した特徴量データを入力データとして前記学習モデルの学習を実行するステップを実行させる。 A computer program according to an embodiment of the present disclosure is a computer program that causes a computer to learn a learning model that uses data relating to the provision of an item or service at a specific location as input data and outputs data indicating demand for the item or service, using sales records of the item or service as training data, and causes the computer to execute a step of creating at least one type of feature data among features relating to the calendar of the day the item or service is provided, statistics relating to the item or service in the sales records, and features relating 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.

本開示の学習方法では、需要を予測するために用いる学習モデル(学習アルゴリズム)へ入力するデータに対する前処理として、販売実績に対する特徴量エンジニアリングが実行される。特徴量エンジニアリングでは、物品又はサービスが提供される日の暦における特徴、例えば何曜日なのか、土日祝日等の休暇に当たる日なのかによって、提供される物品の数、提供を受ける人の人数等が影響されることから、特徴量として作成される。また、物品又はサービスの販売数に関するトレンド、客単価、割引の有無等のデータも特徴量として使用することによって、精度向上が見込まれる。 In the learning method disclosed herein, feature engineering is performed on sales performance as preprocessing of data to be input into a learning model (learning algorithm) used to predict demand. In feature engineering, features are created based on the calendar characteristics of the day on which the goods or services are provided, such as the day of the week or whether it is a holiday such as a weekend or a national holiday, since these affect the number of goods provided, the number of people receiving them, etc. In addition, accuracy is expected to improve by using data such as trends in the number of goods or services sold, the average customer price, and the presence or absence of discounts as features.

本開示の一実施形態の学習方法は、前記特徴量データは、前記物品又はサービスが提供される日が暦上の特定日に当たるか否かの二値、前記物品又はサービスが提供される日の暦における特徴を示す連続値、前記物品又はサービスの実績値の直近特定期間における平均、前記物品又はサービスが提供される日と暦上の同じ曜日の日における実績値、及び、前記物品又はサービスの値引きの影響に関する実績値のいずれか1つを含んでもよい。 In the learning method of one embodiment of the present disclosure, the feature data may include any one of a binary value indicating whether the date on which the product or service is provided falls on a specific calendar day, a continuous value indicating the calendar feature of the date on which the product or service is provided, an average of the performance values of the product or service in the most recent specific period, a performance value for the same day of the week on the calendar as the date on which the product or service is provided, and a performance value relating to the impact of a discount on the product or service.

本開示の学習方法では、特徴量データは、休暇、大型連休、給与日等の特定日に当たるか否か、年間における何日目なのか、1年、1ヶ月、1週間という暦に存在する周期上のどのあたりに位置するのかを示す連続値(周期を三角関数で表した場合の数値)が含まれる。特徴量データは、直近特定期間における平均等のトレンドに関するデータを含んでもよいし、暦上の同じ属性における実際の需要が含まれてもよい。これらのデータを特徴量とすることによって精度向上が見込まれる。 In the learning method disclosed herein, the feature data includes continuous values (numerical values when the cycle is expressed as a trigonometric function) that indicate whether or not a particular day, such as a holiday, long weekend, or payday, which day in the year it is, and where it is located on a cycle that exists in the calendar, such as a year, a month, or a week. The feature data may include data on trends, such as averages, over the most recent specific period, or may include actual demand for the same attributes on the calendar. By using these data as features, it is expected that accuracy will improve.

本開示の一実施形態の学習方法は、前記販売実績は、前記特定の場所における物品又はサービスに関するPOSデータである。 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.

本開示の学習方法では、特徴量データの元になるデータは、POSデータである。物品又はサービスが提供される場所で通常取得できるデータを用いることで、外部のデータを使用せずに学習が可能である。勿論、物品又はサービスの需要に関連する可能性のある天候等のデータを使用して学習してもよい。 In the learning method disclosed herein, the data that is the source of the feature data 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 data such as weather that may be related to demand for goods or services.

本開示の一実施形態の予測方法は、特定の場所での物品又はサービスへの需要を予測する予測方法であって、上述のいずれかの学習方法によって学習された学習モデルの学習で使用された前記特徴量データと同一の特徴量データを、コンピュータにより、前記特定の場所における販売実績から作成するステップ、前記コンピュータが、作成された特徴量データを、前記学習モデルへ入力するステップ、及び、前記学習モデルから得られる需要を示すデータを出力するステップを含む。 A prediction method according to one embodiment of the present disclosure is a method for predicting demand for goods or services in a specific location, and includes the steps of: creating, by a computer, feature data identical to the feature data used in training a learning model trained by any of the above-mentioned learning methods, from sales performance in the specific location; inputting, by the computer, the created feature data into the learning model; and outputting data indicating demand obtained from the learning model.

本開示の一実施形態の予測装置は、特定の場所での物品又はサービスへの需要を予測する予測装置であって、上述のいずれかの学習方法によって学習された学習モデルの学習で使用された特徴量データであって、前記物品又はサービスが提供される日の暦に関する特徴量と、前記販売実績における前記物品又はサービスに関する統計量と、前記物品又はサービスの売上金額に関する特徴量との内の少なくとも1つの種類の特徴量データを、前記特定の場所における販売実績から作成する作成部と、作成された特徴量データを、前記学習モデルへ入力する入力部と、前記学習モデルから得られる需要を示すデータを出力する出力部とを備える。 A prediction device according to an embodiment of the present disclosure is a prediction device that predicts demand for goods or services 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 training a learning model trained by any of the above-mentioned learning methods, feature data related to the calendar of the day the goods or services are provided, statistics related to the goods or services in the sales records, and feature data related to the sales amount of the goods or services; 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.

本開示の一実施形態のコンピュータプログラムは、コンピュータに、特定の場所での物品又はサービスへの需要を予測させるコンピュータプログラムであって、前記コンピュータに、特定の場所での物品又はサービスの提供に関するデータを入力データとして、前記物品又はサービスへの需要を示すデータを出力する学習モデルの学習で使用された特徴量データであって、前記物品又はサービスが提供される日の暦に関する特徴量と、販売実績における前記物品又はサービスに関する統計量と、前記物品又はサービスの売上金額に関する特徴量との内の少なくとも1つの種類の特徴量データを、前記特定の場所における販売実績から作成するステップ、作成された特徴量データを、前記学習モデルへ入力するステップ、及び、前記学習モデルから得られる需要を示すデータを出力するステップを実行させる。 A computer program according to an embodiment of the present disclosure is a computer program that causes a computer to predict demand for a product or service at a specific location, and causes the computer to execute the steps of: creating, from sales records at the specific location, at least one type of feature data used in learning a learning model that uses data related to the provision of a product or service at the specific location as input data and outputs data indicating the demand for the product or service, the feature data being at least one type of feature data among features related to the calendar of the day the product or service is provided, statistics related to the product or service in sales records, and features related to the sales amount of the product or service; inputting the created feature data into the learning model; and outputting data indicating the demand obtained from the learning model.

本開示の予測方法では、作成された特徴量を用いて学習された学習モデルに対し、その学習モデルで使用された特徴量を、予測対象の期間に対して同様に作成して入力し、学習モデルから得られる需要を示すデータを予測結果として用いる。本開示の予測方法は、販売実績の特徴量そのものではなく、販売実績から必要な特徴量を抽出又は演算して特徴量データを作成し、作成した特徴量を用いる。これにより、予測精度が向上する。 In the prediction method disclosed herein, the features used in the learning model, which has been trained using the created features, 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 features of sales history themselves, but rather extracts or calculates the necessary features from sales history to create feature data, and uses the created features. This improves prediction accuracy.

本開示の一実施形態の予測方法は、前記学習モデルは、入力された特徴量データ夫々に対する重要度の係数を出力し、前記コンピュータは、前記重要度の係数に基づき、所定値以上の重要度の特徴量データを抽出し、前記学習モデルから得られる需要を示すデータを、抽出された特徴量データと共に出力する。 In one embodiment of the prediction method disclosed herein, the learning model outputs an importance coefficient for each input feature data, and the computer extracts feature data with 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.

本開示の予測方法では、学習で影響が大きかった特徴量についての情報が出力される。どのようなデータ、例えば暦上の特定の日であるか否かといったデータが需要に大きな影響を及ぼすかを、物品又はサービスの提供者が把握できる。 The prediction method disclosed herein outputs information about the features that had the greatest influence during learning. This allows the provider of goods or services to understand what type of data, such as whether or not it is a specific calendar day, has a large impact on demand.

本開示の学習方法、学習モデル、予測方法、予測装置、及びコンピュータプログラムによれば、適切に作成された特徴量による学習によって、多くの種類のデータを収集することを必要とせずに、高い精度で需要予測を実現できる。 The learning method, learning model, prediction method, prediction device, and computer program disclosed herein can realize highly accurate demand forecasting by learning from appropriately created features, without the need to collect many types of data.

本開示の予測装置の概要図である。FIG. 1 is a schematic diagram of a prediction device according to the present disclosure. 第1の実施形態の予測装置の構成を示すブロック図である。1 is a block diagram showing a configuration of a prediction device according to a first embodiment; 学習アルゴリズムの一例の概要図でありFIG. 1 is a schematic diagram of an example of a learning algorithm; 学習アルゴリズムの学習処理手順の一例を示すフローチャートである。13 is a flowchart showing an example of a learning process procedure of a learning algorithm. 予測装置による予測処理手順の一例を示すフローチャートである。13 is a flowchart illustrating an example of a prediction process procedure performed by the prediction device. 予測データの表示例を示す図である。FIG. 13 is a diagram illustrating a display example of predicted data. 第2の実施形態における予測装置及び端末装置の構成を示すブロック図である。FIG. 13 is a block diagram showing the configurations of a prediction device and a terminal device according to a second embodiment.

以下、本願に係る学習方法、学習モデル、予測方法、予測装置及びコンピュータプログラムについて、実施の形態を示す図面を参照しつつ説明する。 The learning method, learning model, prediction method, prediction device, and computer program according to the present application will be described below with reference to the drawings showing the embodiments.

(第1の実施形態)
図1は、本開示の予測装置1の概要図である。予測装置1は、物品を販売する店舗、又はサービスを提供する店舗に設置された集計装置2と接続される。予測装置1は、集計装置2で集計される販売実績に基づき、需要を予測する装置である。需要としては、設定された期間における来客数、又は販売数等が例示される。集計装置2は、以下の説明ではPOS(Point Of Sales)システムであり、販売実績はPOSデータである。本実施形態では、予測装置1及び集計装置2が、図1に示したように店舗夫々に設置され、個々の店舗毎に需要が予測される。なお、これに限定されず、集計装置2は店舗夫々に設置される一方で、1つの予測装置1が、各店舗の集計装置2と通信接続し、各店舗のPOSデータを統括的に管理してもよい。また、複数の店舗のPOSデータを統括して複数の店舗全体に対して1つの需要予測が行なわれてもよい。ただし、後述する特徴量は店舗によって異なることが多いことから、店舗毎に需要が予測されることが好ましい。
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.

本開示の予測装置1は、販売実績に対応するPOSデータを入力データとして、機械学習によって需要を予測する。以下説明では、予測装置1は、1つの店舗への1日当たりの来客数を需要として予測する。勿論、予測装置1が予測する需要は、来客数に限らず、販売個数、来店グループ数等、予測の対象(予測対象の種別)が異なってもよい。また、1週間当たりの来客数、3日平均の来客数等、予測の期間(予測対象の期間)が異なっていてもよい。さらに、本実施形態では、予測装置1は、1日先の来客数を予測するが、これに限らず、1日よりも先、1週間先、4週間(28日)先等の来客数を予測してもよい。 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 to this, and may also predict the number of visitors more than one day ahead, one week ahead, four weeks (28 days) ahead, etc.

図2は、第1の実施形態の予測装置1の構成を示すブロック図である。予測装置1は、パーソナルコンピュータ又はサーバコンピュータである。予測装置1は、以下の説明においては1台のコンピュータによって構成されるものとして説明するが、複数台のコンピュータをネットワークで通信接続して分散処理させる態様であってもよい。予測装置1は、他の用途も有するコンピュータの機能の一部として実現されてもよい。 Figure 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 explanation, the prediction device 1 is described as being configured by one computer, but it may also be configured in a manner in which multiple computers are connected to each other via a network for distributed processing. The prediction device 1 may also be realized as part of the functions of a computer that also has other uses.

予測装置1は、処理部10、記憶部11、通信部12、表示部13、及び操作部14等を備える。 The prediction device 1 includes a processing unit 10, a memory unit 11, a communication unit 12, a display unit 13, and an operation unit 14.

処理部10は、CPU(Central Processing Unit )及び/又はGPU(Graphics Processing Unit)を用いたプロセッサである。処理部10は、記憶部11に記憶されている予測プログラム1P及び学習アルゴリズム(学習モデル)1Lに基づき、予測処理を実行する。 The processing unit 10 is a processor that uses a CPU (Central Processing Unit) and/or a GPU (Graphics Processing Unit). The processing unit 10 executes prediction processing based on a prediction program 1P and a learning algorithm (learning model) 1L stored in the memory unit 11.

記憶部11は、例えばハードディスク、フラッシュメモリ、SSD(Solid State Drive)等の不揮発性メモリを用いる。記憶部11は、処理部10が参照するデータを記憶する。記憶部11は、予測プログラム1Pを記憶する。記憶部11は、学習アルゴリズム1Lを記憶する。予測プログラム1P及び/又は学習アルゴリズム1Lは、記録媒体9に記憶してある予測プログラム9P及び/又は学習アルゴリズム9Lを処理部10が読み出して記憶部11に複製したものであってもよい。 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 the recording medium 9 that is read by the processing unit 10 and copied to the storage unit 11.

学習アルゴリズム1Lは、機械学習を実施するためのライブラリ群と、学習済みパラメータを含む。学習アルゴリズム1Lは、POSデータに基づき後述するように求められた入力データが入力された場合に、指定期間における需要の予測データを出力するように学習される。第1の実施形態において学習アルゴリズム1Lは例えば、LightGBM(Light Gradient Boosting Machine )を用いる。学習アルゴリズム1Lはその他の、決定木に基づく機械学習を実現する教師有り学習のアルゴリズムであってもよいが、勾配ブースティング、Leaf-wise アルゴリズムの使用がより好ましい。 The learning algorithm 1L includes a group of libraries 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 decision trees, but it is more preferable to use gradient boosting or leaf-wise algorithms.

記憶部11は、入力されたPOSデータを記憶する。POSデータは、設定されている期間分(例えば、10年間分、4年間分、1年間分、半年分、3ヶ月分等)記憶される。 The memory unit 11 stores the input POS data. The POS data is stored for a set period (e.g., 10 years, 4 years, 1 year, 6 months, 3 months, etc.).

通信部12は、ローカルネットワークを介したPOSシステムとの通信を実現する。通信部12は具体的には、例えばネットワークカードである。通信部12は、シリアル通信のインタフェースであってもよい。通信部12は、無線通信モジュールであってもよい。処理部10は、通信部12によってPOSシステムからPOSデータを読み出し、記憶部11に記憶する。 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 it in the memory unit 11.

表示部13は、液晶ディスプレイ、有機EL(Electro Luminescence)ディスプレイ等のディスプレイである。表示部13は、予測の実行結果を含む画面を表示する。この画面は、予測のための設定を受け付けるインタフェースを含んでもよい。表示部13は、タッチパネル内蔵型ディスプレイであってもよい。 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.

操作部14は、処理部10との間で入出力が可能なキーボード及びポインティングデバイス等のユーザインタフェースである。操作部14は、音声入力部であってもよい。操作部14は、表示部13のタッチパネルであってもよい。操作部14は、物理ボタンであってもよい。 The operation unit 14 is a user interface such as a keyboard and a pointing device that can input and output 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.

このように構成される予測装置1は、POSシステムから取得するPOSデータを用いて、指定された期間(1日先、1週間先、1ヶ月先)における需要(1日当たりの来客者数)を予測し、予測結果を表示部13に表示する。予測装置1は、以下に説明するように、学習アルゴリズム1LにはPOSデータをそのまま入力せず、予測プログラム1Pに基づきPOSデータから適切な特徴量を抽出して特徴量データを作成する特徴量エンジニアリングを実行する。予測装置1は、特徴量エンジニアリングによって得られた入力データを学習アルゴリズム1Lへ入力し、学習アルゴリズム1Lによって導き出される需要のデータを取得し、出力する。 The prediction device 1 configured in this way uses POS data obtained from the POS system to predict demand (number of customers per day) for a specified period (one day ahead, one week ahead, one month ahead) and displays the prediction results on the display unit 13. As described below, the prediction device 1 does not input POS data directly into the learning algorithm 1L, but instead 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 feature engineering into the learning algorithm 1L, and obtains and outputs demand data derived by the learning algorithm 1L.

図3は、学習アルゴリズム1Lの一例の概要図であり、図4は、学習アルゴリズム1Lの学習処理手順の一例を示すフローチャートである。学習アルゴリズム1Lは、Leaf-Wise 型の決定木アルゴリズムである。学習アルゴリズム1Lは、POSデータに基づく特徴量データ(説明変数)が入力されると、予測対象の日にち(即ち、特定の場所で物品又はサービスが提供される日)における予測来客者数(目標変数)を出力するように、説明変数と目標変数とが設定されてある。 Fig. 3 is a schematic diagram of an example of learning algorithm 1L, and Fig. 4 is a flowchart showing an example of the learning process procedure of learning algorithm 1L. Learning algorithm 1L is a Leaf-Wise decision tree algorithm. The explanatory variables and target variables are set so that when feature data (explanatory variables) based on POS data is input, learning algorithm 1L outputs a predicted number of customers (target variable) on the date to be predicted (i.e., the date on which goods or services are provided at a specific location).

処理部10は、以下に示す処理手順を、毎日実行する。実行頻度は、設定可能であってよい。この場合、実行頻度は、例えば、指定された予測期間と、予測する需要の期間(本実施形態では1日当たり)とに基づき定められる。指定された予測期間が1日先である場合は毎日実行され、1週間先である場合は少なくとも1週間に一度実行され、1ヶ月(4週間、5週間)先である場合は少なくとも月に1度実行されるように定められてもよい。なお、予測する需要が、1日当たりの来客数ではなく、1週間当たりの来客数である場合には、実行頻度は、最短で1週間ごとになる。 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 specified prediction period and the period of the predicted demand (per day in this embodiment). If the specified 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, and 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 predicted demand is the number of visitors per week rather than the number of visitors per day, the execution frequency will be once a week at the shortest.

処理部10は、記憶部11からPOSデータを所定期間(例えば4年間)分読み出す(ステップS101)。処理部10は、POSデータを年単位、月単位、季節単位、と暦における周期に合致した単位で取得するとよい。 The processing unit 10 reads out POS data for a predetermined period (e.g., four years) from the memory unit 11 (step S101). The processing unit 10 may obtain the POS data in units that match the calendar cycle, such as annual, monthly, or seasonal.

POSデータは例えば、売上年月日、時刻、レシート番号、部門コード、部門名、分類コード、分類名、商品コード、商品名、売上金額及び売上点数等を含む。なお、これらの全てがPOSデータとして利用されることは必須ではなく、これらの一部がPOSデータとして利用されてもよく、別の要素がPOSデータとして利用されてもよい。 POS data includes, for example, the date and time of the sale, receipt number, department code, department name, classification code, classification name, product code, product name, sales amount, and sales points. Note that it is not essential that all of these are used as POS data; some of these may be used as POS data, or other elements may be used as POS data.

処理部10は、読み出したPOSデータから、特徴量エンジニアリングにより、各日について、暦に関する特徴量、予測対象の需要(ここでは来客数)に関する統計量、及び、売上金額に関する特徴量をそれぞれ、複数生成する(ステップS102)。 The processing unit 10 uses feature engineering to generate multiple calendar features, statistics on the demand to be predicted (here, the number of visitors), and features on the sales amount for each day from the read POS data (step S102).

ステップS102における特徴量エンジニアリングにて処理部10は、暦に関する特徴量として例えば、「祝日か否か」、「土日祝日であるか否か」、「年末年始期間か否か」、「大型連休中か否か」、「外国の大型連休中か否か」、「休前日か否か」、「月初日か否か」、「月末日であるか否か」、「四半期開始日か否か」、「四半期末日であるか否か」、「給料日に当たる日であるか否か」等の、店舗で商品又はサービスが提供される日(予測対象の日にち)が暦上の特定日に当たるか否かの二値(TRUE or FALSE )の特徴量を作成する。処理部10は、暦に関する特徴量として例えば、「連休数」、「給料日からの日数(給料日別)」、「月内における曜日のN番目であるかのN」、「365日周期のコサイン関数での値」、「7日周期のコサイン関数での値」、「年間における経過割合」、「年間における経過割合の対数」等、店舗で商品又はサービスが提供される日の暦における特徴を示す連続値(二値ではない値)の特徴量を作成する。「月内における曜日のN番目であるかのN」は、例えば第3水曜日であればその特徴量は「3.0」である。「365日周期のコサイン関数での値」は、例えば年間の1/4の日に該当すれば、その特徴量は「1.0」であって、年間の1/2の日に該当すればその特徴量は「0.0」、年間の3/4の日に該当すればその特徴量は「-1.0」である。 In the feature engineering in step S102, the processing unit 10 creates features of binary values (TRUE or FALSE) indicating whether the day on which the product or service is provided at the store (the predicted date) corresponds to a specific date on the calendar, such as "is it a national holiday?", "is it a Saturday, Sunday or national holiday?", "is it a New Year's holiday?", "is it during a long holiday?", "is it during a long holiday in a foreign country?", "is it the day before a holiday?", "is it the first day of the month?", "is it the last day of the month?", "is it the first day of the quarter?", "is it the last day of the quarter?", "is it a payday?", etc. The processing unit 10 creates features of continuous values (non-binary values) indicating the calendar characteristics of 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 the 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".

同様にしてステップS102における特徴量エンジニアリングにて処理部10は、来客数に関する統計量として例えば、予測対象の日までの「1週間来客数の平均」、「4週間来客数の平均」、「2ヶ月来客者数の平均」等、予測対象である来客数の実績値の直近特定期間における平均の特徴量を作成する。処理部10は、「1週間前(4週間前)の来客数」、「52週前の来客数」、「同曜日4週の来客数の中央値」、「同曜日4週の標準偏差」、「同曜日4週の来客数の最大値」、「同曜日4週の来客数の最小値」、「同曜日4週平均来客者数と4週間来客者数の平均との差」等の、店舗で商品又はサービスが提供される日と暦上の同じ属性(曜日、月)の日における予測対象である来客数の実績値の特徴量を作成する。処理部10は、「1週間来客者数の平均と4週間来客者数の平均との差」、「2日前の来客者数」、「前営業日の来客者数」、「1週間来客者数の標準偏差」、「4週間来客者数の標準偏差」等の予測対象である来客者数の実績値のトレンド(変化傾向)に関する特徴量を作成する。 Similarly, in the feature engineering in step S102, the processing unit 10 creates features of the average of the actual number of visitors to be predicted in the most recent specific period, such as the "average number of visitors for one week," "average number of visitors for four weeks," and "average number of visitors for two months" as statistics related to the number of visitors. The processing unit 10 creates features of the actual number of visitors to be predicted on the day with the same attributes (day of the week, month) on the calendar as the day on which the product or service is provided at 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."

同様にしてステップS102における特徴量エンジニアリングにて処理部10は、売上金額に関する特徴量として例えば、「現金件数(現金で支払われたレシートの数)/一日の来客組数(レシートの数)の4週間の平均」等の直近(入力データの直近)の現金支払いの割合の特徴量を作成する。処理部10は、「{(値引き組数(値引きがあったレシートの数)+割引組数(割引があったレシートの数))/1日当たりの来客組数}の3日間平均」、「{(値引き組数+割引組数+販促組数(販促によって来客した組数))/1日当たりの来客組数}の4週間平均」、「{(値引き組数+割引組数+販促組数+テイクアウト値引き件数)/1日当たりの来客組数}の4週間平均」等の、直近の値引きの影響に関する来客数の実績値の特徴量を作成する。処理部10は、「売上金額/来客者数の客単価の3日間平均」、「1組当たりの来客数(来客数/来客組数)の3日間平均」等の直近の客単価に関する実績値の特徴量を作成する。 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 customer groups 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 number of customers related to the impact of the most recent discount, such as "three-day average of {(number of discounted groups (number of receipts with discounts) + number of discounted groups (number of receipts with discounts))/number of customer groups per day}", "four-week average of {(number of discounted groups + number of discounted groups + number of promotional groups (number of groups that visited due to promotions))/number of customer groups per day}", or "four-week average of {(number of discounted groups + number of discounted groups + number of promotional groups + number of takeout discounts)/number of customer groups per day}". The processing unit 10 creates features of actual values related to the most recent average customer spending, such as "sales amount/number of visitors average over three days" and "number of visitors per group (number of visitors/number of groups of visitors) average over three days."

ステップS102で生成した、各日についての特徴量のデータを入力データとし、その日の実際の来客者数を目的変数とした教師データを用いて、処理部10は、学習アルゴリズム1Lの学習を実行し(ステップS103)、学習処理を終了する。 The processing unit 10 uses the feature data for each day generated in step S102 as input data and the training data with the actual number of visitors on that day as the objective variable to execute learning of the learning algorithm 1L (step S103), and ends the learning process.

ステップS103における学習で処理部10は、ステップS101で読み出したデータに対応する所定期間の単位(年)よりも小さい単位(月)での直近のデータをイテレーション、ラウンド数、サイクル数等と呼ばれる学習回数の評価(validation)に用いるとよい。例えば処理部10は、ステップS101で4年間分のPOSデータを読み込んだ場合、ステップS103で3年11か月分の各日の特徴量のデータと、その実際の来客者数とを教師データとし、1ヶ月分の各日の特徴量のデータと、その実際の来客者数とをテストデータとして指定する。処理部10は、テストデータにより、学習回数ごとの評価関数を導出し、最適な学習回数を決定して学習を実行してもよい。ステップS103において処理部10は、学習アルゴリズム1Lにおけるハイパーパラメータ、例えば決定木の深さの指定をしてもよい。 In the learning in step S103, the processing unit 10 may use the most recent data in units (months) smaller than the unit of the predetermined period (years) corresponding to the data read in step S101 for validation of the number of learning times, called iterations, rounds, cycles, etc. For example, if the processing unit 10 reads POS data for four years in step S101, in step S103, the processing unit 10 specifies the feature data for each day for three years and eleven months and the actual number of visitors as teacher data, and the feature data for 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 specify a hyperparameter in the learning algorithm 1L, for example, the depth of the decision tree.

ステップS103の学習において、学習アルゴリズム1Lは、入力される特徴量のデータ(入力データ)を説明変数とした場合に目的変数を予測するための分岐条件を作成し、決定木を作成する。 In the learning step S103, the learning algorithm 1L creates branching conditions for predicting the objective variable when the input feature data (input data) is used as the explanatory variable, and creates a decision tree.

図4のフローチャートに示した処理により、処理部10は例えば毎日、指定された期間における1日当たりの来客数を予測する学習アルゴリズム1Lを作成する。 By the process shown in the flowchart of Figure 4, the processing unit 10 creates a learning algorithm 1L that predicts the number of visitors per day for a specified period, for example, every day.

図4のフローチャートに示した処理手順の内、ステップS101及びステップS102において処理部10は、新たに追加されたPOSデータのみを読み出し、追加された期間中の各日における特徴量を生成し、生成した特徴量を、日にちを識別するデータに対応付けて記憶しておいてもよい。処理部10は、POSデータそのものを用いずに特徴量エンジニアリング処理によって生成したデータを記憶部11に蓄積してから使用してもよい。 In the processing procedure shown in the flowchart of FIG. 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 the feature engineering process in the memory unit 11 and then use the data, without using the POS data itself.

図5は、予測装置1による予測処理手順の一例を示すフローチャートである。処理部10は、例えば毎日、以下の処理を実行する。 Figure 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.

処理部10は、前日までに取得したPOSデータを記憶部11から読み出す(ステップS201)。 The processing unit 10 reads the POS data acquired up until the previous day from the memory unit 11 (step S201).

処理部10は、ステップS201で読み出したPOSデータから、特徴量エンジニアリングにより、学習の際に用いた特徴量と同様に、予測対象の需要の期間(1日)に対する特徴量(暦に関する特徴量、需要に関する統計量、及び、売上金額に関する特徴量)をそれぞれ、作成する(ステップS202)。 The processing unit 10 uses feature engineering to create features (calendar features, demand statistics, and sales amount features) for the period (one day) of the demand to be predicted, similar to the features used during learning, from the POS data read in step S201 (step S202).

処理部10は、前日までのPOSデータを用いて学習された学習アルゴリズム1Lを読み出す(ステップS203)。 The processing unit 10 reads out the learning algorithm 1L that was learned using POS data up to the previous day (step S203).

処理部10は、ステップS202で作成した特徴量のデータを、ステップS203で読み出した学習アルゴリズム1Lに入力し(ステップS204)、学習アルゴリズム1Lから得られる予測データを取得する(ステップS205)。 The processing unit 10 inputs the feature data created in step S202 into the learning algorithm 1L read out in step S203 (step S204), and obtains prediction data obtained from the learning algorithm 1L (step S205).

処理部10は、ステップS203の学習アルゴリズム1Lにおける所定の重要度以上と判断された特徴量のデータを抽出する(ステップS206)。LightGBMを用いた学習アルゴリズム1Lでは、特徴量それぞれに対する重要度の係数が得られるので、処理部10は、得られる係数の総和に対するその係数の割合を重要度として算出し、所定値以上の重要度の特徴量のデータを重要度と共に抽出する。 The processing unit 10 extracts data on features that are determined to have a predetermined importance or higher in the learning algorithm 1L in step S203 (step S206). In the learning algorithm 1L using LightGBM, an importance coefficient for each feature is obtained, so the processing unit 10 calculates the ratio of that coefficient to the sum of the obtained coefficients as the importance, and extracts data on features that have an importance equal to or higher than the predetermined value together with the importance.

処理部10は、取得した予測データ及び特徴量のデータを、予測対象の日にちを表すデータと対応付けて記憶部11に記憶する(ステップS207)。 The processing unit 10 stores the acquired prediction data and feature data in the memory unit 11 in association with data representing the date to be predicted (step S207).

処理部10は、必要分の予測データが記憶されたか否かを判断する(ステップS208)。ステップS208で処理部10は、翌日分の全ての予測データが記憶されたか否かを判断してもよいし、予測データを計数してもよい。ステップS208で処理部10は、翌月(28日間)分の予測データが記憶されたか否かを判断してもよい。ステップS208で処理部10は、集計する所定の日であるか否かを判断してもよい。例えば、予測対象の日にちとして1ヶ月(4週間)先が指定されている場合、各月の末日から1週間前の日を所定の日としてもよい。記憶されていないと判断された場合(S208:NO)、処理部10は、処理を終了し、その日の処理を終了する。 The processing unit 10 determines whether the necessary amount of predicted data has been stored (step S208). In step S208, the processing unit 10 may determine 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 determine whether the predicted data for the next month (28 days) has been stored. In step S208, the processing unit 10 may determine whether it is a specified day to be tallied. For example, if the date to be predicted is specified one month (4 weeks) in the future, the specified day may be the day one week before the last day of each month. If it is determined that the data has not been stored (S208: NO), the processing unit 10 ends the process and ends the processing for that day.

ステップS208において記憶されたと判断された場合(S208:YES)、処理部10は、必要分、例えば1ヶ月(4週間)先が指定されている場合には1ヶ月分の予測データを日にちと対応付けて読み出す(ステップS209)。処理部10は、読み出した予測データを日にちに対してプロットして表示部13に出力し(ステップS210)、抽出された所定の重要度以上の特徴量のデータを予測データのプロットと共に表示部13に出力し(ステップS211)、処理を終了する。 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 forecast data, for example, one month's worth of forecast data in association with the date if one month (four weeks) ahead is specified (step S209). The processing unit 10 plots the read forecast data against the date and outputs it to the display unit 13 (step S210), outputs the extracted feature data with a predetermined importance or higher to the display unit 13 together with the plot of the forecast data (step S211), and ends the process.

図6は、予測データの表示例を示す図である。図6には、横軸を日にち、縦軸を目標変数である来客数としたグラフ131、及び、グラフの日にちの期間で抽出された特徴量のデータと重要度とが対応付けられた一覧132が示されている。グラフ131は、予測データの値及びその推移を実線で示し、実際のデータを黒丸で示す。グラフ131には、各日の来客数の絶対値と、1か月前、3か月前からの増減分とが示されてもよい。これにより、各店舗の管理者は、翌月の人員確保、材料確保等の目途を付けることができる。 FIG. 6 is a diagram showing an example of display of predicted data. FIG. 6 shows a graph 131 with the horizontal axis representing the date and the vertical axis representing the number of customers as a target variable, and a list 132 in which the feature quantity data extracted during the period of the graph's dates and the importance are associated with each other. The graph 131 shows the value of the predicted data and its transition with a solid line, and the actual data with a black circle. The graph 131 may show the absolute value of the number of customers for each day, and the increase or decrease from one month ago or three months ago. This allows the manager of each store to estimate the number of personnel and materials for the next month.

単にPOSデータを学習アルゴリズム1Lに入力した場合と比較して、予測対象の日にち(物品又はサービスが提供される日)が特定日に当たるか否かの二値の特徴量、予測対象の日にちの暦上における特徴を示す連続値の特徴量等を特徴量エンジニアリングによって作成して用いることで精度が向上した。2020年の国・自治体からの休業要請等、予測が困難な事象があったにもかかわらず、ある業態の店舗では店舗毎に42.7%→49.6%、61.1%→66.1%、49.4%→62.1%、50.3%→55.8%、56.5%→60.7%等と精度が向上したことが確認された。また「土日祝日であるか否か」、「同曜日4週の来客数の中央値」、「年間における経過割合」、「365日周期のコサイン関数での値」、「連休数」、「52週前の来客数」の特徴量の重要度が高く算出される傾向にあった。特徴量エンジニアリングにて、予測対象の日にちの暦上における周期的な特徴を表す説明変数の重要度が高かった。また別の業態の店舗では店舗毎に40.3%→60.6%、44.9%→64.5%、45.4%→63.6%、47.0%→64.5%、42.3%→58.5%等と精度が向上したことが確認された。また「土日祝日であるか否か」、「連休数」、「52週前の来客数」、「前営業日の来客数」、「2日前の来客数」、「2日前からの1週間来客数の平均」の特徴量の重要度が高く算出される傾向にあった。 Compared to simply inputting POS data into learning algorithm 1L, accuracy was improved by using feature engineering to create binary features indicating whether the predicted date (the day the goods or services are provided) falls on a specific day, and continuous features indicating the calendar characteristics of the predicted date. 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 holiday," "median number of customers in the same four weeks," "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 periodic characteristics on the calendar of the target date were given high importance. Also, in stores of different business formats, it was confirmed that 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 features for "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.

(第2の実施形態)
図7は、第2の実施形態における予測装置3及び端末装置4の構成を示すブロック図である。第2の実施形態における予測装置3の構成を示すブロック図である。第2の実施形態における予測装置3の構成は、以下に示すように、端末装置4と共にサーバ及びクライアント形式としたこと以外、第1の実施形態と同様である。
Second Embodiment
7 is a block diagram showing the configurations 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.

第2の実施形態において予測装置3は、各店舗、又は、各グループに設置された端末装置4との間で、インターネットを介した通信によってデータの送受信が可能な所謂クラウドサーバである。予測装置3は、サーバコンピュータを用いる。予測装置3は、複数台のコンピュータをネットワークで通信接続して分散処理させる態様であってもよい。 In the second embodiment, the prediction device 3 is a so-called cloud server that can transmit and receive data by communication via the Internet between the terminal devices 4 installed in each store or each group. The prediction device 3 uses a server computer. The prediction device 3 may be configured to perform distributed processing by connecting multiple computers to each other via a network.

予測装置3は、処理部30、記憶部31、及び通信部32等を備える。処理部30は、CPU及び/又はGPUを用いたプロセッサである。処理部30は、記憶部31に記憶されている予測プログラム3P及び学習アルゴリズム3Lに基づき、予測処理を実行する。 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 prediction processing based on a prediction program 3P and a learning algorithm 3L stored in the storage unit 31.

記憶部31は、例えばハードディスク、フラッシュメモリ、SSD等の不揮発性メモリを用いる。記憶部31は、処理部30が参照するデータを記憶する。記憶部31は、予測プログラム3Pを記憶する。記憶部31は、学習アルゴリズム3Lを記憶する。予測プログラム3P及び/又は学習アルゴリズム3Lは、記録媒体8に記憶してある予測プログラム8P及び/又は学習アルゴリズム8Lを処理部30が読み出して記憶部31に複製したものであってもよい。 The storage unit 31 uses a non-volatile memory such as a hard disk, flash memory, SSD, etc. 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 is read by the processing unit 30 and copied to the storage unit 31.

学習アルゴリズム3Lは、第1の実施形態の学習アルゴリズム1Lと同様のLightGBMを用いた機械学習を実施するためのライブラリ群と、学習済みパラメータとを含むデータである。 Learning algorithm 3L is data that includes a library group for performing machine learning using LightGBM similar to learning algorithm 1L in the first embodiment, and learned parameters.

記憶部31は、複数の端末装置4それぞれから収集したPOSデータを、送信元の端末装置4別に、部門コード毎に記憶する。POSデータの記憶期間は、第1の実施形態と同様に設定される。 The storage unit 31 stores the POS data collected from each of the multiple terminal devices 4 by department code and by sending terminal device 4. The storage period for the POS data is set in the same manner as in the first embodiment.

通信部32は、インターネットを含むネットワークを介した端末装置4との通信を実現する。通信部32は、具体的にはネットワークカードである。処理部30は、通信部32によって端末装置4からPOSデータを収集し、記憶部31に記憶する。 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 memory unit 31.

端末装置4は、パーソナルコンピュータである。デスクトップ型、ラップトップ型、タブレット端末、又はスマートフォンであってもよい。端末装置4は、処理部40、記憶部41、第1通信部42、第2通信部43、表示部44及び操作部45等を備える。端末装置4はローカルネットワーク(インターネットでもよい)を介して店舗のPOSシステムと通信接続が可能である。 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 memory 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 the store's POS system via a local network (which may be the Internet).

処理部40は、CPUであり、記憶部41に記憶されている端末プログラム4Pに基づき、処理を実行する。処理部40は、第2通信部43を介してPOSシステムから取得したPOSデータを予測装置3へ、端末装置4を識別する識別データと対応付けて第1通信部42から送信する。処理部40は、予測装置3における予測処理の結果(予測データ及び特徴量データ)を受信する。 The processing unit 40 is a CPU and executes processing based on the terminal program 4P stored in the memory 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 data).

記憶部41は、ハードディスク、フラッシュメモリ、SSD等の不揮発性メモリを用いる。記憶部41は、端末プログラム4Pを記憶する。記憶部41は、POSデータを記憶する。記憶部41は、予測装置3から受信した予測処理の結果を記憶する。 The memory unit 41 uses a non-volatile memory such as a hard disk, flash memory, or SSD. The memory unit 41 stores the terminal program 4P. The memory unit 41 stores POS data. The memory unit 41 stores the results of the prediction process received from the prediction device 3.

第1通信部42は、予測装置3との通信接続を実現する。第1通信部42は、ネットワークカード又は無線通信モジュールである。 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.

第2通信部43は、ローカルネットワークを介したPOSシステムとの通信を実現する。第2通信部43は、ネットワークカードであってもよいし、無線通信モジュールであってもよいし、シリアル通信のインタフェースであってもよい。処理部40は、第2通信部43を介してPOSシステムと通信が可能である。 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 is capable of communicating with the POS system via the second communication unit 43.

表示部44は、液晶ディスプレイ、有機ELディスプレイ等のディスプレイである。表示部44は、予測の実行結果を含む画面を表示する。この画面は、予測のための設定を受け付けるインタフェースを含んでもよい。表示部44は、タッチパネル内蔵型ディスプレイであってもよい。 The display unit 44 is a display such as a liquid crystal display or an organic EL 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.

操作部45は、処理部40との間で入出力が可能なキーボード及びポインティングデバイス等のユーザインタフェースである。操作部45は、音声入力部であってもよい。操作部45は、表示部44のタッチパネルであってもよい。操作部45は、物理ボタンであってもよい。 The operation unit 45 is a user interface such as a keyboard and a pointing device that can input and output 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.

第2の実施形態における予測装置3は、POSデータをPOSシステムから直接取得するのではなく、端末装置4から受信すること以外については第1の実施形態における図4のフローチャートに示した学習処理と同様のことを実行するため、ここでは詳細な説明は省略する。また、第2の実施形態における予測装置3は、予測結果を端末装置4の表示部44に表示すること以外については第1の実施形態における図5のフローチャートに示した予測処理と同様のことを実行するため、ここでは詳細な説明は省略する。 The prediction device 3 in the second embodiment does not obtain POS data directly from the POS system, but receives it from the terminal device 4, and other than that, performs the same learning process as shown in the flowchart of FIG. 4 in the first embodiment, so a detailed description is omitted here. Also, the prediction device 3 in the second embodiment performs the same prediction process as shown in the flowchart of FIG. 5 in the first embodiment, so a detailed description is omitted here, other than that, the prediction device 3 displays the prediction results on the display unit 44 of the terminal device 4.

第1の実施形態及び第2の実施形態に示したように、予測装置1(3)は、特徴量エンジニアリングによって、予測対象の日にちが暦上の特定日に当たるか否か等を含む暦に関する特徴量、直近特定期間における目標変数の平均、予測対象の日にちと暦上の同じ属性(曜日、月)の日における目標変数等の特徴量を作成する。これにより、決定木アルゴリズムである学習アルゴリズム1L(3L)による予測の精度を向上させることができる。 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 predictions made by the learning algorithm 1L (3L), which is a decision tree algorithm.

(変形例)
第1の実施形態及び第2の実施形態では、POSデータに基づく予測対象を店舗への来客数、若しくは販売数等の需要としたが、これに限られない。POSデータではなく、例えば各人が携帯するスマートフォン若しくは携帯電話から得られる位置情報、交通機関における各駅の自動改札の通過回数の時間分布又は、街中での通行者数のカウント調査結果に基づいてもよい。これらのデータは、特定の場所(店舗、駅、街)における人の行動データである。予測対象は、来客数又は販売数ではなく、来場者数、通行者数等、来客数同様に暦上の特徴と相関がある情報であってもよい。これらの予測対象の情報は、何等かの目的をもって特定の場所に来た人の行動であって、特定の場所にて提供される物品又はサービスに対する需要であると言える。
(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 count 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.

上述のように開示された実施の形態は全ての点で例示であって、制限的なものではない。本発明の範囲は、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内での全ての変更が含まれる。 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.

1 予測装置
10 処理部
11 記憶部
1P 予測プログラム
1L 学習アルゴリズム(学習モデル)
13 表示部
1 Prediction device 10 Processing unit 11 Memory unit 1P Prediction program 1L Learning algorithm (learning model)
13 Display unit

Claims (9)

コンピュータが、特定の場所での物品又はサービスの提供に関するデータを入力データとして、前記物品又はサービスへの需要を示すデータを出力する学習モデルに、前記物品又はサービスの販売実績に基づき作成される前記入力データに対応するデータ及び前記需要を示すデータを教師データとして用いて学習させる学習方法であって、
前記コンピュータが、
前記物品又はサービスが提供される対象日の暦における周期上の位置に関する特徴量と、前記対象日よりも前の前記物品又はサービスの販売実績の実績値のうち、前記周期上の位置が同一の日における実績値に関する統計量とを含む特徴量データを前記販売実績から作成するステップ、及び、
前記対象日について作成した特徴量データを入力データとし、前記対象日における需要を示すデータを目的変数とし、前記対象日を変えて前記学習モデルの学習を実行するステップ
を含む学習方法。
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 learning method comprising the steps of: using feature data created for the target date as input data, using data indicating demand on the target date as a target variable, and executing learning of the learning model by changing the target date.
前記特徴量データのうち、前記対象日の暦における周期上の位置に関する特徴量は、
前記物品又はサービスが提供される日の暦における周期上の位置の特徴を示す連続値を含む
請求項1に記載の学習方法。
Among the feature data, a feature relating to a periodic position of the target day in a calendar is
The method of claim 1 , further comprising: a continuous value characteristic of a periodic position in a calendar of days at which the goods or services are provided.
前記特徴量データのうち、前記販売実績の実績値に関する統計量は、前記物品又はサービスが提供される日と暦上の同じ曜日の日における販売の実績値の統計量を含む
請求項1に記載の学習方法。
The learning method according to claim 1 , wherein the statistics relating to the actual sales performance values of the feature data include statistics of the actual sales performance values for the same day of the week on the calendar as the day on which the product or service is provided.
前記販売実績は、前記特定の場所における物品又はサービスに関するPOSデータである
請求項1から請求項3のいずれか1項に記載の学習方法。
The method according to claim 1 , wherein the sales performance is POS data relating to goods or services at the particular location.
コンピュータが、特定の場所での物品又はサービスへの需要を予測する予測方法であって、
前記コンピュータが、
請求項1から請求項4のいずれか1項に記載の学習方法によって学習された学習モデルの学習で使用された前記特徴量データと同一の新たな特徴量データを、前記特定の場所における販売実績から作成するステップ、
作成された新たな特徴量データを、前記学習モデルへ入力するステップ、及び、
前記学習モデルから得られる需要を示すデータを出力するステップ
を含む処理を実行する予測方法。
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 learning a learning model trained by the learning 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
A prediction method that performs a process including a step of outputting data indicating demand obtained from the learning model.
前記学習モデルは、入力された特徴量データ夫々に対する重要度の係数をさらに出力し、
前記コンピュータは、
前記重要度の係数に基づき、所定値以上の重要度の特徴量データを抽出し、
前記学習モデルから得られる需要を示すデータを、抽出された特徴量データと共に出力する
請求項5に記載の予測方法。
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;
The prediction method according to claim 5 , further comprising the step of outputting data indicating the demand obtained from the learning model together with the extracted feature amount data.
特定の場所での物品又はサービスへの需要を予測する予測装置であって、
請求項1に記載の学習方法によって学習された学習モデルの学習で使用された特徴量データと同種の特徴量であって、前記物品又はサービスが提供される対象日の暦における周期上の位置に関する特徴量と、前記対象日よりも前の前記物品又はサービスの販売実績のうち、前記周期上の位置が同一の日における実績値に関する統計量とを含む新たな特徴量データを、前記特定の場所における前記販売実績から作成する作成部と、
作成された新たな特徴量データを、前記学習モデルへ入力する入力部と、
前記学習モデルから得られる需要を示すデータを出力する出力部と
を備える予測装置。
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 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 computer program that executes a step of using the feature data created for the target date as input data, using data indicating demand on the target date as a target variable, and executing learning of the learning model by changing the target date.
コンピュータに、特定の場所での物品又はサービスへの需要を予測させるコンピュータプログラムであって、
前記コンピュータに、
特定の場所での物品又はサービスの提供に関するデータを入力データとして、前記物品又はサービスへの需要を示すデータを出力する学習モデルの学習で使用された特徴量データと同種の特徴量であって、前記物品又はサービスが提供される対象日の暦における周期上の位置に関する特徴量と、前記対象日よりも前の前記物品又はサービスの販売実績のうち、前記周期上の位置が同一の日における実績値に関する統計量とを含む新たな特徴量データを、前記特定の場所における前記販売実績から作成するステップ、
作成された新たな特徴量データを、前記学習モデルへ入力するステップ、及び、
前記学習モデルから得られる需要を示すデータを出力するステップ
を実行させるコンピュータプログラム。
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
and outputting data indicating demand obtained from the learning model.
JP2021058145A 2021-03-30 2021-03-30 Learning method, learning model, prediction method, prediction device, and computer program Active JP7666966B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021058145A JP7666966B2 (en) 2021-03-30 2021-03-30 Learning method, learning model, prediction method, prediction device, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021058145A JP7666966B2 (en) 2021-03-30 2021-03-30 Learning method, learning model, prediction method, prediction device, and computer program

Publications (2)

Publication Number Publication Date
JP2022154885A JP2022154885A (en) 2022-10-13
JP7666966B2 true JP7666966B2 (en) 2025-04-22

Family

ID=83556933

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021058145A Active JP7666966B2 (en) 2021-03-30 2021-03-30 Learning method, learning model, prediction method, prediction device, and computer program

Country Status (1)

Country Link
JP (1) JP7666966B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102769457B1 (en) * 2023-06-08 2025-02-17 쿠팡 주식회사 Method, apparatus, and recording medium for predicting sales volume of product in sales platform
JP7698129B1 (en) * 2024-10-31 2025-06-24 ピーディーシー株式会社 Policy information processing system and policy information processing method
JP7766235B1 (en) * 2025-01-27 2025-11-10 株式会社スルーパス Information processing device, information processing method, and program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016151640A1 (en) 2015-03-26 2016-09-29 日本電気株式会社 Learning system, method, and program
WO2019187968A1 (en) 2018-03-29 2019-10-03 日本電気株式会社 Information processing system, information processing method, and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016151640A1 (en) 2015-03-26 2016-09-29 日本電気株式会社 Learning system, method, and program
WO2019187968A1 (en) 2018-03-29 2019-10-03 日本電気株式会社 Information processing system, information processing method, and storage medium

Also Published As

Publication number Publication date
JP2022154885A (en) 2022-10-13

Similar Documents

Publication Publication Date Title
US12039564B2 (en) Method and system for generation of at least one output analytic for a promotion
US11790268B1 (en) Causal inference machine learning with statistical background subtraction
US20160321709A1 (en) Distributed system for processing of transaction data from a plurality of gas stations
US11631102B2 (en) Optimization of markdown schedules for clearance items at physical retail stores
JP7666966B2 (en) Learning method, learning model, prediction method, prediction device, and computer program
US20200234218A1 (en) Systems and methods for entity performance and risk scoring
CN113763019A (en) User information management method and device
US20230394512A1 (en) Methods and systems for profit optimization
US20260004318A1 (en) Systems and methods for processing product information using a machine-learning model
US12481902B2 (en) Systems and methods for short identifier behavioral analytics
US20240221009A1 (en) Systems and methods for using machine learning techniques for predictive temporal behavioral profiling
US20160071133A1 (en) Automatic determination of account owners to be encouraged to utilize point of sale transactions
US20150227951A1 (en) Forecasting holiday weekly sales profiles
WO2020150597A1 (en) Systems and methods for entity performance and risk scoring
JP2016012223A (en) Demand prediction device and program
CN108171530A (en) It is a kind of to be used for visitor's unit price and the again method for improving and device of purchase rate
US11798025B1 (en) Incremental sales modeling using proxy campaigns
US11687977B2 (en) System and method for predicting customer lifetime value using two-stage machine learning
CN113919869A (en) Equity distribution method and device based on sales increment model and electronic equipment
US20140136280A1 (en) Predictive Tool Utilizing Correlations With Unmeasured Factors Influencing Observed Marketing Activities
US20240378492A1 (en) Systems and methods for training and using a machine-learning model for determining the similarity of entities
JP2016012224A (en) Demand prediction apparatus and program
CN114841745A (en) Prediction method, data processing method, computing device, and computer storage medium
Dwitya et al. Consumer Segmentation of Emina Cosmetics Optimal and Relevant Approach of RFM+ Lifetime Analysis
TWI902649B (en) Computer-implemented system and computer-implemented method for channel incrementality

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20231218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240910

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20241108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20241218

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20250114

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250311

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20250408

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250410

R150 Certificate of patent or registration of utility model

Ref document number: 7666966

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150