CN110135507A - A kind of label distribution forecasting method and device - Google Patents

A kind of label distribution forecasting method and device Download PDF

Info

Publication number
CN110135507A
CN110135507A CN201910423070.0A CN201910423070A CN110135507A CN 110135507 A CN110135507 A CN 110135507A CN 201910423070 A CN201910423070 A CN 201910423070A CN 110135507 A CN110135507 A CN 110135507A
Authority
CN
China
Prior art keywords
matrix
factor
latent
label
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.)
Pending
Application number
CN201910423070.0A
Other languages
Chinese (zh)
Inventor
张恒汝
黄雨婷
徐媛媛
闵帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southwest Petroleum University
Original Assignee
Southwest Petroleum University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southwest Petroleum University filed Critical Southwest Petroleum University
Priority to CN201910423070.0A priority Critical patent/CN110135507A/en
Publication of CN110135507A publication Critical patent/CN110135507A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention provides a kind of label distribution forecasting method and devices, this method comprises: S1: obtaining training set and merge initialization latent factor matrix;S2: basic target function is constructed according to training set and latent factor matrix;S3: it is constructed according to latent factor matrix apart from mapping function;S4: objective function is constructed according to basic target function and apart from mapping function;S5: objective function is to latent factor Matrix Calculating single order local derviation;S6: factor I matrix is determined;S7: factor I matrix is substituted into single order local derviation vector and obtains First-order Gradient matrix;S8: judging whether the F norm of First-order Gradient matrix is less than threshold limit value, if so, executing S10, otherwise executes S9;S9: optimization is iterated to latent factor matrix and obtains new factor I matrix, and executes S7;S10: the label distribution vector of example to be predicted is obtained according to factor I matrix.This programme can be improved the accuracy that label forecast of distribution is carried out to example.

Description

A kind of label distribution forecasting method and device
Technical field
The present invention relates to technical field of data processing, in particular to a kind of label distribution forecasting method and device.
Background technique
In fields such as image recognition, video parsings, for the example inputted, required output is the result is that entire The distribution vector of tally set, each of distribution vector element are the degree that corresponding label describes the example in tally set. For example, at the age for predicting the student according to the photo of a student, if the age for estimating this student is 18 to 22 years old, It is then equivalent to and estimates a possibility that age of this student belongs to each element in age tally set [18,19,20,21,22], such as A possibility that a possibility that a possibility that fruit 18 years old a possibility that is 10%, 19 years old is 20%, 20 years old is 40%, 21 years old be 20%, 22 years old a possibility that is 10%, then required output result is the distribution of age tally set [18,19,20,21,22] Vector is [0.1,0.2,0.4,0.2,0.1].
Currently, generally by label Distributed learning algorithm (Label Distribution Learning, LDL) to example Label forecast of distribution is carried out, to determine that example is directed to the distribution vector of entire tally set.
Since the label in label Distributed learning algorithm is artificially to be provided by expert or obtained by machine learning, this makes The division boundary of label there are ambiguity, i.e., is to be mutually related, and calculate currently with label Distributed learning between different labels Method does not consider the relevance between different labels when carrying out label forecast of distribution to example, cause to carry out label distribution to example The accuracy of prediction is lower.
Summary of the invention
The embodiment of the invention provides a kind of label distribution forecasting method and device, it can be improved and label point is carried out to example The accuracy of cloth prediction.
In a first aspect, the embodiment of the invention provides a kind of label distribution forecasting methods, comprising:
S1: training set is obtained, and initializes latent factor matrix, wherein the training set includes at least one The characteristic information of sample and physical tags distributed intelligence, the latent factor matrix turn for what is be distributed from characteristic information to label It changes;
S2: basic target function is constructed according to the training set and the latent factor matrix, wherein the basis mesh Scalar functions are used to measure the gap between physical tags distribution and prediction label distribution;
S3: it is constructed according to the latent factor matrix apart from mapping function, wherein described to be used to describe apart from mapping function Label correlation;
S4: according to the basic target function and it is described apart from mapping function construct objective function;
S5: for the objective function to the latent factor Matrix Calculating single order local derviation, single order local derviation vector is obtained;
S6: the latent factor matrix after initialization is determined as factor I matrix;
S7: the factor I matrix is substituted into the single order local derviation vector, obtains First-order Gradient matrix;
S8: judging whether the F norm of the First-order Gradient matrix is less than preset threshold limit value, if so, executing Otherwise S10 executes S9;
S9: an iteration optimization is carried out to the latent factor matrix, by the latent factor matrix after iteration optimization It is determined as the factor I matrix, and executes S7;
S10: according to the factor I matrix, the label distribution vector of example to be predicted is obtained.
Optionally, it is described apart from mapping function include: g (θij)=sgn (triangle (θij))·dis(θij), Wherein,
Wherein, the sgn (triangle (θij)) characterize in the latent factor matrix because of subvector θiWith the factor to Measure θjBetween correlation;The θikI-th is characterized in the latent factor matrix because of k-th of element in subvector;It is described θjkJ-th is characterized in the latent factor matrix because of k-th of element in subvector;It is every in the m characterization training set The number of the feature of a sample.
Optionally, the basic target function includes:
Wherein, the T0(θ) characterizes the basic target function;It is describedThe θjr J-th is characterized in the latent factor matrix because of r-th of element in subvector, the xirIt characterizes i-th in the training set The corresponding numerical value of r-th of feature of a sample;The dijCharacterize the included physical tags distribution letter of the training set J-th of label describes the degree of i-th of sample in breath;The n characterizes the total number of sample in the training set;The c table Levy the total number of the training set acceptance of the bid label.
Optionally, the S4 includes:
Regular terms is determined according to the latent factor matrix;
According to the basic target function, described apart from mapping function and the regular terms, following objective function is constructed;
Wherein, the T (θ) characterizes the objective function;The θijCharacterize in the latent factor matrix i-th of factor to J-th of element in amount;The λ1With the λ2For preset coefficient;It is describedCharacterize it is described just Then item.
Optionally, the S9 includes:
S91: the current factor I matrix is substituted into following first formula, calculates direction of search parameter;
First formula includes:
Wherein, the θ(l)The current factor I matrix of characterization, the l are nonnegative integer, and l+1 is characterized to institute State the number of the iteration optimization of latent factor matrix progress;The d(l)Characterize described search directioin parameter;It is described The current First-order Gradient matrix of characterization;H (the θ(l)) sea gloomy square of the characterization based on the current factor I matrix Battle array;
S92: substituting into following second formula for the current factor I matrix and described search directioin parameter, calculates the Two-factor matrix;
Second formula includes:
θ(l+1)(l)+d(l)
Wherein, the θ(l+1)The factor Ⅱ matrix is characterized, default search step-length is 1;
S93: using the factor Ⅱ matrix as the new factor I matrix, and S7 is executed.
Optionally, before the S10, further comprise:
Obtain test set, wherein the test set includes the characteristic information and physical tags of at least one sample Distributed intelligence;
Gather corresponding sample characteristics matrix and the factor I matrix according to the test, obtains and correspond to the survey The prediction label distribution of examination set;
Gather corresponding physical tags using prediction label distribution and the test to be distributed, calculates Euclidean distance, rope Ademilson distance, chi-Square measure, similarity, at least one evaluation index in fidelity;
The accuracy of the factor I matrix is verified according at least one calculated described evaluation index.
Second aspect, the embodiment of the invention also provides a kind of label forecast of distribution devices, comprising: pretreatment unit, letter Number construction unit, assignment unit, arithmetic element, judging unit, iterative optimization unit and predicting unit;
The pretreatment unit for obtaining trained set, and initializes latent factor matrix, wherein the training set Conjunction includes characteristic information and the physical tags distributed intelligence of at least one sample, and the latent factor matrix is used to believe from feature Cease the conversion of label distribution;
The function construction unit, for according to the pretreatment unit get it is described training set and it is described potential Factor matrix building is for measuring the basic target function of gap between physical tags distribution and prediction label distribution, according to described The building of latent factor matrix for describe label correlation apart from mapping function, and according to the basic target function and described Objective function is constructed apart from mapping function, and the latent factor Matrix Calculating single order local derviation is obtained for the objective function Obtain single order local derviation vector;
The assignment unit, for the latent factor matrix after pretreatment unit initialization to be determined as first Factor matrix;
The arithmetic element, for the factor I matrix to be substituted into the single order that the function construction unit obtains Local derviation vector;
The judging unit, for judging whether the F norm of the single order local derviation vector of the arithmetic element acquisition is small In preset threshold limit value, reality to be predicted is obtained according to the factor I matrix if so, triggering the predicting unit Otherwise the label distribution vector of example triggers the iterative optimization unit and carries out an iteration optimization to the latent factor matrix, The latent factor matrix after iteration optimization is determined as the factor I matrix;
The iterative optimization unit triggers the operation after going out the new factor I matrix in iteration optimization Unit, which is executed, substitutes into the single order local derviation vector for the new factor I matrix, obtains the new First-order Gradient matrix.
Optionally, the function construction unit, when constructing the objective function, for according to the latent factor matrix It determines regular terms, and according to the basic target function, described apart from mapping function and the regular terms, constructs following target letter Number;
Wherein, the T (θ) characterizes the objective function;The θijCharacterize in the latent factor matrix i-th of factor to J-th of element in amount;The λ1With the λ2For preset coefficient;It is describedCharacterize it is described just Then item.
Optionally, the iterative optimization unit, for executing following steps:
S91: the current factor I matrix is substituted into following first formula, calculates direction of search parameter;
First formula includes:
Wherein, the θ(l)The current factor I matrix of characterization, the l are nonnegative integer, and l+1 is characterized to institute State the number of the iteration optimization of latent factor matrix progress;The d(l)Characterize described search directioin parameter;It is described The current First-order Gradient matrix of characterization;H (the θ(l)) sea gloomy square of the characterization based on the current factor I matrix Battle array;
S92: substituting into following second formula for the current factor I matrix and described search directioin parameter, calculates the Two-factor matrix;
Second formula includes:
θ(l+1)(l)+d(l)
Wherein, the θ(l+1)The factor Ⅱ matrix is characterized, default search step-length is 1;
S93: using the factor Ⅱ matrix as the new factor I matrix, and triggering the arithmetic element will be new The factor I matrix substitute into the single order local derviation vector, obtain the new First-order Gradient matrix.
Optionally, which further comprises: verification unit;
The verification unit, for determining that the F norm of the First-order Gradient matrix is less than described face in the judging unit After boundary's threshold value, according to the acquired corresponding sample characteristics matrix of test set and the factor I matrix, corresponded to The prediction label distribution of the test set gathers corresponding physical tags point using prediction label distribution and the test Cloth calculates Euclidean distance, the gloomy distance of Sol, chi-Square measure, similarity, at least one evaluation index in fidelity, according to meter At least one the described evaluation index calculated verifies the accuracy of the factor I matrix.
Label distribution forecasting method and device provided in an embodiment of the present invention, acquisition include the feature of at least one sample The training set of information and physical tags distributed intelligence, and initialize for from characteristic information to label distribution conversion it is potential because Submatrix is distributed it with prediction label for measuring physical tags distribution according to training set and the building of latent factor matrix later Between gap basic target function, and according to the building of latent factor matrix for describe label correlation apart from mapping function, Objective function is constructed according to basic target function and apart from mapping function later, later for objective function to latent factor matrix It seeks single order local derviation and obtains single order local derviation vector, the latent factor matrix of initialization is initially determined as factor I matrix.It will Factor I matrix substitutes into single order local derviation vector and obtains First-order Gradient matrix, presets if the F norm of single order local derviation matrix is less than Threshold limit value, then the current factor I matrix illustrated has had reached required precision, and then can use current Graph One factor matrix obtains the label distribution vector of example to be predicted, faces if the F norm of single order local derviation matrix is greater than or equal to Boundary's threshold value then illustrates that current factor I matrix does not reach required precision, and it is excellent to carry out successively iteration to latent factor matrix Change, and using the result of iteration optimization recalculated as new factor I matrix the F norm of single order local derviation matrix with it is critical Threshold value is compared, until obtaining the factor I matrix for meeting required precision.It can be seen that since objective function is according to base Plinth objective function and built-up apart from mapping function, and it is used to describe the correlation between label apart from mapping function, thus Objective function considers the relevance between different labels, so that having using the latent factor matrix that objective function iteration optimization goes out There is higher accuracy, and then the accuracy for carrying out label forecast of distribution to example can be improved using latent factor matrix.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart of label distribution forecasting method provided by one embodiment of the present invention;
Fig. 2 is a kind of flow chart of objective function construction method provided by one embodiment of the present invention;
Fig. 3 is a kind of flow chart of latent factor matrix iteration optimization method provided by one embodiment of the present invention;
Fig. 4 is a kind of flow chart of factor I MATRIX CHECK-UP method provided by one embodiment of the present invention;
Fig. 5 is the flow chart of another label distribution forecasting method provided by one embodiment of the present invention;
Fig. 6 is the schematic diagram of equipment where a kind of label forecast of distribution device provided by one embodiment of the present invention;
Fig. 7 is a kind of schematic diagram of label forecast of distribution device provided by one embodiment of the present invention;
Fig. 8 is the schematic diagram of another label forecast of distribution device provided by one embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, this method may include following step the embodiment of the invention provides a kind of label distribution forecasting method It is rapid:
Step 101: obtaining training set, and initialize latent factor matrix, wherein training set includes at least one The characteristic information of sample and physical tags distributed intelligence, conversion of the latent factor matrix for being distributed from characteristic information to label;
Step 102: basic target function being constructed according to training set and latent factor matrix, wherein basic target function For measuring the gap between physical tags distribution and prediction label distribution;
Step 103: being constructed according to latent factor matrix apart from mapping function, wherein apart from mapping function for describing mark Sign correlation;
Step 104: constructing objective function according to basic target function and apart from mapping function;
Step 105: for objective function to latent factor Matrix Calculating single order local derviation, obtaining single order local derviation vector;
Step 106: the latent factor matrix after initialization is determined as factor I matrix;
Step 107: factor I matrix being substituted into single order local derviation vector, obtains First-order Gradient matrix;
Step 108: judging whether the F norm of First-order Gradient matrix is less than preset threshold limit value, if so, executing Step 110, no to then follow the steps 109;
Step 109: an iteration optimization being carried out to latent factor matrix, the latent factor matrix after iteration optimization is determined For factor I matrix, and execute step 107;
Step 110: according to factor I matrix, obtaining the label distribution vector of example to be predicted.
Label distribution forecasting method provided in an embodiment of the present invention, acquisition include at least one sample characteristic information and The training set of physical tags distributed intelligence, and initialize the latent factor square for the distribution conversion from characteristic information to label Battle array, it is poor between physical tags distribution and prediction label distribution for measuring according to training set and the building of latent factor matrix later Away from basic target function, and according to latent factor matrix building for describe label correlation apart from mapping function, later Objective function is constructed according to basic target function and apart from mapping function, later for objective function to latent factor Matrix Calculating one Rank local derviation and obtain single order local derviation vector, the latent factor matrix of initialization is initially determined as factor I matrix.By first Factor matrix substitutes into single order local derviation vector and obtains First-order Gradient matrix, if the F norm of single order local derviation matrix is less than preset face Boundary's threshold value, the then current factor I matrix illustrated have had reached required precision, so can use current first because Submatrix obtains the label distribution vector of example to be predicted, if the F norm of single order local derviation matrix is greater than or equal to Threshold extent Value, then illustrate that current factor I matrix does not reach required precision, carries out successively iteration optimization to latent factor matrix, and Using the result of iteration optimization recalculated as new factor I matrix single order local derviation matrix F norm and threshold limit value into Row compares, until obtaining the factor I matrix for meeting required precision.It can be seen that since objective function is according to basic target Function and built-up apart from mapping function, and it is used to describe the correlation between label apart from mapping function, thus target letter Number considers the relevance between different labels, so that having using the latent factor matrix that objective function iteration optimization goes out higher Accuracy, and then using latent factor matrix can be improved to example carry out label forecast of distribution accuracy.
In embodiments of the present invention, training set accessed by step 101 includes at least one sample, is specifically wrapped Characteristic information and the physical tags distributed intelligence for including each sample, subsequent step 102 according to training set and it is potential because When submatrix constructs basic target function, training sample eigenmatrix corresponding with training set and training sample are specifically utilized This physical tags distribution matrix with latent factor matrix constructs basic target function jointly.
Further, training sample eigenmatrix corresponding with training set can be the matrix of n row m column, In, it include n sample in n characterization training set, m characterizes m feature corresponding to each sample.It is opposite with training set The training sample physical tags distribution matrix answered can be the matrix of n row c column, wherein include in n characterization training set N sample, c characterize the total number of label corresponding to each sample.
In embodiments of the present invention, corresponding with training sample eigenmatrix and training sample physical tags distribution matrix , latent factor matrix specifically refers to example to feature-label latent factor matrix of distribution, and latent factor matrix can be one The matrix of a c row m column.
Specifically, training sample eigenmatrix X, training sample physical tags distribution matrix D and latent factor matrix θ can be with The matrix being as follows:
Optionally, on the basis of label distribution forecasting method shown in Fig. 1, step 103 is constructed according to latent factor matrix For describe label correlation apart from mapping function, the concrete form apart from mapping function can be as follows:
g(θij)=sgn (triangle (θij))·dis(θij)
Above-mentioned in mapping function, consist of two parts apart from mapping function, first part is sign function sgn (triangle(θij)), sign function is for characterizing in latent factor matrix because of subvector θiWith because of subvector θjBetween phase Guan Xing, second part are distance function dis (θij), distance function is for describing in latent factor matrix because between subvector Degree of correlation.
In embodiments of the present invention, the concrete form of sign function of the composition apart from mapping function can be as follows:
Wherein,θikIt characterizes in latent factor matrix I-th because of k-th of element in subvector, θjkCharacterize latent factor matrix in j-th because of k-th of element in subvector, m table The number of the feature of each sample in sign training set.
In embodiments of the present invention, the concrete form of distance function of the composition apart from mapping function can be as follows:
Wherein, θikCharacterize latent factor matrix in i-th because of k-th of element in subvector, θjkCharacterize latent factor square In battle array j-th because of k-th of element in subvector, the number of the feature of each sample in m characterization training set.
Apart from mapping function g (θij) pass through the sign function sgn (triangle (θ of characterization correlationij)) multiplied by table Levy the distance function dis (θ of degree of correlationij), it obtains being positively correlated distance, negatively correlated distance and uncorrelated distance, visually Describe the relevance between label.For example, g (θab) > 0 and value it is bigger, show occur label b's when there is label a Possibility is bigger;g(θab) < 0 and value it is smaller, a possibility that showing when there is label a, label b occur, is smaller;g(θa, θbWhen)=0, then show unrelated with label b whether the appearance of label a.
Apart from mapping function by the sign function of correlation between characterization label and characterization label build degree of correlation apart from letter Number, which is multiplied, to be obtained, and is being used three angular distances to measure the correlation between label in sign function, is being made full use of characteristic, make Obtaining the objective function according to constructed by apart from mapping function includes the item for reacting relevance between label, passes through and solves new optimization Objective function obtains optimal latent factor matrix, guarantees the accuracy of obtained latent factor matrix, and then using being obtained It can guarantee prediction result accuracy with higher when obtaining the distribution of latent factor Matrix prediction label.
Optionally, on the basis of label distribution forecasting method shown in Fig. 1, step 102 according to training set and it is potential because Submatrix constructs basic target function, and the concrete form of basic target function can be as follows:
In above-mentioned basic target function, T0(θ) characterizes basic target function, pijIt characterizes in prediction label distribution j-th Label describes the degree of i-th of example, specificallyθ characterizes example to the latent factor of distribution Matrix, θjrCharacterize latent factor matrix in j-th because of r-th of element in subvector, xirI-th of sample in characterization training set This corresponding numerical value of r-th of feature, dijJ-th of label description in the included physical tags distributed intelligence of characterization training set The degree of i-th of sample, n characterization train the total number of sample in set, and c characterizes the total number for training set to get the bid label.
In embodiments of the present invention, piCharacterize example xiCorresponding prediction label distribution, enables piTo meet parameter vector θ's Parameter model p (yj|xiθ).Use Kullback-Leibler (KL) divergence It measures Gap between physical tags distribution and prediction label distribution, obtains basic target function T0(θ).In basic target function T0(θ) In, enable pijMeet maximum entropy model
The gap between physical tags distribution and prediction label distribution is measured using Kullback-Leibler divergence, into And basic target function is obtained, guaranteeing basic target function, objective function obtained can combining after mapping function More accurately measure physical tags distribution prediction label distribution between gap, and then using objective function can be with iteration The more accurate latent factor matrix of optimization, so that utility latent factor matrix carries out the accurate of label forecast of distribution Property.
Optionally, on the basis of label distribution forecasting method shown in Fig. 1, step 104 according to basic target function and away from From mapping function construct objective function when, specifically can according to basic target function, apart from mapping function and according to it is potential because Submatrix and the regular terms that obtains construct objective function.As shown in Fig. 2, can specifically construct target letter in the following way Number:
Step 201: regular terms is determined according to latent factor matrix;
Step 202: according to basic target function, apart from mapping function and regular terms, building objective function.
In embodiments of the present invention, when step 201 determines regular terms according to latent factor matrix, regular terms specifically can be with potential Square expression of the F norm of factor matrix, square of the F norm of latent factor matrix I.e. regular terms isWherein, θijCharacterize latent factor matrix in i-th because of the jth in subvector A element.
In embodiments of the present invention, step 202 constructs target according to basic target function, apart from mapping function and regular terms When function, respectively matrix mapping function and regular terms sum to three after configuring corresponding coefficient, it is available such as Lower objective function:
Wherein, in above-mentioned objective function, T (θ) characterizes objective function, λ1And λ2It is real in practical business for preset coefficient It now can be according to the relevance flexible setting coefficient lambda between label1And coefficient lambda2Value, such as can be by coefficient lambda1Value set It is set to 0.01, while by coefficient lambda2Value be set as 0.1.
By the way that the final form of objective function as follows can be obtained to above-mentioned objective function progress abbreviation:
Objective function consists of three parts, and first part is basic objective function, and second part is to be configured with corresponding coefficient Apart from mapping function, Part III is the regular terms for being configured with corresponding coefficient, by by above three partial summation obtain mesh Scalar functions so that obtained objective function includes the operation item for reflecting relevance between different labels, and then are utilizing target letter It, can be using the relevance between label as an exploration factor to latent factor when several pairs of latent factor matrixes are iterated optimization Matrix is iterated optimization, guarantees final latent factor matrix accuracy with higher obtained, and then utilize acquisition Latent factor matrix carries out that more accurate prediction result can be obtained when label forecast of distribution.
Optionally, on the basis of label distribution forecasting method shown in Fig. 1, when step 108 judges based on current first After the F norm for the First-order Gradient matrix that factor matrix is determined is greater than or equal to threshold limit value, step 109 will be based on current Factor I matrix an iteration optimization is carried out to latent factor matrix, obtain new factor I matrix, and then for new Factor I matrix execute step 107 and step 108, this process is repeated, until obtaining the F model of corresponding First-order Gradient matrix Number is less than the factor I matrix of threshold limit value.As shown in figure 3, the detailed process for being iterated optimization to latent factor matrix can To be achieved by the steps of:
Step 301: current factor I matrix being substituted into the first formula, calculates direction of search parameter.Wherein, first is public Formula includes:
Wherein, θ(l)Characterize current factor I matrix, l is nonnegative integer, l+1 characterization to latent factor matrix into The number of capable iteration optimization;d(l)Characterize direction of search parameter;Characterize current First-order Gradient matrix;H(θ(l)) Characterize the Hessian matrix based on current factor I matrix.
Step 302: current factor I matrix and direction of search parameter being substituted into the second formula, calculate factor Ⅱ square Battle array.Wherein, the second formula includes:
θ(l+1)(l)+d(l)
Wherein, θ(l+1)Factor Ⅱ matrix is characterized, default search step-length is 1.
Step 303: using factor Ⅱ matrix as new factor I matrix.
In embodiments of the present invention, initialization is carried out to latent factor matrix θ and obtains θ(0), first by θ(0)As first because Submatrix substitutes into single order local derviation vector and obtains First-order Gradient matrix, if the F norm of First-order Gradient matrix obtained is less than in advance The threshold limit value first set, then directly by θ(0)Come as factor I matrix to the label distribution vector for calculating example to be predicted, If the F norm of First-order Gradient matrix obtained is greater than or equal to preset threshold limit value, formally start to potential Factor matrix is iterated optimization.
When first time being iterated optimization to latent factor matrix θ (i.e. when l=0), calculates be based on θ first(0)Hai Sen Matrix H (θ(0)), later according to calculated H (θ(0)) and acquiredIt is calculated and is corresponded to by the first formula In the direction of search parameter d of first time iteration optimization(θ), later by θ(0)And d(0)It substitutes into the second formula and calculates and correspond to currently The factor I matrix θ of secondary iteration optimization(1)
In embodiments of the present invention, optimization needs are iterated based on the last time to potential to latent factor matrix when previous Factor matrix is iterated the result of optimization and carries out.Specifically, it is illustrated by taking l > 0 as an example below:
When being iterated optimization to latent factor matrix θ the l+1 times, obtain first the l times to latent factor matrix θ into The First-order Gradient matrix of row iteration optimization and acquisitionIt obtains later and is based on the l times iteration optimization obtained first Factor matrix θ(l)Hessian matrix H (θ(l)), First-order Gradient matrix will be obtained laterWith Hessian matrix H (θ(l)) generation Enter the first formula, calculates the direction of search parameter d corresponding to the l+1 times iteration optimization(l), the l times iteration will be corresponded to later The factor I matrix θ of optimization(l)With the direction of search parameter d for corresponding to the l+1 times iteration optimization(l)The second formula is substituted into, is counted Calculate the factor I matrix θ for corresponding to the l+1 times iteration optimization(l+1)
When being iterated optimization to latent factor matrix each time, obtain first last to the progress of latent factor matrix The First-order Gradient matrix determined when iteration optimization is obtained later based on the obtained factor I matrix of last iteration optimization Hessian matrix, calculated correspond to when previous iteration optimization according to First-order Gradient matrix obtained and Hessian matrix later Direction of search parameter, later according to calculated direction of search parameter and last iteration optimization factor I matrix obtained To calculate the factor I matrix corresponded to when previous iteration optimization.It can be seen that being carried out each time to latent factor matrix excellent When change, last iteration optimization factor I matrix obtained is optimized by generating direction of search parameter, so that Latent factor matrix constantly optimizes to the direction that the conversion being distributed from feature to label can be better achieved, and guarantee may finally Latent factor matrix iteration is optimized to the requirement for meeting the pre- forecast of distribution accuracy of label.
In embodiments of the present invention, threshold limit value can flexibly be set according to the accuracy requirement to label forecast of distribution It sets, for example 1 × 10 can be set by threshold limit value-6
Optionally, on the basis of label distribution forecasting method shown in Fig. 1, First-order Gradient matrix is determined in step 108 F norm be less than threshold limit value after, illustrate that current factor I matrix can satisfy based on defined in threshold limit value Transfer admittance can be combined by test to factor I to further verify the transfer admittance of factor I matrix Matrix is verified.As shown in figure 4, the method verified to factor I matrix may include steps of:
Step 401: obtaining test set, wherein test set includes the characteristic information and reality of at least one sample Label distributed intelligence;
Step 402: corresponding sample characteristics matrix and factor I matrix being gathered according to test, obtains and corresponds to test set The prediction label of conjunction is distributed;
Step 403: being distributed and tested using prediction label and gather corresponding physical tags distribution, calculate Euclidean distance, rope Ademilson distance, chi-Square measure, similarity, at least one evaluation index in fidelity;
Step 404: the accuracy of factor I matrix is verified according at least one calculated evaluation index.
The sample characteristics for corresponding to test set are generated according to the characteristic information that at least one included sample is gathered in test Matrix, and the reality for corresponding to test set is generated according to the physical tags distributed intelligence that at least one included sample is gathered in test Label distribution in border calculates according to the sample characteristics matrix and factor I matrix that correspond to test set correspond to test later The prediction label of set is distributed, and calculates Europe according to the prediction label distribution and physical tags distribution that correspond to test set later Family name's distance, the gloomy distance of Sol, chi-Square measure, similarity, at least one evaluation index in fidelity, and then according to being calculated At least one evaluation index guarantee from feature to the accuracy of label forecast of distribution using factor I matrix to verify More accurately factor I matrix can be verified.
In embodiments of the present invention, the prediction label distribution for corresponding to test set and physical tags distribution can be substituted into Following formula calculates Euclidean distance:
Wherein, dis is meant that distance, and j is the subscript of label, and c is label total number.pjIt indicates in true tag distribution The corresponding numerical value of j-th of label, qjIndicate the corresponding numerical value of j-th of label in prediction label distribution.Be calculated it is European away from From smaller, illustrate that two distribution distances are closer, gap is smaller.
In embodiments of the present invention, the prediction label distribution for corresponding to test set and physical tags distribution can be substituted into Following formula calculates the gloomy distance of Sol:
Wherein, dis is meant that distance, and j is the subscript of label, and c is the total number of label.pjIndicate true tag distribution In the corresponding numerical value of j-th of label, qjIndicate the corresponding numerical value of j-th of label in prediction label distribution.The Sol being calculated It is gloomy apart from smaller, illustrate that two distribution distances are closer, gap is smaller.
In embodiments of the present invention, the prediction label distribution for corresponding to test set and physical tags distribution can be substituted into Following formula calculates chi-Square measure:
Wherein, dis is meant that distance, and j is the subscript of label, and c is the total number of label.pjIndicate true tag distribution In the corresponding numerical value of j-th of label, qjIndicate the corresponding numerical value of j-th of label in prediction label distribution.The card side being calculated Apart from smaller, illustrate that two distribution distances are closer, gap is smaller.
In embodiments of the present invention, the prediction label distribution for corresponding to test set and physical tags distribution can be substituted into Following formula calculates similarity:
Wherein, sim is meant that similarity, and j is the subscript of label, and c is the total number of label.pjIndicate true tag point The corresponding numerical value of j-th of label, q in clothjIndicate the corresponding numerical value of j-th of label in prediction label distribution.The phase being calculated It is bigger like spending, illustrate that two distributions are more similar.
In embodiments of the present invention, the prediction label distribution for corresponding to test set and physical tags distribution can be substituted into Following formula calculates fidelity:
Wherein, sim is meant that similarity, and j is the subscript of label, and c is the total number of label.pjIndicate true tag point The corresponding numerical value of j-th of label, q in clothjIndicate the corresponding numerical value of j-th of label in prediction label distribution.The guarantor being calculated True degree is bigger, illustrates prediction distribution and is really distributed closer.
The result verified to factor I matrix is provided below with reference to specific data set.If the following table 1 is 4 data sets Specifying information, 4 data sets are respectively Dtt, Cold, Heat and Elu.Wherein, when being pre-processed, with the ratio of 8:2 Above-mentioned 4 data sets are split as training dataset and test data set, training dataset is the training set in step 101 It closes, if the following table 2 to table 5 is the result tested for test data set factor I matrix.
Table 1
Dtt Cold Heat Elu
Example number 2465 2465 2465 2465
Characteristic Number 24 24 24 24
Label number 4 4 6 14
As the following table 2 be by data set Dtt to factor I matrix verified as a result, as the following table 3 be pass through data Collection Cold to factor I matrix verified as a result, as the following table 4 be by data set Heat to factor I matrix carry out Verification as a result, if the following table 5 is the result verified by data set Elu to factor I matrix.
Table 2
Table 3
Table 4
Table 5
In above-mentioned table 2 into table 5, Euclidean characterizes Euclidean distance,Characterize the gloomy distance of Sol, Squard χ2Chi-Square measure is characterized, Intersection characterizes similarity, and Fidelity characterizes fidelity.The T-LDL characterization present invention is implemented Label distribution forecasting method provided by example, LDLLC, PT-Bayes, PT-SVM, AA-kNN, AA-BP, IIS-LLD, BFGS- LLD, EDL characterize 8 kinds of different existing label forecast of distribution learning algorithms.
According to the data of above-mentioned table 2 to table 5 it is found that relative to other Tag Estimation methods, institute through the embodiment of the present invention The prediction label distribution that label distribution forecasting method obtains is provided to be more nearly with true tag distribution.
Below with reference to above-mentioned each embodiment, label location mode provided in an embodiment of the present invention is made further specifically It is bright, as shown in figure 5, this method may include steps of:
Step 501: according to training set symphysis at training sample eigenmatrix and training sample physical tags distribution matrix.
In embodiments of the present invention, acquisition includes the training set of at least one sample, according to each in training set The characteristic information of sample and physical tags distributed intelligence obtain training sample eigenmatrix X and training sample physical tags moment of distribution Battle array D.The concrete form of training sample eigenmatrix X and training sample physical tags distribution matrix D are in the above-described embodiments It provides, details are not described herein.
Step 502: initialization latent factor matrix.
In embodiments of the present invention, according to the line number of training sample eigenmatrix and training sample physical tags distribution matrix And columns, initialize corresponding latent factor matrix θ, the concrete form of latent factor matrix θ is in the above-described embodiments It provides, details are not described herein.
Step 503: according to training sample eigenmatrix, training sample physical tags distribution matrix and latent factor matrix structure Build basic target function.
In embodiments of the present invention, according to training sample eigenmatrix X, training sample physical tags distribution matrix D and latent Following basic target function is constructed in factor matrix θ:
Wherein, T0(θ) characterizes basic target function;θjrCharacterize latent factor matrix In j-th because of r-th of element in subvector, xirThe corresponding numerical value of r-th of feature of i-th of sample in characterization training set; dijJ-th of label describes the degree of i-th of sample in the included physical tags distributed intelligence of characterization training set;N characterization instruction Practice the total number of sample in set;The total number of c characterization training set acceptance of the bid label;The spy of each sample in m characterization training set The number of sign.
Step 504: being constructed according to latent factor matrix apart from mapping function.
In embodiments of the present invention, it is constructed according to latent factor matrix θ as follows apart from mapping function:
g(θij)=sgn (triangle (θij))·dis(θij), wherein
Wherein, sgn (triangle (θij)) characterize in latent factor matrix because of subvector θiWith because of subvector θjBetween Correlation;θikCharacterize latent factor matrix in i-th because of k-th of element in subvector;θjkIt characterizes in latent factor matrix J-th because of k-th of element in subvector;The number of the feature of each sample in m characterization training set.
Step 505: constructing objective function according to basic target function and apart from mapping function.
In embodiments of the present invention, according to constructed basic target function T out0(θ) and the distance constructed map letter Number g (θij) the following objective function of building:
Wherein, T (θ) characterizes objective function;θijCharacterize latent factor matrix in i-th because of j-th of element in subvector; λ1And λ2For preset coefficient;Characterize regular terms.
Step 506: for objective function to latent factor Matrix Calculating single order local derviation, obtaining single order local derviation vector.
In embodiments of the present invention, after obtaining objective function, ask single order inclined latent factor matrix θ for objective function It leads, obtains single order local derviation vector.
Step 507: the latent factor matrix after initialization is determined as factor I matrix.
In embodiments of the present invention, the latent factor matrix θ after initialization is θ(0), by θ(0)It is determined as factor I square Battle array.
Step 508: factor I matrix being substituted into single order local derviation vector, obtains First-order Gradient matrix.
In embodiments of the present invention, if also not carrying out iteration optimization to latent factor matrix θ, will as first because The θ of submatrix(0)Single order local derviation vector is substituted into, First-order Gradient matrix is obtainedIf to latent factor matrix θ Iteration optimization was carried out, then the newest factor I matrix obtained iteration optimization substitutes into single order local derviation vector, obtains a ladder Spend matrix
Step 509: judge whether the F norm of First-order Gradient matrix is less than threshold limit value, if so, step 513 is executed, it is no Then follow the steps 510.
In embodiments of the present invention, after obtaining First-order Gradient matrix for current factor I matrix, single order is calculated The F norm of gradient matrix, and judge whether the calculated F norm of institute is less than preset threshold limit value, if calculated F Norm is less than threshold limit value, illustrates that the iteration optimization to latent factor matrix has reached target, can use current first Factor matrix carrys out prediction label distribution, correspondingly executes step 511, if calculated F norm is greater than or equal to threshold limit value, Illustrate the iteration optimization miss the mark to latent factor matrix, correspondingly execute step 510 continue to latent factor matrix into Row iteration optimization.
Step 510: being determined according to current factor I matrix and searched for being iterated optimization to latent factor matrix Rope directioin parameter.
In embodiments of the present invention, current factor I matrix and current First-order Gradient matrix are substituted into following the One formula calculates the direction of search parameter for being iterated optimization to latent factor matrix.Wherein, the first formula includes:
Wherein, θ(l)Characterize current factor I matrix, l is nonnegative integer, l+1 characterization to latent factor matrix into The number of capable iteration optimization;d(l)Characterize direction of search parameter;Characterize current First-order Gradient matrix;H(θ(l)) Characterize the Hessian matrix based on current factor I matrix.
Step 511: an iteration optimization being carried out to latent factor matrix according to direction of search parameter, obtains factor Ⅱ square Battle array.
In embodiments of the present invention, after determining direction of search parameter according to current factor I matrix, according to true The direction of search parameter made and be defaulted as 1 step-size in search, it is public by following second based on current factor I matrix Formula carries out an iteration optimization to latent factor matrix, obtains the factor Ⅱ matrix that iteration optimization goes out.Wherein, the second formula packet It includes:
θ(l+1)(l)+d(l)
Wherein, θ(l+1)Characterize factor Ⅱ matrix.
Step 512: factor Ⅱ matrix being determined as to new factor I matrix, and executes step 508.
In embodiments of the present invention, it after being iterated optimization to latent factor matrix and obtaining factor Ⅱ matrix, will obtain The factor Ⅱ matrix obtained is determined as new factor I matrix, and executes step 508 for new factor I matrix, i.e., will New factor I matrix substitutes into single order local derviation vector and obtains First-order Gradient matrix.That is, obtaining factor Ⅱ matrix θ(l+1)Afterwards, Execute θ(l)(l+1), step 508 is executed using factor Ⅱ matrix as factor I matrix.
Step 513: carrying out label forecast of distribution using current factor I matrix.
In embodiments of the present invention, it is transported using the eigenmatrix of current factor I matrix and example to be predicted It calculates, obtains the label distribution vector of example to be predicted.
As shown in Figure 6, Figure 7, the embodiment of the invention provides a kind of label forecast of distribution devices.Installation practice can lead to Software realization is crossed, can also be realized by way of hardware or software and hardware combining.For hardware view, as shown in fig. 6, being A kind of hardware structure diagram of equipment where label forecast of distribution device provided in an embodiment of the present invention, in addition to processing shown in fig. 6 Except device, memory, network interface and nonvolatile memory, the equipment in embodiment where device usually can also include Other hardware, such as it is responsible for the forwarding chip of processing message.Taking software implementation as an example, as shown in fig. 7, anticipating as a logic Device in justice is to be read computer program instructions corresponding in nonvolatile memory by the CPU of equipment where it Operation is formed in memory.Label forecast of distribution device provided in this embodiment, comprising: pretreatment unit 701, function building are single Member 702, assignment unit 703, arithmetic element 704, judging unit 705, iterative optimization unit 706 and predicting unit 707;
Pretreatment unit 701 for obtaining trained set, and initializes latent factor matrix, wherein training, which is gathered, includes There are characteristic information and the physical tags distributed intelligence of at least one sample, latent factor matrix is used to divide from characteristic information to label The conversion of cloth;
Function construction unit 702, training set and latent factor matrix structure for being got according to pretreatment unit 701 The basic target function for measuring gap between physical tags distribution and prediction label distribution is built, according to latent factor matrix structure Build for describe label correlation apart from mapping function, and according to basic target function and apart from mapping function construct target letter Number, and single order local derviation vector is obtained to latent factor Matrix Calculating single order local derviation for objective function;
Assignment unit 703 is determined as factor I square for the latent factor matrix after initializing pretreatment unit 701 Battle array;
Arithmetic element 704, the single order local derviation vector for obtaining factor I matrix substitution function construction unit 702;
Judging unit 705, for judging whether the F norm of single order local derviation vector of the acquisition of arithmetic element 704 is less than in advance The threshold limit value of setting, if so, triggering predicting unit 707 is distributed according to the label that factor I matrix obtains example to be predicted Otherwise vector triggers iterative optimization unit 706 and carries out an iteration optimization to latent factor matrix, will be potential after iteration optimization Factor matrix is determined as factor I matrix;
Iterative optimization unit 706, after going out new factor I matrix in iteration optimization, triggering arithmetic element 704 is held It is about to new factor I matrix and substitutes into single order local derviation vector, obtains new First-order Gradient matrix.
Optionally, on the basis of label forecast of distribution device shown in Fig. 7,
Function construction unit 702, when constructing objective function, for determining regular terms, and root according to latent factor matrix According to basic target function, apart from mapping function and regular terms, construct following objective function;
Wherein, T (θ) characterizes objective function;θijCharacterize latent factor matrix in i-th because of j-th of element in subvector; λ1And λ2For preset coefficient;Characterize regular terms.
Optionally, on the basis of label forecast of distribution device shown in Fig. 7,
The iterative optimization unit 706, for executing following steps:
S91: current factor I matrix is substituted into following first formula, calculates direction of search parameter;
First formula includes:
Wherein, θ(l)Characterize current factor I matrix, l is nonnegative integer, l+1 characterization to latent factor matrix into The number of capable iteration optimization;d(l)Characterize direction of search parameter;Characterize current First-order Gradient matrix;H(θ(l)) Characterize the Hessian matrix based on current factor I matrix;
S92: current factor I matrix and direction of search parameter are substituted into following second formula, calculate factor Ⅱ square Battle array;
Second formula includes:
θ(l+1)(l)+d(l)
Wherein, θ(l+1)Factor Ⅱ matrix is characterized, default search step-length is 1;
S93: using factor Ⅱ matrix as new factor I matrix, and arithmetic element is triggered by new factor I square Battle array substitutes into single order local derviation vector, obtains new First-order Gradient matrix.
Optionally, on the basis of label forecast of distribution device shown in Fig. 7, as shown in figure 8, the label forecast of distribution device Further comprise: verification unit 708;
Verification unit 708, after determining that the F norm of First-order Gradient matrix is less than threshold limit value in judging unit 705, root According to the acquired corresponding sample characteristics matrix of test set and factor I matrix, the pre- mark for corresponding to test set is obtained Label distribution is distributed and is tested using prediction label and gathered corresponding physical tags and be distributed, calculate Euclidean distance, the gloomy distance of Sol, Chi-Square measure, similarity, at least one evaluation index in fidelity, according at least one calculated evaluation index verification the The accuracy of Graph One factor matrix.
It should be noted that the contents such as information exchange, implementation procedure between each unit in above-mentioned apparatus, due to this Inventive method embodiment is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, no longer superfluous herein It states.
In conclusion label distribution forecasting method and device that each embodiment of the present invention provides, at least have has as follows Beneficial effect:
1, in embodiments of the present invention, due to objective function be according to basic target function and apart from mapping function building and At, and it is used to describe the correlation between label apart from mapping function, so that objective function considers the pass between different labels Connection property, so that the latent factor matrix accuracy with higher gone out using objective function iteration optimization, and then it is potential utilizing The accuracy that label forecast of distribution is carried out to example can be improved in factor matrix.
2, in embodiments of the present invention, apart from mapping function by the sign function of correlation between characterization label and characterization label The distance function multiplication for building degree of correlation obtains, and is using three angular distances to measure the correlation between label in sign function, Characteristic is made full use of, so that the objective function according to constructed by apart from mapping function includes relevance between reaction label , optimal latent factor matrix is obtained by solving new optimization object function, guarantees the standard of obtained latent factor matrix True property, and then can guarantee that prediction result is with higher accurate when being distributed using obtained latent factor Matrix prediction label Property.
3, physical tags distribution and pre- mark in embodiments of the present invention, are measured using Kullback-Leibler divergence Gap between label distribution, and then obtains basic target function, guarantee basic target function combining apart from mapping function and Objective function obtained can be measured more accurately between physical tags distribution and prediction label distribution after regular terms Gap, and then more accurate latent factor matrix can gone out using objective function with iteration optimization, so that utility is potential The accuracy of factor matrix progress label forecast of distribution.
4, in embodiments of the present invention, objective function consists of three parts, and first part is basic objective function, and second Be divided into be configured with corresponding coefficient apart from mapping function, Part III is the regular terms for being configured with corresponding coefficient, by will be above-mentioned Three partial summations obtain objective function, so that obtained objective function includes the operation for reflecting relevance between different labels , and then when being iterated optimization to latent factor matrix using objective function, it can be using the relevance between label as one A exploration factor is iterated optimization to latent factor matrix, guarantees final latent factor matrix standard with higher obtained True property, so using the latent factor matrix of acquisition carry out label forecast of distribution when can obtain more accurate prediction result.
5, when in embodiments of the present invention, being optimized each time to latent factor matrix, by generating direction of search ginseng Number is to optimize last iteration optimization factor I matrix obtained, so that latent factor matrix is constantly to can be more Realize that latent factor matrix iteration may finally be optimized to by the direction optimization for the conversion being distributed from feature to label, guarantee well Meet the requirement of the pre- forecast of distribution accuracy of label.
6, in embodiments of the present invention, corresponded to according to the characteristic information generation that at least one included sample is gathered in test The sample characteristics matrix of set is tested, and is generated according to the physical tags distributed intelligence that at least one included sample is gathered in test Corresponding to the physical tags distribution of test set, later according to the sample characteristics matrix and factor I square for corresponding to test set Battle array calculates the prediction label distribution for corresponding to test set, later according to the prediction label distribution that corresponds to test set and real Label distribution in border refers to calculate the evaluation of at least one of the gloomy distance of Euclidean distance, Sol, chi-Square measure, similarity, fidelity Mark, and then divide from feature to label using factor I matrix to verify according at least one calculated evaluation index of institute The accuracy of cloth prediction, guarantee can more accurately verify factor I matrix.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence " including one ", is not arranged Except there is also other identical factors in the process, method, article or apparatus that includes the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (10)

1. a kind of label distribution forecasting method characterized by comprising
S1: training set is obtained, and initializes latent factor matrix, wherein the training set includes at least one sample Characteristic information and physical tags distributed intelligence, the latent factor matrix for from characteristic information to label be distributed conversion;
S2: basic target function is constructed according to the training set and the latent factor matrix, wherein the basic target letter Number is for measuring the gap between physical tags distribution and prediction label distribution;
S3: it is constructed according to the latent factor matrix apart from mapping function, wherein described to be used to describe label apart from mapping function Correlation;
S4: according to the basic target function and it is described apart from mapping function construct objective function;
S5: for the objective function to the latent factor Matrix Calculating single order local derviation, single order local derviation vector is obtained;
S6: the latent factor matrix after initialization is determined as factor I matrix;
S7: the factor I matrix is substituted into the single order local derviation vector, obtains First-order Gradient matrix;
S8: judging whether the F norm of the First-order Gradient matrix is less than preset threshold limit value, if so, S10 is executed, Otherwise S9 is executed;
S9: an iteration optimization is carried out to the latent factor matrix, the latent factor matrix after iteration optimization is determined For the factor I matrix, and execute S7;
S10: according to the factor I matrix, the label distribution vector of example to be predicted is obtained.
2. the method according to claim 1, wherein
It is described apart from mapping function include: g (θi, θj)=sgn (triangle (θi, θj))·dis(θi, θj), wherein
Wherein, the sgn (triangle (θi, θj)) characterize in the latent factor matrix because of subvector θiWith because of subvector θjIt Between correlation;The θikI-th is characterized in the latent factor matrix because of k-th of element in subvector;The θjkCharacterization In the latent factor matrix j-th because of k-th of element in subvector;Each sample in the m characterization training set Feature number.
3. according to the method described in claim 2, it is characterized in that,
The basic target function includes:
Wherein, the T0(θ) characterizes the basic target function;It is describedThe θjrCharacterization In the latent factor matrix j-th because of r-th of element in subvector, the xirCharacterize i-th of sample in the training set This corresponding numerical value of r-th of feature;The dijIt characterizes in the included physical tags distributed intelligence of the training set J-th of label describes the degree of i-th of sample;The n characterizes the total number of sample in the training set;The c characterizes institute State the total number of training set acceptance of the bid label.
4. according to the method described in claim 3, it is characterized in that, the S4 includes:
Regular terms is determined according to the latent factor matrix;
According to the basic target function, described apart from mapping function and the regular terms, following objective function is constructed;
Wherein, the T (θ) characterizes the objective function;The θijI-th is characterized in the latent factor matrix because in subvector J-th of element;The λ1With the λ2For preset coefficient;It is describedCharacterize the canonical ?.
5. the method according to claim 1, wherein the S9 includes:
S91: the current factor I matrix is substituted into following first formula, calculates direction of search parameter;
First formula includes:
Wherein, the θ(l)The current factor I matrix of characterization, the l are nonnegative integer, and l+1 characterization is to described latent In the number for the iteration optimization that factor matrix carries out;The d(l)Characterize described search directioin parameter;It is describedCharacterization is worked as The preceding First-order Gradient matrix;H (the θ(l)) Hessian matrix of the characterization based on the current factor I matrix;
S92: substituting into following second formula for the current factor I matrix and described search directioin parameter, calculate second because Submatrix;
Second formula includes:
θ(l+1)(l)+d(l)
Wherein, the θ(l+1)The factor Ⅱ matrix is characterized, default search step-length is 1;
S93: using the factor Ⅱ matrix as the new factor I matrix, and S7 is executed.
6. according to claim 1 to any method in 5, which is characterized in that before the S10, further comprise:
Obtain test set, wherein the test set includes characteristic information and the physical tags distribution of at least one sample Information;
Gather corresponding sample characteristics matrix and the factor I matrix according to the test, obtains and correspond to the test set The prediction label of conjunction is distributed;
Gather corresponding physical tags using prediction label distribution and the test to be distributed, it is gloomy to calculate Euclidean distance, Sol Distance, chi-Square measure, similarity, at least one evaluation index in fidelity;
The accuracy of the factor I matrix is verified according at least one calculated described evaluation index.
7. a kind of label forecast of distribution device characterized by comprising pretreatment unit, function construction unit, assignment unit, Arithmetic element, judging unit, iterative optimization unit and predicting unit;
The pretreatment unit for obtaining trained set, and initializes latent factor matrix, wherein the training set packet Include characteristic information and the physical tags distributed intelligence of at least one sample, the latent factor matrix be used for from characteristic information to The conversion of label distribution;
The function construction unit, the training set and the latent factor for being got according to the pretreatment unit Matrix building is for measuring the basic target function of gap between physical tags distribution and prediction label distribution, according to described potential Factor matrix building for describe label correlation apart from mapping function, and according to the basic target function and the distance Mapping function constructs objective function, and obtains one to the latent factor Matrix Calculating single order local derviation for the objective function Rank local derviation vector;
The assignment unit, for the latent factor matrix after pretreatment unit initialization to be determined as factor I Matrix;
The arithmetic element, for the factor I matrix to be substituted into the single order local derviation that the function construction unit obtains Vector;
The judging unit, for judging it is pre- whether the F norm of the single order local derviation vector of the arithmetic element acquisition is less than The threshold limit value first set obtains example to be predicted according to the factor I matrix if so, triggering the predicting unit Otherwise label distribution vector triggers the iterative optimization unit and carries out an iteration optimization to the latent factor matrix, will repeatedly The latent factor matrix after generation optimization is determined as the factor I matrix;
The iterative optimization unit triggers the arithmetic element after going out the new factor I matrix in iteration optimization It executes and the new factor I matrix is substituted into the single order local derviation vector, obtain the new First-order Gradient matrix.
8. device according to claim 7, which is characterized in that
The function construction unit, when constructing the objective function, for determining regular terms according to the latent factor matrix, And according to the basic target function, described apart from mapping function and the regular terms, following objective function is constructed;
Wherein, the T (θ) characterizes the objective function;The θijI-th is characterized in the latent factor matrix because in subvector J-th of element;The λ1With the λ2For preset coefficient;It is describedCharacterize the canonical ?.
9. device according to claim 7, which is characterized in that
The iterative optimization unit, for executing following steps:
S91: the current factor I matrix is substituted into following first formula, calculates direction of search parameter;
First formula includes:
Wherein, the θ(l)The current factor I matrix of characterization, the l are nonnegative integer, and l+1 characterization is to described latent In the number for the iteration optimization that factor matrix carries out;The d(l)Characterize described search directioin parameter;It is describedCharacterization The current First-order Gradient matrix;H (the θ(l)) Hessian matrix of the characterization based on the current factor I matrix;
S92: substituting into following second formula for the current factor I matrix and described search directioin parameter, calculate second because Submatrix;
Second formula includes:
θ(l+1)(l)+d(l)
Wherein, the θ(l+1)The factor Ⅱ matrix is characterized, default search step-length is 1;
S93: using the factor Ⅱ matrix as the new factor I matrix, and the arithmetic element is triggered by new institute It states factor I matrix and substitutes into the single order local derviation vector, obtain the new First-order Gradient matrix.
10. according to the device any in claim 7 to 9, which is characterized in that further comprise: verification unit;
The verification unit, for determining that the F norm of the First-order Gradient matrix is less than the Threshold extent in the judging unit After value, according to the acquired corresponding sample characteristics matrix of test set and the factor I matrix, obtain described in corresponding to The prediction label distribution of test set, gathers corresponding physical tags using prediction label distribution and the test and is distributed, Euclidean distance, the gloomy distance of Sol, chi-Square measure, similarity, at least one evaluation index in fidelity are calculated, according to calculating At least one described evaluation index verify the accuracy of the factor I matrix.
CN201910423070.0A 2019-05-21 2019-05-21 A kind of label distribution forecasting method and device Pending CN110135507A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910423070.0A CN110135507A (en) 2019-05-21 2019-05-21 A kind of label distribution forecasting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910423070.0A CN110135507A (en) 2019-05-21 2019-05-21 A kind of label distribution forecasting method and device

