JP2018163396A - Piecewise linear approximation function generation apparatus and method - Google Patents
Piecewise linear approximation function generation apparatus and method Download PDFInfo
- Publication number
- JP2018163396A JP2018163396A JP2017058738A JP2017058738A JP2018163396A JP 2018163396 A JP2018163396 A JP 2018163396A JP 2017058738 A JP2017058738 A JP 2017058738A JP 2017058738 A JP2017058738 A JP 2017058738A JP 2018163396 A JP2018163396 A JP 2018163396A
- Authority
- JP
- Japan
- Prior art keywords
- linear approximation
- optimization problem
- piecewise linear
- approximation function
- function
- 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.)
- Granted
Links
Images
Landscapes
- Complex Calculations (AREA)
Abstract
【課題】近似誤差が小さく、かつ、区分の数が少ない区分線形近似関数を、少ない計算負荷で生成する。
【解決手段】最適化問題定式化部15Bが、入出力データ14Aおよび節点候補14Bに基づいて、線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化し、この際、入出力データ14Aに対する区分線形近似関数の近似誤差を表す誤差項EDを、最適化問題に関する目的関数として定式化し、区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項EWを、最適化問題に関する目的関数として定式化し、隣り合う区分の線形近似関数による近似値が節点で一致することを最適化問題に関する制約条件として定式化する。
【選択図】 図1A piecewise linear approximation function having a small approximation error and a small number of sections is generated with a small calculation load.
An optimization problem formulation unit 15B formulates an optimization problem for obtaining a slope and an intercept for each of linear approximation functions based on input / output data 14A and node candidates 14B. An error term E D representing the approximation error of the piecewise linear approximation function with respect to the data 14A is formulated as an objective function related to the optimization problem, and a regularization term E W representing the slope difference relating to the linear approximation function of the adjacent section among the categories is expressed as follows: Formulation is made as an objective function related to the optimization problem, and the approximate values obtained by the linear approximation functions of adjacent sections coincide with each other as a constraint condition related to the optimization problem.
[Selection] Figure 1
Description
本発明は、複雑な非線形連続関数を複数の区分に分割して線形関数で近似した区分線形近似関数を生成するための区分線形近似関数生成技術に関する。 The present invention relates to a piecewise linear approximation function generation technique for generating a piecewise linear approximation function obtained by dividing a complex nonlinear continuous function into a plurality of sections and approximating with a linear function.
複数の空調熱源設備の運転に用いる運転計画を作成する場合、熱源機器特性を示す複雑な非線形連続関数を区分線形近似関数で近似し、得られた関数を混合整数計画(MIP:Mixed Integer Programming)の定式化に用いることがある(例えば、特許文献1など参照)。区分線形近似関数を生成する関数生成技術としては、近似誤差を最小化するような区分線形近似関数を生成する方法がある(例えば、特許文献2など参照)。しかし、生成すべき関数が凸関数あるいは凹関数であることを予め決められない場合には、適用できない。 When creating an operation plan to be used for the operation of multiple air-conditioning heat source facilities, a complex nonlinear continuous function indicating the characteristics of the heat source equipment is approximated by a piecewise linear approximation function, and the resulting function is a mixed integer programming (MIP) (For example, refer to Patent Document 1). As a function generation technique for generating a piecewise linear approximation function, there is a method of generating a piecewise linear approximation function that minimizes an approximation error (see, for example, Patent Document 2). However, this cannot be applied when it cannot be determined in advance that the function to be generated is a convex function or a concave function.
従来、このような区分線形近似関数生成技術として、Douglas-Peuckerアルゴリズムと呼ばれる手法が提案されている(例えば、特許文献3など参照)。図15は、Douglas-Peuckerアルゴリズムを示す説明図である。この手法は、ステップ1:近似対象曲線の両端点を直線で結び、ステップ2:その直線から最も遠い曲線上の点を検出し、ステップ3:検出した点を節点として各区分の曲線をそれぞれの直線で結び直し、ステップ4:区分数や誤差が望みの値になるまでステップ2−3を繰り返すことにより区分数を増やしていく、というものである。 Conventionally, as such a piecewise linear approximation function generation technique, a technique called Douglas-Peucker algorithm has been proposed (see, for example, Patent Document 3). FIG. 15 is an explanatory diagram showing the Douglas-Peucker algorithm. In this method, Step 1: Connect both end points of the curve to be approximated with a straight line, Step 2: Detect the point on the curve farthest from the straight line, Step 3: Use the detected point as a node to set each segment curve Step 4: The number of sections is increased by repeating Step 2-3 until the number of sections and the error become the desired values.
しかしながら、このような特許文献3にかかる従来技術では、誤差を含むデータの線形近似関数を生成する場合、誤差の大きい点すなわち外れ値があると、そこが節点となりやすいため、誤差の大きい点に引きずられ、意図とは異なる不自然な線形近似関数が生成されてしまうという問題点があった。
However, in the conventional technique according to
図16は、不自然な線形近似関数の生成例である。ここでは、入力データが[−2,4]の範囲で0.01刻みの等間隔に配置されている。出力データは、ある非線形関数にガウシアンノイズを載せ、1点だけ外れ値を置いたものであり、入出力データの個数は計601個ある。
この生成例によれば、誤差を含むデータの線形近似を、区分数が3の時点で止めた状態が示されているが、大多数のデータ群から値が大きく離れた外れ値が節点として選択されたために、データ群に比べて線形近似関数が大きく歪んでいることがわかる。
FIG. 16 is an example of generating an unnatural linear approximation function. Here, the input data is arranged at equal intervals of 0.01 in the range of [−2, 4]. Output data is obtained by placing Gaussian noise on a non-linear function and placing an outlier by one point. The total number of input / output data is 601.
According to this generation example, the linear approximation of data including errors is stopped at the time when the number of segments is 3, but an outlier that is far away from the majority of data groups is selected as a node. Therefore, it can be seen that the linear approximation function is greatly distorted compared to the data group.
一般に、近似関数を生成する場合、近似誤差は小さい方がよい。また、近似誤差最大の一点に着目するのではなく、全体の近似誤差を小さくするべきである。それにより、特許文献3の課題であった、外れ値の影響を軽減できる。
区分線形近似関数の近似誤差を小さくするためには、区分の数を多くしていけばよい。しかし、区分の数を多くすれば細かい近似が出来るようになるが、「過学習」「オーバーフィッティング」(与えられたデータにのみ特化した、汎用性に欠ける関数を生成してしまうこと)と呼ばれる問題を引き起こしてしまう。そこで、近似誤差が小さく、かつ、区分の数が少ない区分線形近似関数を生成する必要がある。
Generally, when generating an approximate function, it is better that the approximation error is small. Also, instead of focusing on one point with the maximum approximation error, the overall approximation error should be reduced. Thereby, the influence of the outlier which was the subject of
In order to reduce the approximation error of the piecewise linear approximation function, the number of sections may be increased. However, if the number of categories is increased, fine approximation can be performed, but “over-learning” and “over-fitting” (creating a function that lacks versatility specialized in given data) Cause a problem called. Therefore, it is necessary to generate a piecewise linear approximation function with a small approximation error and a small number of sections.
このような手法の1つとして、例えば、区分と区分の境目、すなわち節点の候補と、使える節点の最大数を予め設定しておき、生成された区分線形近似関数による近似誤差が最小となるような節点を選び出す、という手法が考えられる。
この手法によれば、近似誤差が小さく、かつ、区分の数が「使える節点の最大数−1」を超えない関数を生成することができる。
As one of such methods, for example, the boundary between divisions, that is, node candidates and the maximum number of usable nodes are set in advance so that the approximation error due to the generated piecewise linear approximation function is minimized. A method of selecting a suitable node is conceivable.
According to this method, it is possible to generate a function that has a small approximation error and the number of sections does not exceed “the maximum number of usable nodes−1”.
図17は、節点候補を示す説明図である。図18は、区分線形近似関数の生成例である。
図17では、近似対象となる関数f(x)と、x軸上に設定された節点候補xi(i=1,2,…,11)とが示されている。この場合、最大の区分数は10となる。
仮に、下限値x1,上限値x11の他に節点を最大2つ使って、最も近似誤差の少ない区分線形近似関数を求め、その結果として図18に示す区分線形近似関数が得られたとする。
FIG. 17 is an explanatory diagram showing node candidates. FIG. 18 is an example of generating a piecewise linear approximation function.
FIG. 17 shows a function f (x) to be approximated and node candidates x i (i = 1, 2,..., 11) set on the x axis. In this case, the maximum number of sections is 10.
Assume that a piecewise linear approximation function with the smallest approximation error is obtained by using a maximum of two nodes in addition to the lower limit value x 1 and the upper limit value x 11 , and as a result, the piecewise linear approximation function shown in FIG. 18 is obtained. .
図18では、節点として、下限値x1,上限値x11の他に、x3とx7が節点として選ばれており、区分数は3となっている。したがって、区分線形近似関数h(x)は、3つの線形関数の組み合わせとなり、対応する区分S1,S2,S3の線形近似関数の傾きgと切片bを、g[1],g[2],g[3]とb[1],b[2],b[3]とした場合、次の式(19)のように表すことができる。
このような区分線形近似関数は、例えば以下のような計算を行うことで生成できる。
まず、下限値x1,上限値x11以外の節点を1つも選ばず、全体で1つの線形近似関数を求め、近似誤差を算出する。次に、下限値x1,上限値x11以外の節点候補xiから任意の1つを選び出して区分を2つに分け、それぞれの区分で線形近似関数を求めた後、全区間の近似誤差を算出する。これを9回繰り返す。次に、下限値x1,上限値x11以外の節点候補xi(i=2,3,…,10)から任意の2つを選び出して区分を3つに分け、それぞれの区分で線形近似関数を求めた後、全区間の近似誤差を算出する。これを組み合わせの数、すなわち36回繰り返す。その後、最も近似誤差の小さかった場合に選び出した節点の組み合わせを採用する。
Such a piecewise linear approximation function can be generated, for example, by performing the following calculation.
First, without selecting any node other than the lower limit value x 1 and the upper limit value x 11 , one linear approximation function is obtained as a whole, and an approximation error is calculated. Next, an arbitrary one of the node candidates x i other than the lower limit value x 1 and the upper limit value x 11 is selected, divided into two sections, a linear approximation function is obtained for each section, and the approximation error of all sections Is calculated. Repeat this 9 times. Next, any two of the node candidates x i (i = 2, 3,..., 10) other than the lower limit value x 1 and the upper limit value x 11 are selected and divided into three sections, and linear approximation is performed for each section. After obtaining the function, the approximation error of all sections is calculated. This is repeated for the number of combinations, ie 36 times. Thereafter, the combination of nodes selected when the approximation error is the smallest is adopted.
上記の方法は、「組合せ最適化問題」となっている。組合せ最適化問題は、組み合わせの候補の数が多くなると、計算負荷が大きくなる性質を持つ。例えば、上下限以外の節点候補が500点あり、その中から最大5つの節点を採用する場合、組み合わせの数は、2千億通りを超えてしまう。 The above method is a “combination optimization problem”. The combination optimization problem has a property that the calculation load increases as the number of combination candidates increases. For example, when there are 500 node candidates other than the upper and lower limits, and a maximum of 5 nodes are employed, the number of combinations exceeds 200 billion.
本発明はこのような課題を解決するためのものであり、近似誤差が小さく、かつ、区分の数が少ない区分線形近似関数を、少ない計算負荷で生成できる区分線形近似関数生成技術を提供することを目的としている。 The present invention is for solving such problems, and provides a piecewise linear approximation function generation technique capable of generating a piecewise linear approximation function with a small approximation error and a small number of pieces with a small calculation load. It is an object.
このような目的を達成するために、本発明にかかる区分線形近似関数生成装置は、入力が1次元である複数の入出力データと、予め設定された複数の節点候補とに基づいて、前記入出力データの各区分を線形近似関数で近似する区分線形近似関数を生成する区分線形近似関数生成装置であって、前記入出力データおよび前記節点候補に基づいて、前記線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化する最適化問題定式化部と、最適化演算を実行することにより前記最適化問題の解を求める最適化処理部と、得られた解に基づいて前記線形近似関数のそれぞれを生成する区分線形近似関数生成部とを備え、前記最適化問題定式化部は、前記入出力データに対する前記区分線形近似関数の近似誤差を表す誤差項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化し、前記区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化し、前記隣り合う区分の線形近似関数による近似値が節点で一致することを前記最適化問題に関する制約条件として定式化するようにしたものである。 In order to achieve such an object, the piecewise linear approximation function generation device according to the present invention performs the input based on a plurality of input / output data whose inputs are one-dimensional and a plurality of preset node candidates. A piecewise linear approximation function generating device that generates a piecewise linear approximation function for approximating each piece of output data with a linear approximation function, wherein a slope and a slope for each of the linear approximation functions based on the input / output data and the node candidates An optimization problem formulation unit that formulates an optimization problem for obtaining an intercept, an optimization processing unit that obtains a solution of the optimization problem by executing an optimization operation, and the above-described solution based on the obtained solution A piecewise linear approximation function generation unit that generates each of the linear approximation functions, and the optimization problem formulation unit represents an error representing an approximation error of the piecewise linear approximation function with respect to the input / output data. Is formulated as one or both of an objective function and a constraint condition related to the optimization problem, and a regularization term representing a slope difference related to a linear approximation function of an adjacent section of the sections is expressed as an objective function related to the optimization problem And the restriction condition is formulated as one or both of them, and the fact that the approximation values by the linear approximation function of the adjacent sections coincide at the nodes is formulated as the restriction condition regarding the optimization problem.
また、本発明にかかる他の区分線形近似関数生成装置は、入力が多次元である複数の入出力データと、予め設定された複数の頂点候補とに基づいて、前記入出力データの各区分を線形近似関数で近似する区分線形近似関数を生成する区分線形近似関数生成装置であって、前記入出力データおよび前記頂点候補に基づいて、前記線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化する最適化問題定式化部と、最適化演算を実行することにより前記最適化問題の解を求める最適化処理部と、得られた解に基づいて前記線形近似関数のそれぞれを生成する区分線形近似関数生成部とを備え、前記最適化問題定式化部は、前記入出力データに対する前記区分線形近似関数の近似誤差を表す誤差項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化し、前記区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化し、前記隣り合う区分の線形近似関数による近似値が頂点で一致することを前記最適化問題に関する制約条件として定式化するようにしたものである。 In addition, another piecewise linear approximation function generation device according to the present invention determines each piece of the input / output data based on a plurality of input / output data whose inputs are multidimensional and a plurality of preset vertex candidates. A piecewise linear approximation function generation device for generating a piecewise linear approximation function approximated by a linear approximation function, wherein an optimum for obtaining a slope and an intercept for each of the linear approximation functions based on the input / output data and the vertex candidates An optimization problem formulation unit that formulates the optimization problem, an optimization processing unit that obtains a solution of the optimization problem by executing an optimization operation, and each of the linear approximation functions based on the obtained solution A piecewise linear approximation function generation unit for generating, and the optimization problem formulation unit adds an error term representing an approximation error of the piecewise linear approximation function to the input / output data to the optimization problem. A regularization term that expresses a slope difference for a linear approximation function of an adjacent section among the sections, and is expressed as one of the objective function and the constraint condition for the optimization problem. It is formulated as one or both, and it is formulated as a constraint condition related to the optimization problem that the approximation values by the linear approximation functions of the adjacent sections coincide at the apex.
また、本発明にかかる上記区分線形近似関数生成装置の一構成例は、前記正則化項が、前記傾き差のすべてに関するL1ノルムからなるものである。
また、本発明にかかる上記区分線形近似関数生成装置の一構成例は、前記正則化項が、前記傾き差のL2ノルムの総和からなるものである。
Further, in a configuration example of the piecewise linear approximation function generation device according to the present invention, the regularization term is composed of an L1 norm related to all the slope differences.
Also, in a configuration example of the piecewise linear approximation function generation device according to the present invention, the regularization term is composed of a sum of L2 norms of the slope difference.
また、本発明にかかる上記区分線形近似関数生成装置の一構成例は、前記傾き差ごとに設けた所定の係数を用いて前記正則化項を基準化する基準化部をさらに備え、前記係数のそれぞれは、前記係数を1と仮定して前記最適化問題を解くことにより得られた、対応する前記傾き差の絶対値からなるものである。 In addition, a configuration example of the piecewise linear approximation function generation device according to the present invention further includes a standardization unit that standardizes the regularization term using a predetermined coefficient provided for each of the slope differences, Each consists of the corresponding absolute value of the slope difference obtained by solving the optimization problem assuming that the coefficient is 1.
また、本発明にかかる区分線形近似関数生成方法は、入力が1次元である複数の入出力データと、予め設定された複数の節点候補とに基づいて、前記入出力データの各区分を線形近似関数で近似する区分線形近似関数を生成する区分線形近似関数生成方法であって、最適化問題定式化部が、前記入出力データおよび前記節点候補に基づいて、前記線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化する最適化問題定式化ステップと、最適化処理部が、最適化演算を実行することにより前記最適化問題の解を求める最適化処理ステップと、区分線形近似関数生成部が、得られた解に基づいて前記線形近似関数のそれぞれを生成する区分線形近似関数生成ステップとを備え、前記最適化問題定式化ステップは、前記入出力データに対する前記区分線形近似関数の近似誤差を表す誤差項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化するステップと、前記区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化するステップと、前記隣り合う区分の線形近似関数による近似値が節点で一致することを前記最適化問題に関する制約条件として定式化するステップとを含むものである。 The piecewise linear approximation function generation method according to the present invention linearly approximates each piece of the input / output data based on a plurality of input / output data having a one-dimensional input and a plurality of preset node candidates. A piecewise linear approximation function generation method for generating a piecewise linear approximation function approximated by a function, wherein the optimization problem formulation unit is configured to determine a slope and a slope for each of the linear approximation functions based on the input / output data and the node candidates. An optimization problem formulation step that formulates an optimization problem for obtaining an intercept; an optimization processing step in which an optimization processing unit performs an optimization operation to obtain a solution of the optimization problem; and a piecewise linear An approximate function generation unit including a piecewise linear approximation function generation step for generating each of the linear approximation functions based on the obtained solution, and the optimization problem formulation step includes: Formulating an error term representing an approximation error of the piecewise linear approximation function with respect to input / output data as one or both of an objective function and a constraint condition related to the optimization problem; Formulating the regularization term representing the slope difference for the approximation function as one or both of the objective function and the constraint condition for the optimization problem, and the approximation value by the linear approximation function of the adjacent segment coincide at the node To formulate as a constraint on the optimization problem.
また、本発明にかかる他の区分線形近似関数生成方法は、入力が多次元である複数の入出力データと、予め設定された複数の頂点候補とに基づいて、前記入出力データの各区分を線形近似関数で近似する区分線形近似関数を生成する区分線形近似関数生成方法であって、最適化問題定式化部が、前記入出力データおよび前記頂点候補に基づいて、前記線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化する最適化問題定式化ステップと、最適化処理部が、最適化演算を実行することにより前記最適化問題の解を求める最適化処理ステップと、区分線形近似関数生成部が、得られた解に基づいて前記線形近似関数のそれぞれを生成する区分線形近似関数生成ステップとを備え、前記最適化問題定式化ステップは、前記入出力データに対する前記区分線形近似関数の近似誤差を表す誤差項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化するステップと、前記区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化するステップと、前記隣り合う区分の線形近似関数による近似値が頂点で一致することを前記最適化問題に関する制約条件として定式化するステップとを含むものである。 Further, another piecewise linear approximation function generation method according to the present invention is configured to determine each piece of the input / output data based on a plurality of input / output data whose inputs are multidimensional and a plurality of preset vertex candidates. A piecewise linear approximation function generation method for generating a piecewise linear approximation function to be approximated by a linear approximation function, wherein an optimization problem formulation unit is configured for each of the linear approximation functions based on the input / output data and the vertex candidates. An optimization problem formulation step that formulates an optimization problem for obtaining a slope and an intercept; an optimization processing step in which an optimization processing unit obtains a solution of the optimization problem by executing an optimization operation; A piecewise linear approximation function generation unit including a piecewise linear approximation function generation step for generating each of the linear approximation functions based on the obtained solution, and the optimization problem formulation step includes: Formulating an error term representing an approximation error of the piecewise linear approximation function with respect to the input / output data as one or both of an objective function and a constraint condition related to the optimization problem; and Formulating a regularization term representing a slope difference with respect to a linear approximation function as one or both of an objective function and a constraint condition with respect to the optimization problem, and an approximation value by the linear approximation function of the adjacent section at a vertex And formulating matching as a constraint on the optimization problem.
本発明によれば、線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を、連続変数のみを用いた最適化問題として定式化することができる。したがって、なるべく区分数の少ない区分線形近似関数を生成することができ、近似誤差が小さく、かつ、区分の数が少ない区分線形近似関数を、少ない計算負荷で生成することが可能となる。このため、区分線形近似関数における「過学習」や「オーバーフィッティング」と呼ばれる問題を避けることができる。 According to the present invention, the optimization problem for obtaining the slope and intercept for each of the linear approximation functions can be formulated as an optimization problem using only continuous variables. Therefore, it is possible to generate a piecewise linear approximation function with as few pieces as possible, and to produce a piecewise linear approximation function with a small approximation error and a small number of pieces with a small calculation load. For this reason, problems called “overlearning” and “overfitting” in the piecewise linear approximation function can be avoided.
また、熱源運転計画では、例えば30分程度の短い周期で計画を立てたり、機器故障や熱負荷の急激な変化等の現場状況変化に応じて即座に計画を立て直したりするような状況にも対応することができる。このため、熱源運転計画の計算周期内で、実績データに基づいて関数を再生成する、多数の関数を生成する、というような応用が可能となり、産業上、極めて大きな効果を得ることが可能となる。 The heat source operation plan also supports situations such as making a plan with a short period of about 30 minutes, or instantly reestablishing a plan in response to changes in site conditions such as equipment failure or sudden changes in heat load. can do. For this reason, applications such as regenerating functions based on actual data and generating a large number of functions within the calculation cycle of the heat source operation plan are possible, and it is possible to obtain extremely significant effects on the industry. Become.
[発明の原理]
まず、本発明の原理について説明する。
一般に、区分線形近似関数では、「過学習」や「オーバーフィッティング」と呼ばれる問題を避けるために、なるべく区分数を少なくしたいというニーズがある。また、熱源運転計画のための混合整数計画に用いる場合、その計算負荷の観点からも、区分数は少ない方がよい。
[Principle of the Invention]
First, the principle of the present invention will be described.
In general, in the piecewise linear approximation function, there is a need to reduce the number of sections as much as possible in order to avoid problems called “overlearning” and “overfitting”. Moreover, when it uses for the mixed integer plan for a heat source operation plan, it is better that the number of divisions is small also from the viewpoint of calculation load.
特に、熱源運転計画では、例えば30分程度の短い周期で計画を立てたり、機器故障や熱負荷の急激な変化等の現場状況変化に応じて即座に計画を立て直したりする必要がある。このため、計算負荷を削減し、短い所要時間で計算結果を出すことが肝要となる。
また、区分数が少ない区分線形近似関数の生成を簡易かつ高速に行うことができれば、熱源運転計画の計算周期内で、実績データに基づいて関数を再生成したり、多数の関数を生成したり、といった応用が可能となり、産業上の効果が大きい。
In particular, in the heat source operation plan, it is necessary to make a plan with a short cycle of, for example, about 30 minutes, or to immediately make a plan according to changes in the field situation such as equipment failure or a rapid change in heat load. For this reason, it is important to reduce the calculation load and output the calculation result in a short time.
In addition, if a piecewise linear approximation function with a small number of sections can be generated easily and at high speed, the function can be regenerated based on the actual data or many functions can be generated within the calculation cycle of the heat source operation plan. Application is possible, and industrial effects are great.
前述したように、区分線形近似関数は、各区分の線形近似関数が連結された関数であり、区分数を少なくするための方法として、隣接する区分を1つにまとめる方法が考えられる。本発明は、隣接する区分を1つにまとめるための具体的方法として、隣接する区分の線形近似関数を1つの線形近似関数で表現すること、すなわち「隣り合う区分の線形近似関数の傾きの差」を小さくすることに着目した。 As described above, the piecewise linear approximation function is a function in which the linear approximation functions of the respective sections are connected. As a method for reducing the number of sections, a method of combining adjacent sections into one can be considered. According to the present invention, as a specific method for grouping adjacent sections, the linear approximation function of adjacent sections is expressed by one linear approximation function, that is, “the difference in the slopes of the linear approximation functions of adjacent sections”. We focused on making it smaller.
「隣り合う区分の線形近似関数の傾きの差」が小さくなり、やがて同じになれば、それらの区分については同じ線形近似関数で表現できる。図19は、隣り合う区分の線形近似関数の傾きの差を示す説明図である。例えば、図19において、隣り合う区分の線形近似関数の傾き傾きg1,g2の差がなくなると、これら線形近似関数を1つの線形近似関数で表現できる。このため、これら区分は1つであると見なせるため、結果的に区分の数が少なくなるはずである。 If the “difference in the slope of the linear approximation function of adjacent sections” becomes smaller and eventually becomes the same, these sections can be expressed by the same linear approximation function. FIG. 19 is an explanatory diagram showing the difference in slope of the linear approximation function between adjacent sections. For example, in FIG. 19, when there is no difference between the slopes g1 and g2 of the linear approximation functions of adjacent sections, these linear approximation functions can be expressed by one linear approximation function. For this reason, since these divisions can be regarded as one, the number of divisions should be reduced as a result.
ここで、区分線形近似関数の生成は、区分ごとの線形近似関数の組合せを最適化する組合せ最適化問題と見なすことができる。しかしながら、「隣り合う区分の線形近似関数の傾きの差」を小さくすることを目的関数または制約条件にした場合、区分線形近似関数の生成は、組合せ最適化問題とはならない。連続変数のみを用いた最適化問題として定式化できる。 Here, the generation of the piecewise linear approximation function can be regarded as a combination optimization problem that optimizes the combination of the linear approximation functions for each piece. However, when the objective function or the constraint condition is to reduce the “difference in the slope of the linear approximation function of adjacent sections”, the generation of the piecewise linear approximation function is not a combinatorial optimization problem. It can be formulated as an optimization problem using only continuous variables.
本発明は、このような観点から、「近似誤差」が小さくなるような目的関数および/または制約条件と、「隣り合う区分の線形近似関数の傾きの差」が小さくなるような目的関数および/または制約条件に加えて、隣り合う区分の線形近似関数による近似値が節点で一致するような制約条件を置いた最適化問題を解くことにより、区分数が少ない区分線形近似関数を生成するようにしたものである。 From this point of view, the present invention provides an objective function and / or a constraint condition that reduces the “approximation error” and an objective function that reduces the “difference in the slope of the linear approximation function of adjacent segments” and / or Or, in addition to the constraint conditions, solve the optimization problem with the constraint condition that the approximate values of the linear approximation functions of adjacent segments match at the nodes, so that a piecewise linear approximation function with a small number of segments is generated. It is a thing.
この場合、「隣り合う区分の線形近似関数の傾きの差」を小さくしようとしても、傾きが少しずつ違う区分がたくさんできるだけで、区分の数がうまく少なくならない可能性がある。そこで、次のような対策1,2が考えられる。
In this case, even if an attempt is made to reduce the “difference in the slope of the linear approximation function of adjacent segments”, there may be many segments with slightly different gradients, and the number of segments may not be reduced well. Therefore, the following
対策1:「隣り合う区分の線形近似関数の傾きの差」の大きさを、絶対値の和(L1ノルム)で表す。
対策2:絶対値の和を取る前に、それぞれの絶対値を係数で除して基準化を行う。係数の決め方は、一旦、係数を用いずに(=係数を1と置いて)最適化を行い、その結果得られた絶対値そのものを、係数として使う。
本発明は、このような対策1のみを実施するか、あるいは対策1,2の両方を実施するようにしたものである。
Countermeasure 1: The magnitude of “the difference between the slopes of the linear approximation functions of adjacent sections” is expressed by the sum of absolute values (L1 norm).
Countermeasure 2: Before taking the sum of absolute values, standardize by dividing each absolute value by a coefficient. In determining the coefficient, optimization is performed once without using the coefficient (= the coefficient is set to 1), and the absolute value obtained as a result is used as the coefficient.
In the present invention, only
[第1の実施の形態]
次に、本発明の実施の形態について図面を参照して説明する。
まず、図1を参照して、本発明の第1の実施の形態にかかる区分線形近似関数生成装置10について説明する。図1は、第1の実施の形態にかかる区分線形近似関数生成装置の構成を示すブロック図である。
[First Embodiment]
Next, embodiments of the present invention will be described with reference to the drawings.
First, a piecewise linear approximation
この区分線形近似関数生成装置10は、全体としてサーバ装置などの情報処理装置からなり、複数の入出力データと予め設定された複数の節点候補とに基づいて、入出力データの各区分を線形近似関数で近似する区分線形近似関数を生成する装置である。
This piecewise linear approximation
図1に示すように、区分線形近似関数生成装置10には、主な機能部として、通信I/F部11、操作入力部12、画面表示部13、記憶部14、および演算処理部15が設けられている。
As shown in FIG. 1, the piecewise linear approximation
通信I/F部11は、通信回線を介して外部装置(図示せず)との間で、入出力データや節点候補など、区分線形近似関数の生成処理に用いる各種データや、得られた区分線形近似関数に関するデータをやり取りする機能を有している。
操作入力部12は、キーボード、マウス、タッチパネルなどの操作入力装置からなり、オペレータの操作を検出して演算処理部15へ出力する機能を有している。
The communication I /
The
画面表示部13は、LCDなどの画面表示装置からなり、操作メニュー画面、各種入力・設定画面、得られた区分線形近似関数を示す結果画面など、演算処理部15から出力された各種画面を表示する機能を有している。
The
記憶部14は、ハードディスクや半導体メモリなどの記憶装置からなり、演算処理部15で実行される区分線形近似関数の生成処理に用いる各種処理データや、予め外部から登録されたプログラム14Pを記憶する機能を有している。
記憶部14で記憶される主な処理データとして、入出力データ14Aおよび節点候補14Bがある。
The
Main processing data stored in the
入出力データ14Aは、入力データ(x)と出力データ(y)の組が複数登録されたデータである。節点候補14Bは、入力データ空間に設定された各区分の境界、すなわち区分線形近似関数の節点を示すデータである。
The input /
演算処理部15は、CPUなどのマイクロプロセッサを有し、記憶部14のプログラムを読み出して実行することにより、区分線形近似関数の生成処理を行う各種処理部を実現する機能を有している。
演算処理部15で実現される主な処理部として、設定処理部15A、最適化問題定式化部15B、最適化処理部15C、および区分線形近似関数生成部15Dがある。
The
As main processing units realized by the
設定処理部15Aは、通信I/F部11を介して取得した入出力データ14Aを記憶部14に登録する機能と、操作入力部12から操作入力された節点候補14Bを記憶部14に設定する機能とを有している。
The setting
最適化問題定式化部15Bは、記憶部14の入出力データ14Aおよび節点候補14Bに基づいて、各区分における線形近似関数のそれぞれについて、傾きおよび切片を求めるための最適化問題を定式化する機能を有している。
The optimization
より具体的には、最適化問題定式化部15Bは、入出力データ14Aに対する区分線形近似関数の近似誤差を表す誤差項を、最適化問題に関する目的関数として定式化する機能と、区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項、例えば傾き差のすべてに関するL1ノルムからなる正則化項を、最適化問題に関する目的関数として定式化する機能と、隣り合う区分の線形近似関数による近似値が節点で一致することを最適化問題に関する制約条件として定式化する機能とを有している。
More specifically, the optimization
最適化処理部15Cは、最適化演算を実行することにより最適化問題の解を求める機能を有している。
区分線形近似関数生成部15Dは、最適化処理部15Cで得られた最適化問題の解に基づいて、各区部の線形近似関数のそれぞれを生成することにより、区分線形近似関数を生成する機能を有している。
The
The piecewise linear approximation
[第1の実施の形態の動作]
次に、図2を参照して、本実施の形態にかかる区分線形近似関数生成装置10の動作について説明する。図2は、第1の実施の形態にかかる区分線形近似関数生成処理を示すフローチャートである。
区分線形近似関数生成装置10の演算処理部15は、操作入力部12で検出されたオペレータ操作に応じて、図2の区分線形近似関数生成処理を実行する。
[Operation of First Embodiment]
Next, the operation of the piecewise linear approximation
The
まず、図2において、設定処理部15Aは、通信I/F部11を介して取得した入出力データ14Aを記憶部14に登録するとともに(ステップ100)、操作入力部12から操作入力された節点候補14Bを記憶部14に設定する(ステップ101)。
First, in FIG. 2, the setting
入出力データ14Aとして、入力データと出力データの組がN(Nは2以上の整数)個与えられたとする。また、n(nは3以上の整数)個の節点候補xi(i=1,2,…,n)が設定されたとする。xiはiに関して昇順に並べ替えてあるもの、すなわち、x1<x2<…<xnが成り立っているものとする。節点候補は、入力データそのものでもよいし、x1からxnの範囲を等間隔に区切るなどして設定してもよい。x1とxnは、入力データの最小値と最大値でもよいし、入力データを含む範囲で任意の値を設定してもよい。
Assume that N sets of input data and output data (N is an integer of 2 or more) are provided as the input /
節点候補と一致する入力データに対する出力データを、yi(i=1,2,…,n)とする。ただしi=jのときは、出力データが存在しない、すなわち節点候補上にデータがないものとする。jの個数をnjとする。
また、節点候補と一致しない入力データとそれに対応する出力データについては、節点候補xiと節点候補xi+1に挟まれた区分Siにmi個の入出力データがあるとき、これら入出力データの入力データをx[i]k(k=1,2,…,mi)と表し、対応する出力データをy[i]kと表すものとする。したがって、入出力データの個数Nは、次の式(1)で表される。
Further, the output data corresponding thereto input data does not match the node candidates, when the segment S i sandwiched node candidate x i and the node candidate x i + 1 is m i pieces of input data, these entry The input data of the output data is represented as x [i] k (k = 1, 2,..., M i ), and the corresponding output data is represented as y [i] k . Therefore, the number N of input / output data is expressed by the following equation (1).
図3は、入出力データと節点候補を示す説明図である。この例では、節点候補としてx1,x2,x3,x4の4個(n=4)が設定されており、これら節点候補x1,x2,x3,x4で区切られた3つの区分S1,S2,S3が設けられている。節点候補x1,x2,x3,x4のうち、x1は下限値であり、x4は上限値であるものとする。
x2上には出力データy2が存在するが、x1,x3,x4上には出力データが存在せず、j=1,3,4である。また、x1とx2の間の区分S1には入出力データが存在せず、m1=0である。一方、x2とx3の間の区分S2には1つの入出力データ(x[2]1,y[2]1)が存在し、m2=1であり、同じく、x3とx4の間の区分S3には2つの入出力データ(x[3]1,y[3]1)と(x[3]2,y[3]2)とが存在し、m3=2である。したがって、入出力データの個数Nは、N=4−3+(0+1+2)=4である。
FIG. 3 is an explanatory diagram showing input / output data and node candidates. In this example, four x 1, x 2, x 3 , x 4 as a node candidate (n = 4) are set, separated by these nodes candidate x 1, x 2, x 3 , x 4 Three sections S 1 , S 2 , S 3 are provided. Of the node candidates x 1 , x 2 , x 3 , and x 4 , x 1 is a lower limit value and x 4 is an upper limit value.
Output data y 2 exists on x 2 , but no output data exists on x 1 , x 3 , and x 4 , and j = 1, 3, and 4. In addition, there is no input / output data in the section S 1 between x 1 and x 2 , and m 1 = 0. On the other hand, the division S 2 between x 2 and x 3 there is one input and output data (x [2] 1, y [2] 1), a m 2 = 1, again, x 3 and x 4 the division S 3 between the present two input data (x [3] 1, y [3] 1) and a (x [3] 2, y [3] 2) is, m 3 = 2 It is. Therefore, the number N of input / output data is N = 4−3 + (0 + 1 + 2) = 4.
次に、図2において、最適化問題定式化部15Bは、入出力データ14Aに対する区分線形近似関数の近似誤差を表す誤差項EDを、最適化問題に関する目的関数として定式化する(ステップ102)。
区分線形近似関数をh(x)とし、h(x)による出力データyiの近似値をy^i=h(xi)や、y^[i]k=h(x[i]k)で表すものとする。
また、節点候補xiと節点候補xi+1に挟まれた区間の線形近似関数の傾きを、giとする。
Next, in FIG. 2, the optimization
The piecewise linear approximation function is h (x), and the approximate value of the output data y i by h (x) is y ^ i = h (x i ), y ^ [i] k = h (x [i] k ) It shall be expressed as
Also, let g i be the slope of the linear approximation function in the interval between node candidate x i and node candidate x i + 1 .
図4は、線形近似関数の傾きと近似値を示す説明図である。この例では、節点候補x1,x2,x3,x4で区切られた3つの区分S1,S2,S3が設けられており、これら区分S1,S2,S3の傾きがg1,g2,g3である。また、x1,x2,x3,x4と対応する出力データy1,y2,y3,y4の近似値がy^1,y^2,y^3,y^4であり、入出力データ(x[2]1,y[2]1),(x[3]1,y[3]1),(x[3]2,y[3]2)の近似値がy^[2]1,y^[3]1,y^[3]2である。 FIG. 4 is an explanatory diagram showing the slope and approximate value of the linear approximation function. In this example, three sections S 1 , S 2 , S 3 divided by node candidates x 1 , x 2 , x 3 , x 4 are provided, and the slopes of these sections S 1 , S 2 , S 3 are provided. Are g 1 , g 2 , and g 3 . Also, the approximate values of the output data y 1 , y 2 , y 3 , y 4 corresponding to x 1 , x 2 , x 3 , x 4 are y ^ 1 , y ^ 2 , y ^ 3 , y ^ 4 . , The approximate value of the input / output data (x [2] 1 , y [2] 1 ), (x [3] 1 , y [3] 1 ), (x [3] 2 , y [3] 2 ) is y ^ [2] 1 , y ^ [3] 1 , y ^ [3] 2 .
ここで、入出力データに対する区分線形近似関数の近似誤差が小さくなるような目的関数および/または制約条件を置くために、誤差項EDを、次の式(2)で定義する。式(2)は、誤差の平方和を表している。
なお、入出力データ14Aに、同じ入力データを持つ出力データが複数存在する場合、式(2)の誤差計算に含めればよい。例えば、(x1,y1)と(x1,y'1)という、同じ入力データx1を持つ入出力データy1,y'1が2つあった場合、(y1−y^1)2だけでなく、(y'1−y^1)2も誤差項EDの総和に含めればよい。
In the case where there are a plurality of output data having the same input data in the input /
次に、図2において、最適化問題定式化部15Bは、各区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項EWを、最適化問題に関する目的関数として定式化する(ステップ103)。
ここでは、「隣り合う区分の線形近似関数の傾きの差」が小さくなるような目的関数および/または制約条件を置くために、正則化項EWを次の式(3)で定義する。式(3)は、傾き差のすべてに関する絶対値の和、すなわちL1ノルムを表している。
Here, the regularization term E W is defined by the following equation (3) in order to set an objective function and / or a constraint condition that “the difference in the slopes of the linear approximation functions of adjacent segments” becomes small. Equation (3) represents the sum of absolute values for all of the slope differences, ie, the L1 norm.
次に、図2において、最適化問題定式化部15Bは、隣り合う区分の線形近似関数による近似値が節点で一致すること、すなわち近似値一致制約を、最適化問題に関する制約条件として定式化する(ステップ104)。
この近似値一致は、次の式(4)の1行目で表すことができる。また、2行目の式は、区分内部の近似値が、近似直線と一致する(直線上に乗る)ことを表している。
This approximate value match can be represented by the first line of the following equation (4). The expression in the second row represents that the approximate value inside the section matches the approximate straight line (gets on the straight line).
次に、図2において、最適化問題定式化部15Bは、このようにして定式化した個々の目的関数および制約条件を統合して、各区分における線形近似関数のそれぞれについて、傾きおよび切片を求めるための最適化問題を、次の式(5)のように定式化する(ステップ105)。
最小化したい目的関数は、誤差項EDと正則化項EWの重み付き線形和である。λ>0は正則化項EWに対する重みであり、重みを大きくすれば、区分線形近似関数の区間の数がより少なくなることが期待できる。
図2において、最適化処理部15Cは、操作入力部12で検出されたオペレータ操作に応じて、正則化項EWに対する重みλを設定し(ステップ106)、この重みλで規定された式(5)に基づいて最適化演算を実行することにより最適化問題を求解する(ステップ107)。
The objective function to be minimized is a weighted linear sum of the error term E D and the regularization term E W. λ> 0 is a weight for the regularization term E W. If the weight is increased, it can be expected that the number of sections of the piecewise linear approximation function is reduced.
In FIG. 2, the
この際、中間変数vi(i=1,2,…,n−2)を導入し、中間変数viを用いて正則化項を新たに定義すれば、上記式(5)は次の式(6)のように表現できる。式(6)の正則化項Ewは、中間変数viの総和である。この式(6)は、いわゆる「二次計画問題」である。したがって、この問題は、組合せ最適化問題に比較して、容易に、高速に解くことができる。
この後、図2において、区分線形近似関数生成部15Dは、最適化処理部15Cで得られた最適化問題の解に基づいて、各区部の線形近似関数のそれぞれを生成することにより、区分線形近似関数を生成する(ステップ108)。
ここで、式(6)の最適化問題を解いた結果、傾きgi(i=1,2,…,n−1)を並べた結果が、次の式(7)のようになったとする。
Here, as a result of solving the optimization problem of equation (6), the result of arranging the gradients g i (i = 1, 2,..., N−1) is as shown in the following equation (7). .
式(7)は、最初のs1個の傾き、すなわちgiからgs1が、同じ傾きとなったことを意味する。また、その次のs2個の傾き、すなわち、gs1からgs2が、また同じ傾きになったことを意味する。このようにして、得られた傾きがp個に区分されたことを意味する。ここで、微小な誤差はゼロと見なしてよい。また、傾きが同じであっても、隣り合っていなければ、異なるものと見なす。
以上より、採用する節点は、x1,xs1+1,xs1+s2+1,…,xs1+…+sp+1であり、採用する節点の数はp+1個となる。ただし、x1は下限値、xs1+…+sp+1は上限値であり、区分の数はp個である。
Equation (7) means that the first s 1 slopes, ie, g i to g s1 have the same slope. It also means that the next s 2 slopes, that is, g s1 to g s2 have the same slope again. This means that the obtained slope is divided into p pieces. Here, a minute error may be regarded as zero. Even if the inclination is the same, if they are not adjacent, they are considered different.
From the above, the nodes to be adopted are x 1 , x s1 + 1 , x s1 + s2 + 1 ,..., X s1 +... + Sp + 1 , and the number of nodes to be adopted is p + 1. However, x 1 is the lower limit, x s1 + ... + sp + 1 is the upper limit value, the number of division is a p number.
ここで、p個の傾きを、改めてg[1],g[2],…,g[p]で表すと、区分線形近似関数h(x)は、次の式(8)で表せる。
なお、切片b[1],b[2],…,b[p]は、最適化問題を解いた結果得られた近似値を用いて、次の式(9)から求めればよい。
図5は、区分線形近似関数の生成例である。ここでは、x1からx3までの区分S1では、m1=2個の傾きg1とg2から傾きg[1]が導出され、x3からx7までの区分S2では、m2=4個の傾きg3,g4,g5,g6から傾きg[2]が導出され、x7からx11までの区分S2では、m3=4個の傾きg7,g8,g9,g10から傾きg[3]が導出されている。 FIG. 5 is an example of generating a piecewise linear approximation function. Here, the division S 1 from x 1 to x 3, the gradient g [1] is derived from m 1 = 2 single slope g 1 and g 2, the segment S 2 from x 3 to x 7, m 2 = Slope g [2] is derived from 4 slopes g 3 , g 4 , g 5 , g 6, and in section S 2 from x 7 to x 11 , m 3 = 4 slopes g 7 , g The slope g [3] is derived from 8 , g 9 and g 10 .
ここで、得られた区分線形近似関数h(x)が所望の範囲のものか確認し(ステップ109)、得られた区分線形近似関数h(x)の近似誤差が大きかったり、区分数が多かったりして、所望の区分線形近似関数h(x)が得られていない場合(ステップ109:NO)、ステップ106に戻って、正則化項EWに対する重みλの大きさを変更すればよい。λを小さくすれば近似誤差が小さくなり、λを大きくすれば区分の数が少なくなることが期待できる。 Here, it is confirmed whether the obtained piecewise linear approximation function h (x) is in a desired range (step 109). The obtained piecewise linear approximation function h (x) has a large approximation error or a large number of pieces. If the desired piecewise linear approximation function h (x) is not obtained (step 109: NO), the process returns to step 106 to change the magnitude of the weight λ with respect to the regularization term E W. If λ is reduced, the approximation error is reduced, and if λ is increased, the number of sections can be expected to be reduced.
一方、得られた区分線形近似関数h(x)が所望の範囲のものである場合(ステップ109:YES)、得られた区分線形近似関数h(x)を画面表示部13で画面表示し、あるいは通信I/F部11から外部へ出力して、一連の区分線形近似関数の生成処理を終了する。
On the other hand, when the obtained piecewise linear approximation function h (x) is within a desired range (step 109: YES), the obtained piecewise linear approximation function h (x) is displayed on the
図6は、第1の実施の形態による区分線形近似関数の生成例である。ここでは、前述した図16と同様に、入力データが[−2,4]の範囲で0.01刻みの等間隔に配置されている。出力データは、ある非線形関数にガウシアンノイズを載せ、1点だけ外れ値を置いたものであり、入出力データの個数は計601個ある。 FIG. 6 is an example of generating a piecewise linear approximation function according to the first embodiment. Here, similarly to FIG. 16 described above, the input data is arranged at equal intervals of 0.01 in the range of [−2, 4]. Output data is obtained by placing Gaussian noise on a non-linear function and placing an outlier by one point. The total number of input / output data is 601.
この区分線形近似関数の生成処理では、全ての入力データを節点候補として設定した。よって、上下限値を除いた節点候補は599個存在することになる。正則化項に対する重みλは適当な値を設定した。
この結果、区分数が10個の区分線形近似関数が得られ、外れ値の影響は受けていないことが分かる。また、最適化処理には、一般に流通する二次計画ソルバを用いたが、非常に短時間で計算することができた。
In this piecewise linear approximation function generation process, all input data are set as node candidates. Therefore, there are 599 node candidates excluding the upper and lower limit values. The weight λ for the regularization term is set to an appropriate value.
As a result, a piecewise linear approximation function having 10 pieces is obtained, and it is understood that there is no influence of outliers. In addition, a general-purpose quadratic programming solver was used for the optimization process, but the calculation was possible in a very short time.
[第1の実施の形態の効果]
このように、本実施の形態は、最適化問題定式化部15Bが、入出力データ14Aおよび節点候補14Bに基づいて、線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化し、この際、入出力データ14Aに対する区分線形近似関数の近似誤差を表す誤差項EDを、最適化問題に関する目的関数として定式化し、区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項EWを、最適化問題に関する目的関数として定式化し、隣り合う区分の線形近似関数による近似値が節点で一致することを最適化問題に関する制約条件として定式化するようにしたものである。
[Effect of the first embodiment]
As described above, according to the present embodiment, the optimization
これにより、線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を、連続変数のみを用いた最適化問題として定式化することができる。したがって、なるべく区分数の少ない区分線形近似関数を生成することができ、近似誤差が小さく、かつ、区分の数が少ない区分線形近似関数を、少ない計算負荷で生成することが可能となる。このため、区分線形近似関数における「過学習」や「オーバーフィッティング」と呼ばれる問題を避けることができる。 Thereby, the optimization problem for obtaining the slope and intercept for each of the linear approximation functions can be formulated as an optimization problem using only continuous variables. Therefore, it is possible to generate a piecewise linear approximation function with as few pieces as possible, and to produce a piecewise linear approximation function with a small approximation error and a small number of pieces with a small calculation load. For this reason, problems called “overlearning” and “overfitting” in the piecewise linear approximation function can be avoided.
また、熱源運転計画では、熱源運転計画では、例えば30分程度の短い周期で計画を立てたり、機器故障や熱負荷の急激な変化等の現場状況変化に応じて即座に計画を立て直したりするような状況にも対応することができる。このため、熱源運転計画の計算周期内で、実績データに基づいて関数を再生成する、多数の関数を生成する、というような応用が可能となり、産業上、極めて大きな効果を得ることが可能となる。 In addition, in the heat source operation plan, in the heat source operation plan, for example, a plan is made in a short cycle of about 30 minutes, or a plan is immediately reestablished in response to a change in the site situation such as equipment failure or a rapid change in heat load. It is possible to cope with any situation. For this reason, applications such as regenerating functions based on actual data and generating a large number of functions within the calculation cycle of the heat source operation plan are possible, and it is possible to obtain extremely significant effects on the industry. Become.
[第2の実施の形態]
次に、図7を参照して、本発明の第2の実施の形態にかかる区分線形近似関数生成装置10について説明する。図7は、第2の実施の形態にかかる区分線形近似関数生成装置の構成を示すブロック図であり、図1と同じまたは同等部分には同一符号を付してある。
[Second Embodiment]
Next, the piecewise linear approximation
前述した第1の実施の形態によれば、入出力データ14Aによって、区分数がうまく少なくならない可能性がある。本実施の形態では、図7に示すように、第1の実施の形態の構成のうち、演算処理部15に、前述した正則化項EWを基準化する基準化処理部15Eを追加したものである。
According to the first embodiment described above, there is a possibility that the number of sections may not be reduced well by the input /
この基準化処理部15Eは、各区分のうち隣り合う区分の線形近似関数に関する傾き差ごとに設けた所定の係数を用いて、正則化項EWを基準化する機能を有している。
すなわち、本実施の形態では、正則化項EWとして前述した式(3)を用いる代わりに、次の式(10)のように、正の係数diを用いて、「基準化」を行う。
That is, in this embodiment, instead of using the above-described equation (3) as the regularization term E W , “standardization” is performed using a positive coefficient d i as in the following equation (10). .
ここで、係数diの設定方法について説明する。
初回の基準化では、初期値としてdi=1とする。これは、式(10)と式(3)が等価であることを意味する。その上で、最適化問題を解き、得られた傾きをg*iとする。得られた傾きg*iを用いて、次の式(11)に従ってdiを更新する。
In the initial standardization, d i = 1 is set as an initial value. This means that equation (10) and equation (3) are equivalent. Then, the optimization problem is solved and the obtained gradient is set as g * i . Using the obtained gradient g * i , d i is updated according to the following equation (11).
この際、εは、ゼロ割を防ぐための微小な正の数であり、予め適当に設定すればよい。max(a,b)は、a,bのうち大きな値を取る関数を意味する。diは、最適化を行うたびに更新してよい。 At this time, ε is a minute positive number for preventing zero division and may be set appropriately in advance. max (a, b) means a function that takes a large value of a and b. d i may be updated each time optimization is performed.
図8は、第2の実施の形態にかかる区分線形近似関数生成処理を示すフローチャートであり、図2と同じまたは同等部分には同一符号を付してある。
前述した図2と比較して、ステップ106とステップ107の間に、基準化処理部15Eが式(10)および式(11)に従って、正則化項EWを基準化する処理(ステップ200)が追加されている。
これにより、区分数がうまく少なくならない入出力データ14Aであっても、区分数の少ない区分線形近似関数を生成することが可能となる。
FIG. 8 is a flowchart showing the piecewise linear approximation function generation processing according to the second embodiment, and the same or equivalent parts as in FIG.
Compared with FIG. 2 described above, between
As a result, it is possible to generate a piecewise linear approximation function with a small number of sections even for the input /
なお、所望の区分線形近似関数h(x)が得られていない場合(ステップ109:NO)、ステップ106に戻って、正則化項EWに対する重みλの大きさを変更してもよく、ステップ200に戻って、正則化項EWを基準化し直してもよい。λを小さくすれば近似誤差が小さくなり、λを大きくすれば区分の数が少なくなることが期待できる。 If the desired piecewise linear approximation function h (x) is not obtained (step 109: NO), the process returns to step 106, and the magnitude of the weight λ for the regularization term E W may be changed. Returning to 200, the regularization term E W may be rescaled. If λ is reduced, the approximation error is reduced, and if λ is increased, the number of sections can be expected to be reduced.
図9は、第2の実施の形態による区分線形近似関数の生成例である。ここでは、前述した図16と同様に、入力データが[−2,4]の範囲で0.01刻みの等間隔に配置されている。出力データは、ある非線形関数にガウシアンノイズを載せ、1点だけ外れ値を置いたものであり、入出力データの個数は計601個ある。 FIG. 9 is an example of generating a piecewise linear approximation function according to the second embodiment. Here, similarly to FIG. 16 described above, the input data is arranged at equal intervals of 0.01 in the range of [−2, 4]. Output data is obtained by placing Gaussian noise on a non-linear function and placing an outlier by one point. The total number of input / output data is 601.
この区分線形近似関数の生成処理では、全ての入力データを節点候補として設定した。よって、上下限値を除いた節点候補は599個存在することになる。正則化項に対する重みλは図6の場合と同じ値を設定した。
この結果、区分数が図6の10個より少ない4個の区分線形近似関数が得られ、外れ値の影響は受けておらず、より自然な近似が得られていることが分かる。
In this piecewise linear approximation function generation process, all input data are set as node candidates. Therefore, there are 599 node candidates excluding the upper and lower limit values. The weight λ for the regularization term was set to the same value as in FIG.
As a result, four piecewise linear approximation functions having the number of pieces less than 10 in FIG. 6 are obtained, and it is understood that a more natural approximation is obtained without being influenced by the outlier.
[第3の実施の形態]
次に、本発明の第3の実施の形態にかかる区分線形近似関数生成装置10について説明する。
第1の実施の形態では、入出力データ14Aに対する区分線形近似関数の近似誤差を表す誤差項EDを、最適化問題に関する目的関数として定式化し、区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項EWを、最適化問題に関する目的関数として定式化する場合を例として説明したが、これら誤差項EDおよび正則化項EWのいずれか一方または両方を、最適化問題に関する制約条件として定式してもよい。
[Third Embodiment]
Next, a piecewise linear approximation
In the first embodiment, the error term E D representing the approximation error of the piecewise linear approximation function with respect to the input /
誤差項EDおよび正則化項EWを制約条件に含めるには、誤差項EDの上限r、正則化項EWの上限lを設定した上で、次の式(12)を、前述した式(6)の制約条件に含めればよい。誤差項EDは二次形式であるため、誤差項EDを制約条件に含んだ最適化問題は、「二次制約問題」となる。この問題も、組合せ最適化問題に比較して容易かつ高速に解くことができる。
なお、誤差項EDを制約条件に含める場合には、目的関数には含めなくともよい。同様に、正則化項EWを制約条件に含める場合には、目的関数には含めなくともよい。
誤差項ED、正則化項の少なくともいずれか一方を目的関数に含めない場合、正則化項EWに対する重みλは不要であり、設定しなくてよい。
誤差項ED、正則化項EWのどちらも目的関数に含めない場合、最適化問題は、目的関数が存在せず、制約条件のみが存在する「実行可能性問題」となるが、同様に求解可能である。
When the error term E D is included in the constraint condition, it is not necessary to include it in the objective function. Similarly, when the regularization term E W is included in the constraint condition, it may not be included in the objective function.
If at least one of the error term E D and the regularization term is not included in the objective function, the weight λ for the regularization term E W is not necessary and need not be set.
If neither the error term E D nor the regularization term E W is included in the objective function, the optimization problem is an “executability problem” in which the objective function does not exist and only the constraints exist. Can be solved.
[第4の実施の形態]
次に、本発明の第4の実施の形態にかかる区分線形近似関数生成装置10について説明する。
最適化問題は、二次計画問題ではなく、線形計画問題とすることもできる。その場合は、誤差項EDを、前述した式(2)で表されるような誤差の平方和ではなく、次の式(13)のように、誤差の絶対値の和とすればよい。なお、絶対値表現の線形表現への変換は、式(5)から式(6)で行った、正則化項の変換と同じように、中間変数を用いて行えばよい。
Next, a piecewise linear approximation
The optimization problem can be a linear programming problem instead of a quadratic programming problem. In that case, the error term E D may be the sum of absolute values of errors as shown in the following equation (13), not the sum of squares of the error represented by the above equation (2). Note that the conversion from the absolute value expression to the linear expression may be performed using intermediate variables in the same way as the conversion of the regularization term performed in Expression (5) to Expression (6).
[第5の実施の形態]
次に、図10を参照して、本発明の第5の実施の形態にかかる区分線形近似関数生成装置10について説明する。図10は、第5の実施の形態にかかる区分線形近似関数生成装置の構成を示すブロック図であり、図1と同じまたは同等部分には同一符号を付してある。
[Fifth Embodiment]
Next, a piecewise linear approximation
前述した第1〜第4の実施の形態では、入力が1次元の線形近似関数、いわゆる折れ線の生成する場合を例として説明した。本実施の形態では、入力が多次元である場合について説明する。なお、本実施の形態にかかる区分線形近似関数生成装置10の構成は、図1と同様であり、ここでの詳細な説明は省略する。
In the above-described first to fourth embodiments, the case where the input is a one-dimensional linear approximation function, that is, a so-called broken line is described as an example. In this embodiment, a case where the input is multidimensional will be described. The configuration of the piecewise linear approximation
入力が多次元である場合、2つの線形近似関数が節点で接続されるのではなく、3つ以上の線形近似関数が頂点で接続されることになるため、入力が1次元である場合の「節点」を「頂点」に置き換えればよいことになる。したがって、記憶部14には、節点候補14Bに代えて、頂点候補14Cが登録されている。
When the input is multidimensional, two linear approximation functions are not connected at the nodes, but three or more linear approximation functions are connected at the vertices. It is only necessary to replace “node” with “vertex”. Therefore, the
すなわち、本発明は、「近似誤差」が小さくなるような目的関数および/または制約条件と、「隣り合う区分の線形近似関数の傾きの差」が小さくなるような目的関数および/または制約条件に加えて、隣り合う区分の線形近似関数による近似値が「頂点」で一致するような制約条件を置いた最適化問題を解くことにより、区分数が少ない区分線形近似関数を生成するようにしたものである。 That is, according to the present invention, an objective function and / or a constraint condition in which the “approximation error” is small and an objective function and / or constraint condition in which the “difference in the slope of the linear approximation function of adjacent segments” is small. In addition, a piecewise linear approximation function with a small number of sections is generated by solving an optimization problem with a constraint condition that the approximation values of adjacent section linear approximation functions match at the "vertex" It is.
[第5の実施の形態の動作]
次に、図11を参照して、本実施の形態にかかる区分の線形近似関数生成装置10の動作について説明する。図11は、第5の実施の形態にかかる区分線形近似関数生成処理を示すフローチャートであり、図2と同じまたは同等部分には同一符号を付してある。
区分線形近似関数生成装置10の演算処理部15は、操作入力部12で検出されたオペレータ操作に応じて、図11の区分線形近似関数生成処理を実行する。
[Operation of Fifth Embodiment]
Next, with reference to FIG. 11, the operation of the segmented linear approximate
The
まず、図11において、設定処理部15Aは、通信I/F部11を介して取得した入出力データ14Aを記憶部14に登録するとともに(ステップ100)、操作入力部12から操作入力された頂点候補14Cを記憶部14に設定する(ステップ101)。
First, in FIG. 11, the setting
入力の次元数がpであるとすると、区分は、p+1個の頂点を持つシンプレックスとなる。例えば、入力が2次元の場合、シンプレックスは三角形である。
図12は、入力が2次元の場合の区分を示す説明図である。例えば、入力がx1,x2の2次元で、出力yは1次元であるとした場合、各区分(三角形)は、例えば図12のように定義できる。この例では、区分数は、全部で224個となっており、頂点数は135個である。
If the number of input dimensions is p, the partition is a simplex having p + 1 vertices. For example, if the input is two-dimensional, the simplex is a triangle.
FIG. 12 is an explanatory diagram showing classification when the input is two-dimensional. For example, when the input is two-dimensional x1 and x2 and the output y is one-dimensional, each section (triangle) can be defined as shown in FIG. In this example, the total number of sections is 224, and the number of vertices is 135.
図13は、2入力1出力の入出力データに関する区分線形近似関数例である。各頂点が、それぞれ出力値yを持つものとした場合、各区分を平面で表すと、つまり、各区分を別々の線形近似関数で表現すると、図13に示すように、すべての出力値と一致する区分線形近似関数を生成できる。 FIG. 13 shows an example of a piecewise linear approximation function related to input / output data having two inputs and one output. If each vertex has an output value y, each section is represented by a plane, that is, each section is represented by a separate linear approximation function, as shown in FIG. A piecewise linear approximation function can be generated.
次に、図11において、最適化問題定式化部15Bは、入出力データ14Aに対する区分線形近似関数の近似誤差を表す誤差項EDを、最適化問題に関する目的関数として定式化する(ステップ103)。
多次元の誤差項EDは、式(2)と同様に次の式(14)のように表すことができる。
The multidimensional error term E D can be expressed by the following equation (14) as in the equation (2).
ここで、yi,i≠jは、頂点iが持つ出力値であり、nは頂点iの合計数である。i=jの場合、その頂点は出力値を持たないとする。
また、y[I]kは、ある区分をSIとしたとき、その区分SIに含まれる(ただし頂点以外)出力値であり、その個数はmiである。また、Nは区分の合計数である。なお、出力値が区分と区分の境界上に位置していたとしても、近似誤差を重複して加算する必要はない。
Here, y i , i ≠ j is an output value of the vertex i, and n is the total number of the vertex i. When i = j, the vertex does not have an output value.
Further, y [I] k, when a certain segment was S I, is (but other than vertex) output values included in the classification S I, and the number is m i. N is the total number of sections. Even if the output value is located on the boundary between the sections, it is not necessary to add the approximation errors in duplicate.
次に、図11において、最適化問題定式化部15Bは、各区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項EWを、最適化問題に関する目的関数として定式化する(ステップ103)。
Next, in FIG. 11, the optimization
1次元の場合と同様に、「隣り合う区分の線形近似関数の傾きの差」をゼロにすれば、それらは同じ区分と見なせるので、区分の数を減らすことができる。2次元の場合、「隣り合う区分」とは、「辺」(線分)を共有している2つの三角形を意味する。p次元の場合、隣り合う区分とは、p−1次元超平面を共有している2つのシンプレックスを意味する。 As in the case of the one-dimensional case, if the “difference in the slope of the linear approximation function of adjacent segments” is set to zero, they can be regarded as the same segment, so the number of segments can be reduced. In the two-dimensional case, “adjacent section” means two triangles sharing “sides” (line segments). In the case of the p dimension, the adjacent section means two simplexes sharing the p-1 dimensional hyperplane.
隣り合う2つの区分をそれぞれSI,SJとし、SI,SJはそれぞれp次元方向の傾きを持つものとする。これらの傾きを、gI=[g[I]1,g[I]2,…,g[I]p]TおよびgJ=[g[J]1,g[J]2,…,g[J]p]Tで表す。Tは転置記号である。
各次元の傾きの差を取り、そのL2ノルムの計算を次の式(15)のように定義する。
Taking the difference in slope of each dimension, the calculation of the L2 norm is defined as the following equation (15).
また、式(3)に対応する多次元の正則化項EWは、次の式(16)のようにL2ノルムの総和として定義できる。ただし、「I,J∈A」は、「隣り合う区分の全ての組み合わせ」を意味している。
次に、図11において、最適化問題定式化部15Bは、隣り合う区分の線形近似関数による近似値が頂点で一致すること、すなわち近似値一致制約を、最適化問題に関する制約条件として定式化する(ステップ104)。
Next, in FIG. 11, the optimization
数式(4)に対応する多次元の制約条件は、次の式(17)のようになる。
2行目は、区分SIに含まれる区分内部の近似値が、近似直線と一致する(超平面上に乗る)ことを表している。y^aは、SIの任意の頂点上の近似値である。
The multidimensional constraint corresponding to Equation (4) is as shown in Equation (17) below.
The second line, the approximate value of the segment internal included in segment S I is represents that it matches the approximate line (ride on the hyperplane). y ^ a is an approximate value on an arbitrary vertex of S I.
次に、図11において、最適化問題定式化部15Bは、このようにして定式化した個々の目的関数および制約条件を統合して、各区分における線形近似関数のそれぞれについて、傾きおよび切片を求めるための最適化問題を、次の式(18)のように定式化する(ステップ105)。この式(18)は、「二次計画問題」であり、1次元の場合と同様、容易に、高速に解くことができる。
この後、最適化処理部15Cは、操作入力部12で検出されたオペレータ操作に応じて、正則化項EWに対する重みλを設定し(ステップ106)、この重みλで規定された式(5)に基づいて最適化演算を実行することにより最適化問題を求解する(ステップ107)。
続いて、区分線形近似関数生成部15Dは、最適化処理部15Cで得られた最適化問題の解に基づいて、各区部の線形近似関数のそれぞれを生成することにより、区分線形近似関数を生成する(ステップ108)。
Thereafter, the
Subsequently, the piecewise linear approximation
ここで、得られた区分線形近似関数h(x)が所望の範囲のものか確認し(ステップ109)、得られた区分線形近似関数h(x)の近似誤差が大きかったり、区分数が多かったりして、所望の区分線形近似関数h(x)が得られていない場合(ステップ109:NO)、ステップ106に戻って、正則化項EWに対する重みλの大きさを変更すればよい。λを小さくすれば近似誤差が小さくなり、λを大きくすれば区分の数が少なくなることが期待できる。 Here, it is confirmed whether the obtained piecewise linear approximation function h (x) is in a desired range (step 109). The obtained piecewise linear approximation function h (x) has a large approximation error or a large number of pieces. If the desired piecewise linear approximation function h (x) is not obtained (step 109: NO), the process returns to step 106 to change the magnitude of the weight λ with respect to the regularization term E W. If λ is reduced, the approximation error is reduced, and if λ is increased, the number of sections can be expected to be reduced.
一方、得られた区分線形近似関数h(x)が所望の範囲のものである場合(ステップ109:YES)、得られた区分線形近似関数h(x)を画面表示部13で画面表示し、あるいは通信I/F部11から外部へ出力して、一連の区分線形近似関数の生成処理を終了する。
On the other hand, when the obtained piecewise linear approximation function h (x) is within a desired range (step 109: YES), the obtained piecewise linear approximation function h (x) is displayed on the
図14は、第5の実施の形態による区分線形近似関数の生成例であり、図14(a)は平面図、図14(b)は斜視図である。ここでは、前述した図13の入出力データから生成した区分線形近似関数が示されている。元々の区分数は224個であったが、本手法により、12個まで減っていることが分かる。 FIG. 14 is an example of generating a piecewise linear approximation function according to the fifth embodiment. FIG. 14A is a plan view and FIG. 14B is a perspective view. Here, a piecewise linear approximation function generated from the input / output data of FIG. 13 described above is shown. Although the original number of sections was 224, it can be seen that the number of sections is reduced to 12 by this method.
[実施の形態の拡張]
以上、実施形態を参照して本発明を説明したが、本発明は上記実施形態に限定されるものではない。本発明の構成や詳細には、本発明のスコープ内で当業者が理解しうる様々な変更をすることができる。また、各実施形態については、矛盾しない範囲で任意に組み合わせて実施することができる。
[Extended embodiment]
The present invention has been described above with reference to the embodiments, but the present invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention. In addition, each embodiment can be implemented in any combination within a consistent range.
例えば、第5の実施の形態に対して、第2、第3、第4の実施の形態を適用してもよい。なお、第5の実施の形態に対して第2の実施の形態を適用するには、式(16)の右辺D(I,J)を基準化係数で除すればよい。基準化係数は、初期値1として最適化問題を解き、得られた傾きを式(15)に代入して得られる値と、微小な正の数εと比較して、大きい方を採用すればよい。
For example, the second, third, and fourth embodiments may be applied to the fifth embodiment. In order to apply the second embodiment to the fifth embodiment, the right side D (I, J) of equation (16) may be divided by the normalization coefficient. If the larger one is adopted as the standardization coefficient, the value obtained by solving the optimization problem with the
10…区分線形近似関数生成装置、11…通信I/F部、12…操作入力部、13…画面表示部、14…記憶部、14A…入出力データ、14B…節点候補、14C…頂点候補、15…演算処理部、15A…設定処理部、15B…最適化問題定式化部、15C…最適化処理部、15D…区分線形近似関数生成部。
DESCRIPTION OF
Claims (7)
前記入出力データおよび前記節点候補に基づいて、前記線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化する最適化問題定式化部と、
最適化演算を実行することにより前記最適化問題の解を求める最適化処理部と、
得られた解に基づいて前記線形近似関数のそれぞれを生成する区分線形近似関数生成部とを備え、
前記最適化問題定式化部は、
前記入出力データに対する前記区分線形近似関数の近似誤差を表す誤差項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化し、
前記区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化し、
前記隣り合う区分の線形近似関数による近似値が節点で一致することを前記最適化問題に関する制約条件として定式化する
ことを特徴とする区分線形近似関数生成装置。 Piecewise linear approximation that generates a piecewise linear approximation function that approximates each section of the input / output data with a linear approximation function based on a plurality of input / output data with one-dimensional input and a plurality of preset node candidates A function generator,
An optimization problem formulation unit that formulates an optimization problem for obtaining a slope and an intercept for each of the linear approximation functions based on the input / output data and the node candidates;
An optimization processing unit for obtaining a solution to the optimization problem by executing an optimization operation;
A piecewise linear approximation function generator that generates each of the linear approximation functions based on the obtained solution;
The optimization problem formulation unit is:
An error term representing an approximation error of the piecewise linear approximation function for the input / output data is formulated as one or both of an objective function and a constraint condition related to the optimization problem,
A regularization term representing a slope difference related to a linear approximation function of an adjacent section of the sections is formulated as one or both of an objective function and a constraint condition regarding the optimization problem,
A piecewise linear approximation function generation device characterized in that an approximation value by a linear approximation function of the adjacent pieces coincides at a node as a constraint condition related to the optimization problem.
前記入出力データおよび前記頂点候補に基づいて、前記線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化する最適化問題定式化部と、
最適化演算を実行することにより前記最適化問題の解を求める最適化処理部と、
得られた解に基づいて前記線形近似関数のそれぞれを生成する区分線形近似関数生成部とを備え、
前記最適化問題定式化部は、
前記入出力データに対する前記区分線形近似関数の近似誤差を表す誤差項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化し、
前記区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化し、
前記隣り合う区分の線形近似関数による近似値が頂点で一致することを前記最適化問題に関する制約条件として定式化する
ことを特徴とする区分線形近似関数生成装置。 Piecewise linear approximation that generates a piecewise linear approximation function that approximates each piece of the input / output data with a linear approximation function based on a plurality of input / output data that is multidimensional and a plurality of preset vertex candidates A function generator,
An optimization problem formulation unit that formulates an optimization problem for obtaining a slope and an intercept for each of the linear approximation functions based on the input / output data and the vertex candidates;
An optimization processing unit for obtaining a solution to the optimization problem by executing an optimization operation;
A piecewise linear approximation function generator that generates each of the linear approximation functions based on the obtained solution;
The optimization problem formulation unit is:
An error term representing an approximation error of the piecewise linear approximation function for the input / output data is formulated as one or both of an objective function and a constraint condition related to the optimization problem,
A regularization term representing a slope difference related to a linear approximation function of an adjacent section of the sections is formulated as one or both of an objective function and a constraint condition regarding the optimization problem,
The piecewise linear approximation function generation device characterized in that the approximation value by the linear approximation function of the adjacent sections coincides at a vertex as a constraint condition regarding the optimization problem.
前記正則化項は、前記傾き差のすべてに関するL1ノルムからなることを特徴とする区分線形近似関数生成装置。 The piecewise linear approximation function generation device according to claim 1,
The piecewise linear approximation function generation device, wherein the regularization term includes an L1 norm related to all of the slope differences.
前記正則化項は、前記傾き差のL2ノルムの総和からなることを特徴とする区分線形近似関数生成装置。 The piecewise linear approximation function generation device according to claim 2,
2. The piecewise linear approximation function generation device according to claim 1, wherein the regularization term includes a sum of L2 norms of the slope difference.
前記傾き差ごとに設けた所定の係数を用いて前記正則化項を基準化する基準化部をさらに備え、
前記係数のそれぞれは、前記係数を1と仮定して前記最適化問題を解くことにより得られた、対応する前記傾き差の絶対値からなる
ことを特徴とする区分線形近似関数生成装置。 In the piecewise linear approximation function generation device according to claim 3 or 4,
A standardization unit that standardizes the regularization term using a predetermined coefficient provided for each of the slope differences;
Each of the coefficients includes a corresponding absolute value of the slope difference obtained by solving the optimization problem on the assumption that the coefficient is 1. The piecewise linear approximation function generation device, wherein:
最適化問題定式化部が、前記入出力データおよび前記節点候補に基づいて、前記線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化する最適化問題定式化ステップと、
最適化処理部が、最適化演算を実行することにより前記最適化問題の解を求める最適化処理ステップと、
区分線形近似関数生成部が、得られた解に基づいて前記線形近似関数のそれぞれを生成する区分線形近似関数生成ステップとを備え、
前記最適化問題定式化ステップは、
前記入出力データに対する前記区分線形近似関数の近似誤差を表す誤差項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化するステップと、
前記区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化するステップと、
前記隣り合う区分の線形近似関数による近似値が節点で一致することを前記最適化問題に関する制約条件として定式化するステップとを含む
ことを特徴とする区分線形近似関数生成方法。 Piecewise linear approximation that generates a piecewise linear approximation function that approximates each section of the input / output data with a linear approximation function based on a plurality of input / output data with one-dimensional input and a plurality of preset node candidates A function generation method,
An optimization problem formulation step for formulating an optimization problem for obtaining a slope and an intercept for each of the linear approximation functions based on the input / output data and the node candidates;
An optimization processing step for obtaining a solution of the optimization problem by executing an optimization operation;
A piecewise linear approximation function generation unit including a piecewise linear approximation function generation step of generating each of the linear approximation functions based on the obtained solution;
The optimization problem formulation step includes:
Formulating an error term representing an approximation error of the piecewise linear approximation function for the input / output data as one or both of an objective function and a constraint on the optimization problem;
Formulating a regularization term representing a slope difference related to a linear approximation function of an adjacent section of the sections as one or both of an objective function and a constraint condition related to the optimization problem;
A method of generating a piecewise linear approximation function, comprising: formulating, as a constraint condition on the optimization problem, that approximate values obtained by linear approximation functions of the adjacent pieces coincide at nodes.
最適化問題定式化部が、前記入出力データおよび前記頂点候補に基づいて、前記線形近似関数のそれぞれについて傾きおよび切片を求めるための最適化問題を定式化する最適化問題定式化ステップと、
最適化処理部が、最適化演算を実行することにより前記最適化問題の解を求める最適化処理ステップと、
区分線形近似関数生成部が、得られた解に基づいて前記線形近似関数のそれぞれを生成する区分線形近似関数生成ステップとを備え、
前記最適化問題定式化ステップは、
前記入出力データに対する前記区分線形近似関数の近似誤差を表す誤差項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化するステップと、
前記区分のうち隣り合う区分の線形近似関数に関する傾き差を表す正則化項を、前記最適化問題に関する目的関数および制約条件のいずれか一方または両方として定式化するステップと、
前記隣り合う区分の線形近似関数による近似値が頂点で一致することを前記最適化問題に関する制約条件として定式化するステップとを含む
ことを特徴とする区分線形近似関数生成方法。 Piecewise linear approximation that generates a piecewise linear approximation function that approximates each piece of the input / output data with a linear approximation function based on a plurality of input / output data that is multidimensional and a plurality of preset vertex candidates A function generation method,
An optimization problem formulation unit that formulates an optimization problem for obtaining a slope and an intercept for each of the linear approximation functions based on the input / output data and the vertex candidates; and
An optimization processing step for obtaining a solution of the optimization problem by executing an optimization operation;
A piecewise linear approximation function generation unit including a piecewise linear approximation function generation step of generating each of the linear approximation functions based on the obtained solution;
The optimization problem formulation step includes:
Formulating an error term representing an approximation error of the piecewise linear approximation function for the input / output data as one or both of an objective function and a constraint on the optimization problem;
Formulating a regularization term representing a slope difference related to a linear approximation function of an adjacent section of the sections as one or both of an objective function and a constraint condition related to the optimization problem;
A method of generating a piecewise linear approximation function, comprising: formulating, as a constraint condition on the optimization problem, that approximate values obtained by linear approximation functions of the adjacent pieces coincide at a vertex.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017058738A JP6777574B2 (en) | 2017-03-24 | 2017-03-24 | Piecewise linear approximation function generator and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017058738A JP6777574B2 (en) | 2017-03-24 | 2017-03-24 | Piecewise linear approximation function generator and method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2018163396A true JP2018163396A (en) | 2018-10-18 |
| JP6777574B2 JP6777574B2 (en) | 2020-10-28 |
Family
ID=63860178
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017058738A Active JP6777574B2 (en) | 2017-03-24 | 2017-03-24 | Piecewise linear approximation function generator and method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6777574B2 (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2021068360A (en) * | 2019-10-28 | 2021-04-30 | アズビル株式会社 | Approximation data creation device and approximation data creation method |
| JP2021100332A (en) * | 2019-12-23 | 2021-07-01 | 株式会社明電舎 | Application support technique, application support system, application support method of hydroelectric generator |
| JP2021149273A (en) * | 2020-03-17 | 2021-09-27 | 株式会社関電エネルギーソリューション | Heat source operation support system |
| WO2023210536A1 (en) * | 2022-04-28 | 2023-11-02 | 三菱自動車工業株式会社 | Arithmetic device and vehicle control device |
-
2017
- 2017-03-24 JP JP2017058738A patent/JP6777574B2/en active Active
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2021068360A (en) * | 2019-10-28 | 2021-04-30 | アズビル株式会社 | Approximation data creation device and approximation data creation method |
| WO2021085081A1 (en) * | 2019-10-28 | 2021-05-06 | アズビル株式会社 | Approximate data generation device and approximate data generation method |
| JP7328119B2 (en) | 2019-10-28 | 2023-08-16 | アズビル株式会社 | APPROXIMATE DATA CREATION DEVICE AND APPROXIMATE DATA CREATION METHOD |
| JP2021100332A (en) * | 2019-12-23 | 2021-07-01 | 株式会社明電舎 | Application support technique, application support system, application support method of hydroelectric generator |
| JP7259731B2 (en) | 2019-12-23 | 2023-04-18 | 株式会社明電舎 | Operation support method for hydraulic power generator, Operation support system for hydraulic power generator, Operation support method for hydraulic power generator |
| JP2021149273A (en) * | 2020-03-17 | 2021-09-27 | 株式会社関電エネルギーソリューション | Heat source operation support system |
| WO2023210536A1 (en) * | 2022-04-28 | 2023-11-02 | 三菱自動車工業株式会社 | Arithmetic device and vehicle control device |
| JPWO2023210536A1 (en) * | 2022-04-28 | 2023-11-02 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP6777574B2 (en) | 2020-10-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114219076B (en) | Quantum neural network training method and device, electronic equipment and medium | |
| US10565521B2 (en) | Merging feature subsets using graphical representation | |
| Deb et al. | A genetic algorithm based augmented Lagrangian method for constrained optimization | |
| Ebrahimi et al. | A composite iterative procedure with fast convergence rate for the progressive-iteration approximation of curves | |
| WO2008120072A1 (en) | Method and system of classifying, ranking and relating information based on networks | |
| JP6777574B2 (en) | Piecewise linear approximation function generator and method | |
| Lloyd et al. | A cubic differential system with nine limit cycles | |
| Oku et al. | How to reduce the bit-width of an Ising model by adding auxiliary spins | |
| US10410140B1 (en) | Categorical to numeric conversion of features for machine learning models | |
| Kapoor et al. | Neural oscillators for generalizing parametric PDEs | |
| WO2022079911A1 (en) | Hidden decision tree test device, hidden decision tree test system, hidden decision tree test method, and program | |
| Wanner | Topological analysis of the diblock copolymer equation | |
| JP2024520249A (en) | Method, device, quantum chip, and electronic device for generating quantum state preparation circuit | |
| JP7789022B2 (en) | Information processing device, information processing method, and program | |
| CN119272889A (en) | A quantum classifier based on support vector machine | |
| Rojo et al. | GaCoVi: A correlation visualization to support interpretability-aware feature selection for regression models | |
| JP6651254B2 (en) | Simulation method, simulation program, and simulation device | |
| WO2018198273A1 (en) | Simulation method, simulation program, and simulation device | |
| CN117313881B (en) | Quantum circuit classification method and device and electronic equipment | |
| US20230281267A1 (en) | Calculation device, calculation program, recording medium, and calculation method | |
| Ohse et al. | Exploration of High-Dimensional Performance Spaces via Clustering | |
| Nassajian Mojarrad | A new approximation method for solving stochastic differential equations | |
| US20250190825A1 (en) | Rank evaluation system, rank evaluation method, and non-transitory computer-readable medium | |
| JP3323738B2 (en) | Volume data calculation method and apparatus, and volume data visualization method and apparatus | |
| Vales et al. | Quantum mechanical closure of partial differential equations with symmetries |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190917 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200827 |
|
| 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: 20200929 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201008 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6777574 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |