CN103970719B - Fitting method and fitting device - Google Patents
Fitting method and fitting device Download PDFInfo
- Publication number
- CN103970719B CN103970719B CN201310036087.3A CN201310036087A CN103970719B CN 103970719 B CN103970719 B CN 103970719B CN 201310036087 A CN201310036087 A CN 201310036087A CN 103970719 B CN103970719 B CN 103970719B
- Authority
- CN
- China
- Prior art keywords
- fitting
- data
- group
- function
- fit
- 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.)
- Expired - Fee Related
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a fitting method and a fitting device, and relates to the field of computers. Through the adoption of the fitting method and the fitting device, the fitting flexibility and the fitting accuracy can be improved. The method comprises the following steps: data to be fitted is intensively divided into n groups of data to be fitted according to preset data characteristics, and n is greater than or equal to 2; the data to be fitted, which satisfies the preset fitting conditions in the n groups of data to be fitted, are fitted to obtain k fitting functions, and the k is not smaller than 1 and not larger than n; the final fitting function is obtained, and the final fitting function is the product of the k fitting functions. The fitting method and the fitting system provided by the embodiment of the invention are used for fitting.
Description
Technical field
The present invention relates to computer realm, more particularly, to a kind of approximating method and matching device.
Background technology
Cloud computing be a kind of increase of the related service based on internet, using and delivery mode, it by internet Lai
There is provided dynamic and easy extension calculates related resource.The powerful computing capability of cloud computing service provider is by large number of
CMPs (Chip Multiprocessors, chip multiprocessors) realizes.In the upper multicore architecture of CMPs, shared resource deposits
Hardware resource utilization in necessarily affecting cloud computing environment.In order to predict on CMPs by shared resource competition cause common
Disturbed condition between operation program, can collect interference data, then these interference data are intended using the method for statistics
Close, finally give interference model when multiple programs are operated together in CMPs framework.
Prior art adopts the instruments such as Matlab (Matrix Laboratory, matrix labotstory) to be fitted, this matching
Procedure is as follows:First, set the functional form treating matching;Then, call the instruments such as Matlab to treat fitting data to carry out
Matching, and judge the degree of accuracy of fitting result;Finally, manually according to the fitting result degree of accuracy, fitting result is finely adjusted, that is,
The constant of adjustment fitting result or coefficient etc..
In current approximating method, due to using artificial fitting's method, so Fitting efficiency is relatively low, and treat fitting data only
Single matching can be carried out as one group of data and obtain fitting result, entirely intend when re-starting when fitting data changes
Conjunction process, flexibility is poor, can not reflect the relation treating between fitting data simultaneously, and therefore fitting precision is relatively low.
Content of the invention
Embodiments of the invention provide a kind of approximating method and matching device, it is possible to increase matching flexibility and matching essence
Degree.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that:
First aspect present invention provides a kind of approximating method, is applied to computer, including:
The data treating fitting data concentration is divided into by n group according to preset data characteristic and treats fitting data, n >=2;
What n group was treated meet in fitting data with default fitting condition treats that fitting data is fitted obtaining k fitting function,
1≤k≤n;
Obtain final fitting function, described final fitting function is the product of described k fitting function.
In conjunction with first aspect the first may implementation, described n group is treated meet in fitting data with default matching bar
Part treat that fitting data is fitted obtaining k fitting function including:
Obtain m group and treat fitting data, 1≤m≤n;
When described m >=2, judge that described m group treats whether fitting data meets m and preset fitting condition;
In described m group when fitting data meets m and presets fitting condition or described m=1, execute following steps:
A, according to fitting parameter, fitting data is fitted obtaining m-th fitting function to be treated to described m group;
B, the goodness of fit of calculating composite function, described composite function is taking advantage of of currently available 1st to m-th fitting function
Long-pending, whether the goodness of fit of relatively described composite function is more than or equal to the default goodness of fit;
If the goodness of fit of the described composite function of c is more than or equal to the described default goodness of fit, terminate described m group is treated
The fit procedure of fitting data;
If the goodness of fit of the described composite function of d is less than the described default goodness of fit, treat fitting data in described m group
The described error of middle deletion is more than the bound data of m predetermined threshold value;
E, the current matching number of times of acquisition;
F, judge that whether described current matching number of times is less than described default matching number of times;
If described current matching number of times is less than described default matching number of times and the goodness of fit of described composite function is less than institute
State the default goodness of fit, find and delete described m group treat error described in fitting data be more than m predetermined threshold value described about
Beam data, obtains new m group and treats fitting data, and repeat step a to f is until the current matching number of times of described composite function is equal to
The described goodness of fit of described default matching number of times or described composite function is more than or equal to the described default goodness of fit.
In conjunction with the possible implementation of second of the first possible implementation, described acquisition m group treats fitting data bag
Include:
Obtain m-1 group and treat that in fitting data, error is more than the bound data of m-1 predetermined threshold value;
The argument data obtaining in described bound data treats the argument data in fitting data as described m group;
Obtain the 1st to the m-1 fitting function y1=f1X () is to ym-1=fm-1(x), by the 1st in described bound data to
M-1 group independent variable brings described 1st to the m-1 fitting function y respectively into1=f1X () is to ym-1=fm-1Obtain in (x) because becoming
Amount Y1To Ym-1;
Obtain variable Y the reason in W and described bound data, described W is dependent variable Y1To Ym-1Product, using Y/W as
M group treats the final dependent variable in fitting data.
The third possible reality in conjunction with any one possible implementation in first aspect to second possibility implementation
Existing mode, described n group is treated meet in fitting data with default fitting condition treat that fitting data is fitted obtaining k matching
Before function, methods described also includes:
Obtain described fitting parameter, described fitting parameter includes the default goodness of fit and each group treats that fitting data is corresponding each
The functional form of fitting function, the substantive requirements of form, predetermined threshold value and default matching number of times.
May be real in conjunction with the 4th kind of any one possible implementation in first aspect to the third possible implementation
Existing mode, described preset data characteristic is computer hardware resource characteristic,
Described will treat that the data that fitting data is concentrated is divided into n group and treats that fitting data is according to preset data characteristic:
The described data treating that fitting data is concentrated is divided into by data cached, bandwidth according to described computer hardware resource characteristic
Data and internal storage data.
Second aspect present invention provides a kind of matching device, including:
Division unit, treats fitting data for the data treating fitting data concentration being divided into n group according to preset data characteristic,
n≥2;
For what n group was treated meet in fitting data with default fitting condition, fitting unit, treats that fitting data is fitted
To k fitting function, 1≤k≤n;
First acquisition unit, for obtaining final fitting function, described final fitting function is described k fitting function
Product.
In conjunction with the first possible implementation of second aspect, described fitting unit includes:
Obtain subelement, treat fitting data for obtaining m group, 1≤m≤n;
Judgment sub-unit, for when described m >=2, judge described m group treat fitting data whether meet m preset intend
Conjunction condition;
Execution subelement, presets fitting condition or during described m=1 for meeting m in described m group whne fitting data,
Execution following steps:
A, according to fitting parameter, fitting data is fitted obtaining m-th fitting function to be treated to described m group;
B, the goodness of fit of calculating composite function, described composite function is taking advantage of of currently available 1st to m-th fitting function
Long-pending, whether the goodness of fit of relatively described composite function is more than or equal to the default goodness of fit;
If the goodness of fit of the described composite function of c is more than or equal to the described default goodness of fit, terminate described m group is treated
The fit procedure of fitting data;
If the total goodness of fit of the described composite function of d is less than the described default goodness of fit, treat matching number in described m group
Delete the bound data that described error is more than m predetermined threshold value according to middle;
E, the current matching number of times of acquisition;
F, judge that whether described current matching number of times is less than described default matching number of times;
If described current matching number of times is less than described default matching number of times and the goodness of fit of described composite function is less than institute
State the default goodness of fit, find and delete described m group treat error described in fitting data be more than m predetermined threshold value described about
Beam data, obtains new m group and treats fitting data, and repeat step a to f is until the current matching number of times of described composite function is equal to
The described goodness of fit of described default matching number of times or described composite function is more than or equal to the described default goodness of fit.
In conjunction with the first may implementation second may implementation, described acquisition subelement specifically for:
Obtain m-1 group and treat that in fitting data, error is more than the bound data of m-1 predetermined threshold value;
Obtain the argument data in described bound data and treat the described independent variable number in fitting data as described m group
According to;
Obtain the 1st to the m-1 fitting function y1=f1X () is to ym-1=fm-1(x), by the 1st in described bound data to
M-1 group argument data brings described 1st to the m-1 fitting function y respectively into1=f1X () is to ym-1=fm-1Obtain in (x)
Dependent variable numerical value Y1To Ym-1;
Obtain variable Y the reason in W and described bound data, described W is dependent variable Y1To Ym-1Product, using Y/W as
M group treats the final dependent variable data in fitting data.
May in conjunction with the third of any one the possible implementation in second aspect to the possible implementation of second
Implementation, described matching device also includes:
Second acquisition unit, for obtaining described fitting parameter, described fitting parameter includes the default goodness of fit and each group
Treat functional form, the substantive requirements of form, predetermined threshold value and the default matching number of times of the corresponding each fitting function of fitting data.
The 4th kind of possibility in conjunction with any one the possible implementation in second aspect to the third possible implementation
Implementation, described preset data characteristic is computer hardware resource characteristic,
Described division unit specifically for:
The described data treating that fitting data is concentrated is divided into by data cached, bandwidth according to described computer hardware resource characteristic
Data and internal storage data.
The embodiment of the present invention provides a kind of approximating method and matching device, and this approximating method includes:Special according to preset data
Property will treat that the data that fitting data is concentrated is divided into n group and treats fitting data, n >=2;N group is treated in fitting data, meet default matching
Condition treat that fitting data is fitted obtaining k fitting function, 1≤k≤n;Obtain final fitting function, described final matching
Function is the product of described k fitting function.So, to treat that fitting data is divided into many by described according to data characteristic for computer
Group treats fitting data, then treats that fitting data is fitted obtaining multiple fitting functions respectively to multigroup, finally by multiple matching letters
Number multiplications obtain final fitting function, improve the flexibility of matching, with respect to prior art, can reflect treat fitting data it
Between relation, therefore improve fitting precision.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, acceptable
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is a kind of approximating method flow chart provided in an embodiment of the present invention;
Fig. 2 is another kind approximating method flow chart provided in an embodiment of the present invention;
Fig. 3 is a kind of matching apparatus structure schematic diagram provided in an embodiment of the present invention;
Fig. 4 is another kind matching apparatus structure schematic diagram provided in an embodiment of the present invention;
Fig. 5 is another matching apparatus structure schematic diagram provided in an embodiment of the present invention;
Fig. 6 is another matching apparatus structure schematic diagram provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work
Embodiment, broadly falls into the scope of protection of the invention.
The embodiment of the present invention provides a kind of approximating method, as shown in figure 1, including:
101st, the data treating fitting data concentration is divided into by n group according to preset data characteristic and treats fitting data, n >=2.
Example, described preset data characteristic can be computer hardware resource characteristic, described computer hardware resource bag
Include caching, prefetcher, bandwidth, internal memory and I/O (input/output, input/output) etc..Can be according to described in step 101
Computer hardware resource characteristic by the described data treating that fitting data is concentrated be divided into data cached, prefetcher data, band data,
Internal storage data and I/O data etc..
What the 102nd, n group was treated to meet in fitting data with default fitting condition treats that fitting data is fitted obtaining k matching
Function, 1≤k≤n.
Described default fitting condition instruction each group treats that fitting data size need to be more than certain specific threshold value.Need explanation
Be, when described whne m group in fitting data no meet in fitting data default fitting condition whne fitting data when, Ke Yizhi
Connect that to obtain m-th fitting function be fmX () is equal to 1.
103rd, obtain final fitting function, described final fitting function is the product of described k fitting function.
Due to treating that fitting data is divided into n group and is fitted respectively obtaining k fitting function by described, so final matching letter
Number is the function with k segmentation.
So, computer according to data characteristic by described treat fitting data be divided into multigroup treat fitting data, then to many
Group treats that fitting data is fitted obtaining multiple fitting functions respectively, finally multiple fitting functions is multiplied and obtains final matching letter
Number, improves the flexibility of matching, with respect to prior art, can reflect the relation treating between fitting data, therefore improve
Fitting precision.
It should be noted that before step 102, methods described can also include:Obtain described fitting parameter, described plan
Close that parameter includes the default goodness of fit and each group treats the functional form of the corresponding each fitting function of the fitting data, substantive requirements of form, pre-
If threshold value and default matching number of times.Above-mentioned parameter is all that user needs setting according to actual matching, in fit procedure
Can flexibly change.Wherein, the default goodness of fit indicates the desired goodness of fit of user, can pass through parameter R-
Square (Coefficient of determination, the determination coefficient of equation) or MSE (Mean Squared Error,
Mean square error) it is used as the goodness of fit of fitting function, user can specify one of which, parameter R- as needed
The method of square or MSE is prior art, will not be described here.It should be noted that R-square refers to target value closer to 1
Better, general more than 0.7 is rational value.
Described functional form is that user treats the data characteristic of fitting data according to described each group, treats matching number described in setting
According to the functional form of corresponding fitting function, example, this functional form can be multinomial power function or logarithm letter
The function of the forms such as number, trigonometric function, exponential function.The described substantive requirements of form are the restrictions to this functional form, example, permissible
The highest power arranging described multinomial power function is 3, or arranges the natural logrithm function that described logarithmic function is with e as bottom
Deng.After obtaining functional form and the substantive requirements of form in fitting parameter, computer can be according to this two parameters by fitting function
It is converted into specific functional form, when the argument data of matching increases or decreases, or user needs to reset matching
It is only necessary to the functional form in modification fitting parameter and the substantive requirements of form during functional form of function, computer just being capable of root
According to this two parameters amended, fitting function is converted into specific functional form, with setting matching letter artificial in prior art
The method of number is compared, and the method is more flexible, improves Fitting efficiency simultaneously.
Described default matching number of times define each group treat fitting data at most can with the number of times of matching, example, Ke Yishe
Put m group and treat that the default matching number of times of fitting data is 10.
Described predetermined threshold value defines that m group treats that the difference of the m group dependent variable and function value in fitting data needs to meet
Scope.Described m group dependent variable is the dependent variable that described m group is treated in fitting data, and described functional value is by described m group
Treat that the independent variable in fitting data substitutes into the functional value obtaining after m-th fitting function that matching obtains.When described difference is little
When equal to described predetermined threshold value, described in judgement, treat that fitting data is not bound data, when described difference is more than described default threshold
During value, described in judgement, treat that fitting data is bound data.
Example it is assumed that user determines is used as the goodness of fit with index R-square, the default goodness of fit be 0.8,
I.e. the desired goodness of fit of user is 0.8.Treat the data characteristic of fitting data according to described each group, can set described in treat matching
In data, certain group treats that the functional form of the corresponding fitting function of fitting data is multinomial power function, sets the substantive requirements of form as described
Polynomial highest power is 3, and as 5 times, that is, this group treats that fitting data at most can be secondary with matching to the default matching number of times setting
Number is 5 times, and the predetermined threshold value of this group is 0.2, and that is, user wishes this group being treated, the independent variable in fitting data substitutes into described matching
The functional value obtaining after the fitting function obtaining treats the difference between the corresponding dependent variable of independent variable in fitting data with this group
Less than 0.2.
The embodiment of the present invention provides another kind of curve-fitting method, as shown in Fig. 2 including:
201st, the data treating fitting data concentration is divided into by n group according to preset data characteristic and treats fitting data.
Common, matching is several discrete functional values known, by setting the form of this function, adjusts this function shape
Some undetermined coefficients in formula are so that this function method minimum with several discrete functional value difference described.
The present invention according to preset data characteristic, by treat the data that fitting data is concentrated be divided into n group treat fitting data refer to by
Described treat fitting data according to its data characteristic be divided into some groups there is different pieces of information characteristic treat fitting data.Example, false
Treat that fitting data is concentrated and comprise that N number of (described N >=2, wherein (a, b, c) are for (a, b, c), d) two tuple data of form if described
Treat the argument data in fitting data, d is the dependent variable data treated in fitting data.Described treat that in fitting data, a can be with table
It is shown as a=(a1, a2..., an), wherein a1, a2..., anRepresent n different qualities of data a;B can be expressed as b=(b1,
b2..., bn), wherein b1, b2..., bnRepresent n different qualities of data b;C can be expressed as c=(c1, c2..., cn),
Wherein c1, c2..., cnRepresent n different qualities of data c, d represents by data a, b and the coefficient value of c.
A in fitting data is treated described in hypothesis1、b1、c1There is identical data characteristic, a2、b2、c2There is identical data special
Property ..., an、bn、cnThere is identical data characteristic, that is, treat the data tool in same position in each argument data of fitting data
There is identical characteristic.Therefore will treat that fitting data divides according to the characteristic treating the data comprising in independent variable a, b and c in fitting data
Treat fitting data for n group.Treat that fitting data can be expressed as N number of ((a for wherein first group1, b1, c1), d) form treat matching number
According to described (a1, b1, c1) it is the independent variable treated in fitting data, described d is the reason treat in fitting data variable.Assume to this
N number of ((a1, b1, c1), d) form treat fitting data be iterated matching obtain first fitting function be f1(x);Second group
Treat that fitting data can be expressed as N number of ((a2, b2, c2), d/f1(a1, b1, c1)) form treat fitting data, described (a2, b2,
c2) it is the independent variable treated in fitting data, described d is the reason treat in fitting data variable, f1(a1, b1, c1) it is by independent variable
(a1, b1, c1) substitute into first fitting function f1X functional value that () obtains, by (d/f1(a1, b1, c1)) value treat as second group
The final dependent variable of fitting data is it is assumed that to this N number of ((a2, b2, c2), d/f1(a1, b1, c1)) form treat that fitting data is carried out
It is f that iterative fitting obtains second fitting function2(x);...;N-th group treats that fitting data can be expressed as N number of ((an, bn, cn),
(d/f1(a1, b1, c1)*f2(a2, b2, c2)*...*fn-1(an-1, bn-1, cn-1))) form treat fitting data, described (an, bn,
cn) it is the independent variable treated in fitting data, described d is the reason treat in fitting data variable, f1(a1, b1, c1) it is by independent variable
Data (a1, b1, c1) substitute into first fitting function f1X functional value that () obtains, f2(a2, b2, c2) it is by independent variable (a2, b2,
c2) substitute into second fitting function f2X functional value ..., f that () obtainsn-1(an-1, bn-1, cn-1) it is by independent variable (an-1, bn-1,
cn-1) substitute into (n-1)th fitting function fn-1X functional value that () obtains, by (d/f1(a1, b1, c1)*f2(a2, b2, c2)*...*fn-1
(an-1, bn-1, cn-1)) value treat the final dependent variable of fitting data as n-th group.
Particularly, the number of the described independent variable treated in fitting data can need corresponding increase and decrease according to actual matching, but
The number treating independent variable in each two tuple data in fitting data is equal, and comprises data characteristic in each independent variable
Number identical data, when described independent variable number in fitting data increases or decreases, still may be referred to above-mentioned side
To described, method treats that fitting data is grouped.
The present embodiment is in order to predict interference feelings when being operated together on multicore architecture by the program that shared resource competition causes
Condition, collects interference data, then these interference data are fitted using the method for statistics.Described interference data is that computer is hard
Part resource data, that is, treat that fitting data is computer hardware resource data.Because described computer hardware resource characteristic includes delaying
Deposit, prefetcher, bandwidth, internal memory and I/O (input/output, input/output) etc., therefore can be according to described computer hardware
Resource characteristicses by described treat fitting data concentrate data be divided into data cached, prefetcher data, band data, internal storage data and
I/O etc. is multigroup to treat fitting data.
It should be noted that described treat that each of fitting data collection data is all two tuples, described treat matching
Data set can be defined as ((Ci, Cj... Ck), Rij...k), wherein Ci、Cj、...、CkIt is the independent variable treated in fitting data, Ci
The characteristic vector of representation program i, CjThe characteristic vector of representation program j ... CkThe characteristic vector of representation program k, Rij...kRepresent journey
The hydraulic performance decline value of program i when multiple program such as sequence i, program j... and program k is operated together.Wherein CiC can be expressed asi=<
Ci1, Ci2... Cin>, Ci1It is the data related to caching obtaining during the isolated operation of program i, when this data instruction program i runs
Impact to caching, the C of examplei1It can be the miss rate of LLC (Last Level Cache, afterbody shared buffer memory);
Ci2It is the related data of the prefetcher obtaining during the isolated operation of program i, to prefetcher during this data instruction program i isolated operation
Impact, the C of examplei2It can be the number of times that during isolated operation of program i, each second prefetches;...;CinIt is to obtain during the isolated operation of program i
The data related to n-th computer hardware resource arriving, hard to n-th computer during this data instruction program i isolated operation
The impact of part resource.
Example it is assumed that in the present embodiment prediction multicore architecture on by shared buffer memory, bandwidth and memory source competition cause
Disturbed condition when being operated together for the program, the multiple interference data collected include data cached, band data, internal storage data
And every three programs hydraulic performance decline value when being operated together, above-mentioned interference data is fitted using the method for statistics.Generally
, program always first fights for cache resources, and when the bandwidth resources of program are less, memory source is also less, now the property of program
Can change be to be led to by the competition of cache resources;When the bandwidth resources of program increase, but during the competition very little of memory source, journey
The performance change of sequence is to be led to by the competition of cache resources and bandwidth resources;When the bandwidth resources of program increase and memory source
Competition when being also gradually increased, the performance change of program is to be led by the common competition of cache resources, bandwidth resources and memory source
Cause.Above-mentioned interference data is to treat fitting data.Treat that fitting data collection can be expressed as ((Cm, Cn, Cp), Rmnp), wherein (Cm,
Cn, Cp) it is the independent variable treated in fitting data, CmThe characteristic vector of representation program m, CnThe characteristic vector of representation program n, CpRepresent
The characteristic vector of program p, RmnpThe hydraulic performance decline value of program m when representation program m, program n and tri- programs of program p are operated together.
C wherein in the middle of each two tuple datamC can be expressed asm=<Cm1, Cm2, Cm3>, CnC can be expressed asn=<Cn1, Cn2, Cn3
>, CpC can be expressed asp=<Cp1, Cp2, Cp3>, wherein Cm1It is the data relevant with caching obtaining during the isolated operation of program m,
The impact to caching for program m, C during this data instruction program m isolated operationm2It is having with bandwidth of obtaining during the isolated operation of program m
The data closed, the impact to bandwidth for program m during this data instruction program m isolated operation, Cm3It is to obtain during the isolated operation of program m
The program m data relevant with internal memory, the impact to internal memory for program m during this data instruction program m isolated operation;CnAnd CpIn each number
May be referred to C according to the implication representingmIn each data explanation, will not be described here.Treat to cache number in fitting data according to described
By described, characteristic according to, band data and internal storage data treats that fitting data collection is divided into 3 groups, treat that fitting data collection D1 represents for first group
Data cached, second group treat fitting data collection D2 represent band data, the 3rd group treat that fitting data collection D3 represents internal storage data, its
In first group treat that fitting data collection can be expressed as D1={ (Cm1、Cn1、Cp1), Rmnp, (Cm1、Cn1、Cp1) for treating in fitting data
Independent variable, RmnpFor variable the reason treating in fitting data it is assumed that this group is treated with fitting data matching obtains first matching letter
Number is f1(x);Treat that fitting data collection can be expressed as D2={ (C for second groupm2、Cn2、Cp2), Rmnp/f1(Cm1、Cn1、Cp1),
(Cm2、Cn2、Cp2) it is the independent variable treated in fitting data, described RmnpFor variable the reason treating in fitting data, f1(Cm1、Cn1、
Cp1) it is by independent variable (Cm1、Cn1、Cp1) substitute into first fitting function f1X functional value that () obtains, by (Rmnp/f1(Cm1、Cn1、
Cp1)) value treat the final dependent variable of fitting data it is assumed that this group is treated with fitting data is iterated matching and obtains as second group
Second fitting function is f2(x);Treat that fitting data collection can be expressed as D3={ (C for 3rd groupm3、Cn3、Cp3), Rmnp/f1(Cm1、
Cn1、Cp1)*f2(Cm2、Cn2、Cp2), (Cm3、Cn3、Cp3) it is the independent variable treated in fitting data, described RmnpFor treating in fitting data
The reason variable, f1(Cm1、Cn1、Cp1) it is by independent variable (Cm1、Cn1、Cp1) substitute into first fitting function f1X function that () obtains
Value, f2(Cm2、Cn2、Cp2) it is by independent variable (Cm2、Cn2、Cp2) substitute into second fitting function f2X functional value that () obtains, will
(Rmnp/f1(Cm1、Cn1、Cp1)*f2(Cm2、Cn2、Cp2)) value treat the final dependent variable of fitting data as the 3rd group it is assumed that to this
It is f that group treats that fitting data be iterated matching to obtain the 3rd fitting function3(x).
202nd, obtain described fitting parameter.
Specifically, the described fitting parameter of described acquisition includes obtaining the default goodness of fit and each group treats that fitting data is corresponding
The functional form of each fitting function, the substantive requirements of form, predetermined threshold value and default matching number of times.
What the 203rd, n group was treated to meet in fitting data with default fitting condition treats that fitting data is fitted obtaining k matching
Function, 1≤k≤n.
Specifically, described n group is treated meet in fitting data with default fitting condition treat that fitting data is fitted obtaining k
Group fitting function includes:Obtain m group and treat fitting data, 1≤m≤n;When described m >=2, judge that described m group treats matching number
Preset fitting condition according to whether meeting m.
Example it is assumed that matching number is treated to three groups obtaining according to the characteristic packet of caching, bandwidth and internal memory in step 201
According in data cached, band data and internal storage data be fitted respectively.
Treat first in fitting data first group data cached be fitted obtaining first fitting function f1 (x), false
If treating that fitting data concentration has 100 and treats fitting data.Obtain first group and treat fitting data, due to treating that fitting data is first
Group treats fitting data, does not therefore need to judge that described first group is treated whether fitting data meets the first default fitting condition, that is, right
First group 100 data cached to be fitted.Because when matching is data cached, user thinks that program is operationally on CMPs
Cache resources must be shared, so treating the data cached unrestricted condition of matching, treats that fitting data is carried out for first group
Do not need during matching to set default fitting condition.
In described m group when fitting data meets m and presets fitting condition or described m=1, execute following steps:
A, according to fitting parameter, fitting data is fitted obtaining m-th fitting function to be treated to described m group;
Now treat matching data be 100 data cached D1={ (Cm1、Cn1、Cp1), Rmnp}.Assume to obtain fitting parameter
As 0.8, parameter R-square is used as the goodness of fit of fitting function for the default goodness of fit that middle user sets, and obtains the
One fitting function f1X the form of () is multinomial power function, the substantive requirements of form are the highest power of this multinomial power function is 2,
Then computer can be calculated the specific functional form of first group of fitting function is f1(x)=ax1 2+bx2 2+cx3 2+dx1+ex2+
fx3+g.Default matching number of times is 3 times, and predetermined threshold value is 0.2.Treat matching number according in described fitting parameter to described first group
According to i.e. 100 data cached D1={ (Cm1、Cn1、Cp1), RmnpBe fitted obtaining first fitting function f1X (), that is, determine f1
X () specific coefficient and constant a, b, c, d, e, f, g are respectively a1、b1、c1、d1、e1、f1、g1, obtain after first time matching is complete
Described first fitting function f11(x)=a1x1 2+b1x2 2+c1x3 2+d1x1+e1x2+f1x3+g1.This specific approximating method and
Process is prior art, will not be described here.
B, the goodness of fit of calculating composite function, described composite function is taking advantage of of currently available 1st to m-th fitting function
Long-pending, whether the goodness of fit of relatively described composite function is more than or equal to the default goodness of fit.
Due to m=1, that is, fitting function is first fitting function, so now composite function is equal to first matching letter
Number f11(x).Parameter R-square is used as first fitting function f11The goodness of fit of (x).Parameter R-square
Method be prior art, will not be described here.
If the goodness of fit of the described composite function of c is more than or equal to the described default goodness of fit, terminate described m group is treated
The fit procedure of fitting data.
If the goodness of fit of the described composite function of d is less than the described default goodness of fit, treat fitting data in described m group
The described error of middle deletion is more than the bound data of m predetermined threshold value.
Assume that being calculated index R-square is 0.6, that is, the goodness of fit of composite function is excellent less than described default matching
Degree 0.8, so can not terminate described 1st group is treated with the fit procedure of fitting data.
Because the goodness of fit of composite function is less than the described default goodness of fit 0.8 for 0.6 it is possible to judge to be somebody's turn to do
Group treats that including error in fitting data is more than the bound data of described first predetermined threshold value it is assumed that described first predetermined threshold value is
0.5.By the described 100 described first fitting function f of data cached substitution11(x)=a1x1 2+b1x2 2+c1x3 2+d1x1+e1x2+
f1x3+g1In obtain 100 functional values, described 100 functional values are treated corresponding dependent variable R in fitting data with each groupmnpDo
Difference obtains 100 the first fitting function differences, and the absolute value of described 100 the first fitting function differences is preset with described first
Threshold value 0.5 is compared, when the absolute value of described first fitting function difference is less than or equal to described first predetermined threshold value 0.5,
Treat described in judgement that fitting data is not bound data;Preset when the absolute value of described first fitting function difference is more than described first
During threshold value 0.5, described in judgement, treat that fitting data is bound data.Treat in fitting data, to delete described constraint number at described first group
According to.Assume described 100 data cached in have 60 the first fitting function differences to be less than or equal to the first predetermined threshold value, have 40 the
One fitting function difference is more than the first predetermined threshold value, then delete described first group 40 the first fitting functions treated in fitting data
Difference is more than the bound data of the first predetermined threshold value, obtains new first group and treats fitting data.Treat matching for described new first group
Data is data after deleting described 40 bound datas in fitting data for original 100.According to the spy treating fitting data
Property judge obtain treating that in fitting data, remaining 60 hydraulic performance declines treating the corresponding program of fitting data are by cache resources
Competition leads to, and the hydraulic performance decline of the corresponding program of 40 bound datas of described deletion is common by cache resources and bandwidth resources
Same competition leads to.
E, the current matching number of times of acquisition.
F, judge that whether described current matching number of times is less than described default matching number of times.
If described current matching number of times is less than described default matching number of times and the goodness of fit of described composite function is less than institute
State the default goodness of fit, find and delete described m group treat error described in fitting data be more than m predetermined threshold value described about
Beam data, obtains new m group and treats fitting data, and repeat step a to f is until the current matching number of times of described composite function is equal to
The goodness of fit of described default matching number of times or described composite function is more than or equal to the described default goodness of fit.
Obtaining current matching number of times is 1.Because current matching number of times 1 is less than default matching number of times 3 and described composite function
The goodness of fit be 0.6, the not up to default goodness of fit require it is therefore desirable to described data cached carry out second matching,
Now treat that fitting data is that new first group treats that fitting data is that described 60 the first fitting function differences are more than the first default threshold
Be worth is data cached.To described, repeat step abcdef treats that fitting data is fitted, second matching obtains first matching
Function f12(x).I.e. described 60 hydraulic performance declines treating the corresponding program of fitting data are the competition to cache resources by each program
Cause, treat that the bandwidth feature of the corresponding each program of fitting data and memory features are less for this 60, each program is transported common
Hydraulic performance decline during row no affects.
Iterative fitting obtains first fitting function f that second matching obtains12(x)=a2x1 2+b2x2 2+c2x3 2+d2x1+
e2x2+f2x3+g2It is assumed that being calculated described composite function to be equal to first fitting function f12X the goodness of fit of () is 0.8, that is,
The goodness of fit of composite function is equal to the described default goodness of fit, meets matching termination condition, can terminate to described first group
Treat the matching of fitting data.Therefore, first group of first fitting function treating that fitting data matching obtains is f1(x)=f12(x)
=a2x1 2+b2x2 2+c2x3 2+d2x1+e2x2+f1x3+g2.
Then treat described in calculating in fitting data that all of independent variable is data cached and is P, obtain by caching
Compete the condition of the hydraulic performance decline of program leading to, that is, when all of data cached in fitting data and during less than P, multinuclear
On framework, f is equal to by the interference function being operated together between program that shared resource competition causes1(x), now second matching
Function f2(x) and the 3rd fitting function f3X () is equal to 1.
It should be noted that the performance of first group of corresponding program of bound data treating to delete in fitting data fit procedure
Decline is probably led to by the common competition of cache resources and bandwidth resources.
Particularly it is assumed that being calculated described composite function to be equal to first fitting function f12X the goodness of fit of () is less than
During the default goodness of fit, execution step d, obtain 5 bound datas, obtain new first group and treat fitting data, obtain current plan
Close number of times and be less than default matching number of times for 2, repeated execution of steps a, b, c, d, e, f are until the goodness of fit of described composite function is big
When being equal to the default goodness of fit or current matching number of times is equal to default matching number of times, terminate to treat fitting data to described first group
Matching.Particularly, set first group of default matching number of times treating fitting function in the present embodiment fitting parameter as 3, therefore, when
Described first group is treated with fitting data iterative fitting 3 times afterwards, if the goodness of fit of described composite function is less than described default plan
Close goodness, still terminate described first group is treated with the fit procedure of fitting data.The matching that described last matching is obtained
Function treats the fitting function of fitting data as this group.
To described first group after the matching of fitting data is complete, start to treat that fitting data is fitted to second group, that is, right
Band data is fitted.Obtain the described second group fitting parameter treating fitting data first and second group treat fitting data D2=
{(Cm2、Cn2、Cp2), Rmnp/f1(Cm1、Cn1、Cp1), it should be noted that obtaining described second group to treat that fitting data is to obtain institute
State first group of 45 groups of bound data treating that fitting data is deleted in fit procedure.Wherein (Cm2、Cn2、Cp2) for treating fitting data
In independent variable, described RmnpFor variable the reason treating in fitting data, f1(Cm1、Cn1、Cp1) it is by independent variable (Cm1、Cn1、Cp1)
Substitute into first fitting function f1X functional value that () obtains, by (Rmnp/f1(Cm1、Cn1、Cp1)) value treat matching as second group
The final dependent variable of data is it is assumed that this group is treated with fitting data be iterated matching to obtain second fitting function is f2(x).By
In m=2, so needing to judge that this group treats whether fitting data meets the 2nd default fitting condition, because this group treats that fitting data is
Band data, the described 2nd default fitting condition is more than or equal to B, B > 0 for band data, treats each journey in fitting data when described
The independent variable C of sequencem2、Cn2、Cp2It is all higher than equal to just meeting fitting condition during B, by the described argument data treating fitting data
The data that band data is less than B is deleted, then treat that in fitting data, the band data more than or equal to B for the band data is carried out to remaining
Matching.Described specific approximating method and step may be referred to described data cached approximating method and step, and here is no longer
Repeat.Final matching obtains second fitting function f2 (x).
It should be noted that obtaining second fitting function f in matching2After (x), calculate the goodness of fit of composite function
When, described composite function is first fitting function f1(x) and second fitting function f2(x) do the function that product obtains.
Then treat described in being calculated in fitting data in addition to bound data all of independent variable be band data and be
Q, is calculated the data cached of the corresponding program of described band data and is R, obtains being led to by caching and the competition of bandwidth
The hydraulic performance decline of program condition, that is, when treat all of data cached in fitting data and be more than R and all of bandwidth number
According to and during less than Q, multicore architecture is equal to f by the shared resource interference function being operated together between program that causes of competition1
(x)*f2(x), now the 3rd fitting function f3X () is equal to 1.Now the final hydraulic performance decline of program is by caching and bandwidth two
The competition of aspect leads to.
It should be noted that the performance of second group of corresponding program of bound data treating to delete in fitting data fit procedure
Decline is to be led to by cache resources, bandwidth resources and the common competition of memory source.
Particularly, may be referred to treat that fitting data is fitted obtaining second fitting function f to described second group3(x)
Method treat fitting data D3={ (C to described 3rd groupm3、Cn3、Cp3), Rmnp/f1(Cm1、Cn1、Cp1)*f2(Cm2、Cn2、Cp2)}
It is fitted obtaining the 3rd fitting function f3X (), treats that fitting data is described second group and treats that fitting data is intended for described 3rd group
The bound data deleted during conjunction.Wherein (Cm3、Cn3、Cp3) it is the independent variable treated in fitting data, described RmnpFor treating matching
The reason in data variable, f1(Cm1、Cn1、Cp1) it is by independent variable (Cm1、Cn1、Cp1) substitute into first fitting function f1X () obtains
Functional value, f2(Cm2、Cn2、Cp2) it is by independent variable (Cm2、Cn2、Cp2) substitute into second fitting function f2X function that () obtains
Value, by (Rmnp/f1(Cm1、Cn1、Cp1)*f2(Cm2、Cn2、Cp2)) value as the 3rd group of final dependent variable treating fitting data, false
If to this ((Cm3、Cn3、Cp3), Rmnp/f1(Cm1、Cn1、Cp1)*f2(Cm2、Cn2、Cp2)) form treat fitting data be iterated intend
It is f that conjunction obtains the 3rd fitting function2(x).
It should be noted that obtaining the 3rd fitting function f in matching3After (x), calculate the goodness of fit of composite function
When, described composite function is first fitting function f1(x), second fitting function f2(x) and the 3rd fitting function f3(x)
Do the function that product obtains.
Then treat described in being calculated all of independent variable in fitting data be internal storage data and be S, be calculated institute
State the data cached and band data of the corresponding program of all of internal storage data and respectively T and U, obtain by caching, bandwidth
And the condition of the hydraulic performance decline of program that the competition of internal memory leads to, that is, when treating all of data cached in fitting data and be more than
T, all of band data and more than U and all of internal storage data and during less than S, multicore architecture is competed by shared resource
The interference function being operated together between program causing is equal to f1(x)*f2(x)*f3(x).Now treat that in fitting data, each program is
Whole hydraulic performance decline is to be led to by the competition of caching, bandwidth and internal memory three aspect.
So far, complete and treat three groups in fitting data with the different pieces of information characteristic matchings treating fitting data to described.
If it should be noted that described treat in fitting data also have the 4th group or q group, q >=4 treat fitting data, then may be used
Treat that the method that fitting data is fitted obtains fitting function f for 2nd group or the 3rd group with reference pairq(x).
204th, obtain final fitting function.
Particularly, described final fitting function is the product of described k fitting function.
By described, example, due to treating that fitting data is divided into 3 groups and is fitted respectively obtaining 3 matching letters in the present embodiment
Number, so final fitting function can be the piecewise function with 3 segmentations.
Specifically, to described there is caching, bandwidth and memory behavior treat fitting data collection { (Cm, Cn, Cp), RmnpMatching
The interference function being operated together between program being caused by shared resource competition, i.e. final fitting function are obtained on multicore architecture
Can be the product of any two function in 3 fitting functions, that is,
F (X)=f1(x1) or
=f1(x1)*f2(x2) or
=f1(x1)*f2(x2)*f3(x3)
Specifically, as data cached x all of in multiple programs1And less than P when, interference function F (X)=f1(x1), that is,
Now in program, band data and internal storage data affect for 1 on the performance change of program, i.e. f2(x2)=1 and f3(x3)=1;When
All of data cached x in the plurality of program1And more than all of band data x in R and the plurality of program2And little
When Q, interference function F (X)=f1(x1)*f2(x2), that is, now in program, internal storage data affects for 1 on the performance change of program,
I.e. f3(x3)=1;As data cached x all of in the plurality of program1And more than T, all of bandwidth in the plurality of program
Data x2And the internal storage data x more than U and the plurality of program3And less than S when, interference function F (X)=f1(x1)*f2
(x2)*f3(x3).
Particularly, the described data characteristic treating fitting data can need flexibly to increase or decrease according to matching, you can with
The number of the characteristics such as the I/O (input/output, input/output) in addition computer hardware resource characteristic in treating fitting data
According to being fitted, it is common that the multiple resource contentions obtaining on multicore architecture in addition to the shared resources such as caching, bandwidth, internal memory cause
Interference function between operation program.The matching to described internal storage data can also be reduced in treating fitting data, only to described
Data cached and band data is fitted obtaining being shared by caching, bandwidth resources on multicore architecture and competes the common fortune causing
Interference function between line program.
The embodiment of the present invention provides a kind of approximating method, by described, computer can treat that fitting data divides according to data characteristic
Become multigroup and treat fitting data, then treat that fitting data is fitted obtaining multiple fitting functions respectively to multigroup, finally by multiple plans
Close function and be multiplied and obtain final fitting function, improve the flexibility of matching, with respect to prior art, can reflect and treat matching number
According between relation, therefore improve fitting precision.
The present invention provides a kind of matching device 30, as shown in figure 3, including:
Division unit 301, treats matching number for the data treating fitting data concentration being divided into n group according to preset data characteristic
According to n >=2.
Example, described preset data characteristic can be computer hardware resource characteristic, then described division unit 301 is permissible
The described data treating that fitting data is concentrated is divided into by data cached, band data and interior according to described computer hardware resource characteristic
Deposit data etc..
For what n group was treated meet in fitting data with default fitting condition, fitting unit 302, treats that fitting data is fitted
Obtain k fitting function, 1≤k≤n.
Particularly, described default fitting condition instruction each group treats that fitting data size need to be more than certain specific threshold value.
First acquisition unit 303, for obtaining final fitting function, described final fitting function is described k group matching letter
The product of number.
So, division unit is treated described that fitting data is divided into and multigroup is treated fitting data, matching according to data characteristic
Unit to described multigroup treat that fitting data is fitted obtaining multiple fitting functions respectively, first acquisition unit is by multiple matching letters
Number multiplications obtain final fitting function, improve the flexibility of matching, with respect to prior art, can reflect treat fitting data it
Between relation, therefore improve fitting precision.
Described division unit 301 specifically for:
The described data treating that fitting data is concentrated is divided into by data cached, bandwidth according to described computer hardware resource characteristic
Data and internal storage data.
Further, as shown in figure 4, described fitting unit 302 also includes:
Obtain subelement 3021, treat fitting data for obtaining m group, 1≤m≤n.
Judgment sub-unit 3022, pre- for when described m >=2, judging that described m group treats whether fitting data meets m
If fitting condition.
In described m group, execution subelement 3023, for treating that fitting data meets m and presets fitting condition or described m=1
When, execute following steps:
A, according to fitting parameter, fitting data is fitted obtaining m-th fitting function to be treated to described m group.
B, the goodness of fit of calculating composite function, described composite function is taking advantage of of currently available 1st to m-th fitting function
Long-pending, whether the goodness of fit of relatively described composite function is more than or equal to the default goodness of fit.
If the goodness of fit of the described composite function of c is more than or equal to the described default goodness of fit, terminate described m group is treated
The fit procedure of fitting data.
If the goodness of fit of the described composite function of d is less than the described default goodness of fit, treat fitting data in described m group
The described error of middle deletion is more than the bound data of m predetermined threshold value.
E, the current matching number of times of acquisition.
F, judge that whether described current matching number of times is less than described default matching number of times.
If described current matching number of times is less than described default matching number of times and the goodness of fit of described composite function is less than institute
State the default goodness of fit, find and delete described m group treat error described in fitting data be more than m predetermined threshold value described about
Beam data, obtains new m group and treats fitting data, and repeat step a to f is until the current matching number of times of described composite function is equal to
The described goodness of fit of described default matching number of times or described composite function is more than or equal to the described default goodness of fit.
It should be noted that described acquisition subelement 3021 specifically for:
Obtain m-1 group and treat that in fitting data, error is more than the bound data of m-1 predetermined threshold value;Obtain described constraint number
According in argument data treat the described argument data in fitting data as described m group;Obtain the 1st to the m-1 plan
Close function y1=f1X () is to ym-1=fm-1X (), the 1st to m-1 group argument data in described bound data is brought into respectively
Described 1st to the m-1 fitting function y1=f1X () is to ym-1=fm-1Dependent variable Y is obtained in (x)1To Ym-1;Obtain W and described
Dependent variable Y in bound data, described W is dependent variable numerical value Y1To Ym-1Product, Y/W is treated in fitting data as m group
Final dependent variable.
Further, as shown in figure 5, described matching device 30 can also include:
Second acquisition unit 304, for obtaining described fitting parameter, described fitting parameter includes the default goodness of fit and each
Group treats functional form, the substantive requirements of form, predetermined threshold value and the default matching number of times of the corresponding each fitting function of fitting data.
The embodiment of the present invention provides a kind of matching device, and division unit can treat fitting data according to data characteristic by described
Be divided into multigroup treat fitting data, fitting unit to described multigroup treat that fitting data is fitted obtaining multiple fitting functions respectively,
Multiple fitting functions are multiplied and obtain final fitting function by first acquisition unit, improve the flexibility of matching, with respect to existing
Technology, can reflect the relation treating between fitting data, therefore improve fitting precision.
Those skilled in the art can be understood that, for convenience and simplicity of description, each list of foregoing description
The specific work process of unit, may be referred to the corresponding process in preceding method embodiment, will not be described here.
The embodiment of the present invention provides a kind of base station 40, as shown in fig. 6, including:
Processor 401, treats matching number for the data treating fitting data concentration being divided into n group according to preset data characteristic
According to n >=2.
What described processor 401 was additionally operable to n group is treated to meet in fitting data default fitting condition treats that fitting data is carried out
Matching obtains k fitting function, 1≤k≤n.
Described processor 401 is additionally operable to obtain final fitting function, and described final fitting function is described k fitting function
Product.
So, processor can according to data characteristic by described treat fitting data be divided into multigroup treat fitting data, right
Described multigroup treat that fitting data is fitted obtaining multiple fitting functions respectively, by multiple fitting functions be multiplied obtain final matching
Function, improves the flexibility of matching, with respect to prior art, can reflect the relation treating between fitting data, therefore improve
Fitting precision.
It should be noted that described processor 401 is additionally operable to obtain m group and treats fitting data, 1≤m≤n, it is additionally operable to
During described m >=2, judge that described m group treats whether fitting data meets m and preset fitting condition, is additionally operable to treat in described m group
When fitting data meets the default fitting condition of m or described m=1, execute following steps:
A, according to fitting parameter, fitting data is fitted obtaining m-th fitting function to be treated to described m group;
B, the goodness of fit of calculating composite function, described composite function is taking advantage of of currently available 1st to m-th fitting function
Long-pending, whether the goodness of fit of relatively described composite function is more than or equal to the default goodness of fit;
If the goodness of fit of the described composite function of c is more than or equal to the described default goodness of fit, terminate described m group is treated
The fit procedure of fitting data;
If the goodness of fit of the described composite function of d is less than the described default goodness of fit, treat fitting data in described m group
The described error of middle deletion is more than the bound data of m predetermined threshold value;
E, the current matching number of times of acquisition;
F, judge that whether described current matching number of times is less than described default matching number of times;
If described current matching number of times is less than described default matching number of times and the goodness of fit of described composite function is less than institute
State the default goodness of fit, find and delete described m group treat error described in fitting data be more than m predetermined threshold value described about
Beam data, obtains new m group and treats fitting data, and repeat step a to f is until the current matching number of times of described composite function is equal to
The goodness of fit of described default matching number of times or described composite function is more than or equal to the described default goodness of fit.
Described processor 401 is additionally operable to:
The described data treating that fitting data is concentrated is divided into by data cached, bandwidth according to described computer hardware resource characteristic
Data and internal storage data.
Described processor 401 is additionally operable to obtain m-1 group and treats that error in fitting data is more than the constraint of m-1 predetermined threshold value
Data;Obtain the argument data in described bound data and treat the described argument data in fitting data as described m group;
Obtain the 1st to the m-1 fitting function y1=f1X () is to ym-1=fm-1X (), by the 1st in described bound data to m-1 group
Argument data brings described 1st to the m-1 fitting function y respectively into1=f1X () is to ym-1=fm-1Dependent variable number is obtained in (x)
Value Y1To Ym-1;Obtain dependent variable data Y in bound data described in W, described W is dependent variable Y1To Ym-1Product, Y/W is made
Treat the final dependent variable in fitting data for m group.
Described processor 401 is additionally operable to obtain described fitting parameter, and described fitting parameter includes the default goodness of fit and each
Group treats functional form, the substantive requirements of form, predetermined threshold value and the default matching number of times of the corresponding each fitting function of fitting data.
It should be understood that disclosed system in several embodiments provided herein, apparatus and method are permissible
Realize by another way.For example, device embodiment described above is only schematically, for example, described unit
Divide, only a kind of division of logic function, actual can have other dividing mode when realizing, for example multiple units or assembly
Can in conjunction with or be desirably integrated into another system, or some features can be ignored, or does not execute.Another, shown or
The coupling each other discussing or direct-coupling or communication connection can be by some interfaces, the indirect coupling of device or unit
Close or communicate to connect, can be electrical, mechanical or other forms.
The described unit illustrating as separating component can be or may not be physically separate, show as unit
The part showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.The mesh to realize this embodiment scheme for some or all of unit therein can be selected according to the actual needs
's.
In addition, can be integrated in a processing unit in each functional unit in each embodiment of the present invention it is also possible to
It is that the independent physics of unit is included it is also possible to two or more units are integrated in a unit.Above-mentioned integrated list
Unit both can be to be realized in the form of hardware, it would however also be possible to employ the form that hardware adds SFU software functional unit is realized.
One of ordinary skill in the art will appreciate that:The all or part of step realizing said method embodiment can be passed through
Completing, aforesaid program can be stored in a computer read/write memory medium the related hardware of programmed instruction, this program
Upon execution, execute the step including said method embodiment;And aforesaid storage medium includes:ROM, RAM, magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be defined by described scope of the claims.
Claims (8)
1. a kind of approximating method, is applied to computer it is characterised in that including:
The data treating fitting data concentration is divided into by n group according to preset data characteristic and treats fitting data, n >=2;
What n group was treated meet in fitting data with default fitting condition treats that fitting data is fitted obtaining k fitting function, 1≤k
≤n;
Obtain final fitting function, described final fitting function is the product of described k fitting function;
Described n group is treated meet in fitting data with default fitting condition treat that fitting data is fitted obtaining k fitting function
Including:
Obtain m group and treat fitting data, 1≤m≤n;
When described m >=2, judge that described m group treats whether fitting data meets m and preset fitting condition;
In described m group when fitting data meets m and presets fitting condition or described m=1, execute following steps:
A, according to fitting parameter, fitting data is fitted obtaining m-th fitting function to be treated to described m group;
B, the goodness of fit of calculating composite function, described composite function is the product of currently available 1st to m-th fitting function,
Whether the goodness of fit of relatively described composite function is more than or equal to the default goodness of fit;
If the goodness of fit of the described composite function of c is more than or equal to the described default goodness of fit, terminate to treat matching to described m group
The fit procedure of data;
If the goodness of fit of the described composite function of d is less than the described default goodness of fit, treat to delete in fitting data in described m group
Except error is more than the bound data of m predetermined threshold value;
E, the current matching number of times of acquisition;
F, judge that whether described current matching number of times is less than described default matching number of times;
If described current matching number of times be less than described default matching number of times and described composite function the goodness of fit be less than described pre-
If the goodness of fit, find and delete described m group and treat that error described in fitting data is more than the described constraint number of m predetermined threshold value
According to, obtain new m group and treat fitting data, repeat step a to f until described composite function current matching number of times be equal to described
The goodness of fit of default matching number of times or described composite function is more than or equal to the described default goodness of fit.
2. method according to claim 1 it is characterised in that described m group treat fitting data include argument data and
Dependent variable data, described acquisition m group treats that fitting data includes:
Obtain m-1 group and treat that in fitting data, error is more than the bound data of m-1 predetermined threshold value;
The argument data obtaining in described bound data treats the argument data in fitting data as described m group;
Obtain the 1st to the m-1 fitting function y1=f1 (x) to ym-1=fm-1 (x), by the 1st in described bound data to
M-1 group independent variable bring into respectively described 1st to the m-1 fitting function y1=f1 (x) obtain to ym-1=fm-1 (x) because
Variable Y 1 is to Ym-1;
Obtain variable Y the reason in W and described bound data, described W is the product of dependent variable Y1 to Ym-1, using Y/W as m
Group treats the final dependent variable in fitting data.
3. the method according to claim 1 to 2 any one claim is it is characterised in that treat matching described to n group
Meet in data default fitting condition treat that fitting data is fitted obtaining k fitting function before, methods described also includes:
Obtain fitting parameter, described fitting parameter includes the default goodness of fit and each group treats the corresponding each fitting function of fitting data
Functional form, the substantive requirements of form, predetermined threshold value and default matching number of times.
4. the method according to claim 1 to 2 any one claim is it is characterised in that described preset data characteristic
For computer hardware resource characteristic,
Described will treat that the data that fitting data is concentrated is divided into n group and treats that fitting data is according to preset data characteristic:
The described data treating that fitting data is concentrated is divided into by data cached, band data according to described computer hardware resource characteristic
And internal storage data.
5. a kind of matching device is it is characterised in that include:
Division unit, for treating that the data that fitting data is concentrated is divided into n group and treats fitting data according to preset data characteristic, n >=
2;
For what n group was treated meet in fitting data with default fitting condition, fitting unit, treats that fitting data is fitted obtaining k
Fitting function, 1≤k≤n;
First acquisition unit, for obtaining final fitting function, described final fitting function is taking advantage of of described k fitting function
Long-pending;
Described fitting unit includes:
Obtain subelement, treat fitting data for obtaining m group, 1≤m≤n;
Judgment sub-unit, for when described m >=2, judge described m group treat fitting data whether meet m preset matching article
Part;
Execution subelement, executes in described m group when fitting data meets m and presets fitting condition or described m=1
Following steps:
A, according to fitting parameter, fitting data is fitted obtaining m-th fitting function to be treated to described m group;
B, the goodness of fit of calculating composite function, described composite function is the product of currently available 1st to m-th fitting function,
Whether the goodness of fit of relatively described composite function is more than or equal to the default goodness of fit;
If the goodness of fit of the described composite function of c is more than or equal to the described default goodness of fit, terminate to treat matching to described m group
The fit procedure of data;
If the goodness of fit of the described composite function of d is less than the described default goodness of fit, treat to delete in fitting data in described m group
Except described error is more than the bound data of m predetermined threshold value;
E, the current matching number of times of acquisition;
F, judge that whether described current matching number of times is less than described default matching number of times;
If described current matching number of times be less than described default matching number of times and described composite function the goodness of fit be less than described pre-
If the goodness of fit, find and delete described m group and treat that error described in fitting data is more than the described constraint number of m predetermined threshold value
According to, obtain new m group and treat fitting data, repeat step a to f until described composite function current matching number of times be equal to described
The described goodness of fit of default matching number of times or described composite function is more than or equal to the described default goodness of fit.
6. matching device according to claim 5 it is characterised in that described acquisition subelement specifically for:
Obtain m-1 group and treat that in fitting data, error is more than the bound data of m-1 predetermined threshold value;
Obtain the argument data in described bound data and treat the described argument data in fitting data as described m group;
Obtain the 1st to the m-1 fitting function y1=f1 (x) to ym-1=fm-1 (x), by the 1st in described bound data to
M-1 group argument data is brought described 1st to the m-1 fitting function y1=f1 (x) respectively into and is obtained to ym-1=fm-1 (x)
To dependent variable numerical value Y1 to Ym-1;
Obtain variable Y the reason in W and described bound data, described W is the product of dependent variable Y1 to Ym-1, using Y/W as m
Group treats the final dependent variable data in fitting data.
7. the matching device according to claim 5 to 6 any one claim is it is characterised in that described matching device
Also include:
Second acquisition unit, for obtaining fitting parameter, described fitting parameter includes the default goodness of fit and each group treats matching number
According to the functional form of corresponding each fitting function, the substantive requirements of form, predetermined threshold value and default matching number of times.
8. the matching device according to claim 5 to 6 any one claim is it is characterised in that described preset data
Characteristic is computer hardware resource characteristic,
Described division unit specifically for:
The described data treating that fitting data is concentrated is divided into by data cached, band data according to described computer hardware resource characteristic
And internal storage data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310036087.3A CN103970719B (en) | 2013-01-30 | 2013-01-30 | Fitting method and fitting device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310036087.3A CN103970719B (en) | 2013-01-30 | 2013-01-30 | Fitting method and fitting device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103970719A CN103970719A (en) | 2014-08-06 |
CN103970719B true CN103970719B (en) | 2017-02-22 |
Family
ID=51240237
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310036087.3A Expired - Fee Related CN103970719B (en) | 2013-01-30 | 2013-01-30 | Fitting method and fitting device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103970719B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3197045B1 (en) | 2014-10-31 | 2018-09-19 | Huawei Technologies Co., Ltd. | Curve fitting circuit, analog predistorter and radio frequency signal transmitter |
CN106406830B (en) * | 2015-07-29 | 2021-08-03 | 腾讯科技(深圳)有限公司 | Quasi-periodic signal processing method and device and computer readable storage medium |
CN105893159B (en) * | 2016-06-21 | 2018-06-19 | 北京百度网讯科技有限公司 | Data processing method and device |
CN108021535A (en) * | 2016-11-03 | 2018-05-11 | 北京国双科技有限公司 | Data fitting method and device |
WO2018232695A1 (en) * | 2017-06-22 | 2018-12-27 | 深圳市汇顶科技股份有限公司 | Method and apparatus for updating current reference value of touch screen, touch screen and electronic terminal |
CN110555220B (en) * | 2018-05-31 | 2022-10-25 | 中国电力科学研究院有限公司 | Calibration method and system of photoelectric conversion model |
CN109946718B (en) * | 2019-03-20 | 2020-10-13 | 北京交通大学 | Pseudo satellite spatial layout method for railway station yard |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101719105A (en) * | 2009-12-31 | 2010-06-02 | 中国科学院计算技术研究所 | Optimization method and optimization system for memory access in multi-core system |
-
2013
- 2013-01-30 CN CN201310036087.3A patent/CN103970719B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101719105A (en) * | 2009-12-31 | 2010-06-02 | 中国科学院计算技术研究所 | Optimization method and optimization system for memory access in multi-core system |
Non-Patent Citations (2)
Title |
---|
基于效应数据的微波器件HPM效应分析及建模方法;章勇华 等;《强激光与粒子束》;20090430;第21卷(第4期);第560-564页 * |
基于统计学习分析多核间性能干扰;赵家程;《软件学报》;20131130;第24卷(第1期);第2558-2570页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103970719A (en) | 2014-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103970719B (en) | Fitting method and fitting device | |
CN110378468A (en) | A kind of neural network accelerator quantified based on structuring beta pruning and low bit | |
US8676874B2 (en) | Data structure for tiling and packetizing a sparse matrix | |
CN107451659A (en) | Neutral net accelerator and its implementation for bit wide subregion | |
US8762655B2 (en) | Optimizing output vector data generation using a formatted matrix data structure | |
CN112163601B (en) | Image classification method, system, computer device and storage medium | |
CN112052951B (en) | Pruning neural network method, system, equipment and readable storage medium | |
CN111079899A (en) | Neural network model compression method, system, device and medium | |
CN115904539A (en) | Online generation method, device and equipment of segmentation strategy and storage medium | |
CN112819157B (en) | Neural network training method and device, intelligent driving control method and device | |
WO2023207039A1 (en) | Data processing method and apparatus, and device and storage medium | |
CN112598129A (en) | Adjustable hardware-aware pruning and mapping framework based on ReRAM neural network accelerator | |
WO2023236319A1 (en) | Convolutional neural network deployment and optimization method for microcontroller | |
CN109117475A (en) | A kind of method and relevant device of text rewriting | |
CN108875914A (en) | The method and apparatus that Neural Network Data is pre-processed and is post-processed | |
CN105830160B (en) | For the device and method of buffer will to be written to through shielding data | |
CN107402905A (en) | Computational methods and device based on neutral net | |
US11507782B2 (en) | Method, device, and program product for determining model compression rate | |
CN112988229B (en) | Convolutional neural network resource optimization configuration method based on heterogeneous computation | |
CN108628889B (en) | Time slice-based data sampling method, system and device | |
Viana et al. | Configurable cache subsetting for fast cache tuning | |
CN109165325A (en) | Method, apparatus, equipment and computer readable storage medium for cutting diagram data | |
CN111797991A (en) | Deep network model compression system, method and device | |
CN115392441A (en) | Method, apparatus, device and medium for on-chip adaptation of quantized neural network model | |
Anuradha et al. | Efficient workload characterization technique for heterogeneous processors |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170222 Termination date: 20210130 |