Publications (1)

Publication Number Publication Date
CN110135507A true CN110135507A (en) 2019-08-16

Family

ID=67571779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910423070.0A Pending CN110135507A (en) 2019-05-21 2019-05-21 A kind of label distribution forecasting method and device

Country Status (1)

Country Link
CN (1) CN110135507A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021218015A1 (en) * 2020-04-27 2021-11-04 平安科技(深圳)有限公司 Method and device for generating similar text
CN115270192A (en) * 2022-09-26 2022-11-01 广州优刻谷科技有限公司 Sample label privacy risk assessment method, system and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021218015A1 (en) * 2020-04-27 2021-11-04 平安科技(深圳)有限公司 Method and device for generating similar text
CN115270192A (en) * 2022-09-26 2022-11-01 广州优刻谷科技有限公司 Sample label privacy risk assessment method, system and storage medium
CN115270192B (en) * 2022-09-26 2022-12-30 广州优刻谷科技有限公司 Sample label privacy risk assessment method, system and storage medium

Similar Documents

Publication Publication Date Title
US11586880B2 (en) System and method for multi-horizon time series forecasting with dynamic temporal context learning
Shabri et al. Streamflow forecasting using least-squares support vector machines
CN115018021B (en) Machine room abnormity detection method and device based on graph structure and abnormity attention mechanism
CN112949828B (en) Graph convolution neural network traffic prediction method and system based on graph learning
US20210103858A1 (en) Method and system for model auto-selection using an ensemble of machine learning models
CN108021930B (en) Self-adaptive multi-view image classification method and system
CN109165540A (en) A kind of pedestrian&#39;s searching method and device based on priori candidate frame selection strategy
CN105354595A (en) Robust visual image classification method and system
CN106612495B (en) A kind of indoor orientation method and system based on propagation loss study
CN114169442B (en) Remote sensing image small sample scene classification method based on double prototype network
CN110135507A (en) A kind of label distribution forecasting method and device
CN110188825A (en) Image clustering method, system, equipment and medium based on discrete multiple view cluster
CN111488498A (en) Node-graph cross-layer graph matching method and system based on graph neural network
Li et al. An efficient probabilistic approach for graph similarity search
CN112131261A (en) Community query method and device based on community network and computer equipment
CN106250918A (en) A kind of mixed Gauss model matching process based on the soil-shifting distance improved
Martínez et al. Probing the geometry of data with diffusion fréchet functions
CN112396092B (en) Crowdsourcing developer recommendation method and device
CN112163106A (en) Second-order similarity perception image Hash code extraction model establishing method and application thereof
WO2020191722A1 (en) Method and system for determining causal relationship, and computer program product
CN109872006A (en) A kind of scoring distribution forecasting method and device
CN115953907A (en) Traffic speed prediction method based on time-space gating graph convolution network and application thereof
Zhang et al. Multi-view metric learning for multi-label image classification
CN113869990A (en) Shop lease pricing method based on space-time representation learning model
Zhang et al. Semisupervised Change Detection Based on Bihierarchical Feature Aggregation and Extraction Network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190816