Sound classification method, device and medium based on constrained semi-nonnegative matrix factorization

文档序号:1026964 发布日期:2020-10-27 浏览:21次 中文

阅读说明:本技术 基于约束半非负矩阵分解的声音分类方法、装置及介质 (Sound classification method, device and medium based on constrained semi-nonnegative matrix factorization ) 是由 韩威 周松斌 李昌 刘忆森 刘伟鑫 于 2018-12-07 设计创作,主要内容包括:一种基于约束半非负矩阵分解的声音分类方法、装置及介质,该声音分类包括:将训练声音数据样本和测试声音数据样本表示为半非负矩阵(S1);根据半非负矩阵构建类别约束矩阵,并根据半非负矩阵构建稀疏约束矩阵(S2);在类别约束和稀疏约束下,对半非负矩阵进行约束半非负矩阵分解,得到对应的系数矩阵;将系数矩阵中对应于训练声音数据样本的低维表示以及训练声音数据样本的类别信息作为训练数据,对分类模型进行训练得到分类器(S3);将系数矩阵中对应于测试声音数据样本的低维表示输入分类器,输出测试声音数据样本的分类结果(S4)。该方法有效利用了训练声音数据样本的类别信息并使得降维后的低维表示具有稀疏性,从而得到更具区分性的样本低维表示,提高了声音数据分类方法的正确率。(A sound classification method, device and medium based on constrained semi-nonnegative matrix factorization, the sound classification includes: representing the training sound data samples and the test sound data samples as a semi-non-negative matrix (S1); constructing a category constraint matrix according to the semi-nonnegative matrix, and constructing a sparse constraint matrix according to the semi-nonnegative matrix (S2); under category constraint and sparse constraint, carrying out constraint semi-nonnegative matrix decomposition on the semi-nonnegative matrix to obtain a corresponding coefficient matrix; training a classification model to obtain a classifier by using the low-dimensional representation corresponding to the training voice data samples in the coefficient matrix and the class information of the training voice data samples as training data (S3); the low-dimensional representation corresponding to the test sound data sample in the coefficient matrix is input to the classifier, and the classification result of the test sound data sample is output (S4). The method effectively utilizes the class information of the training sound data samples and enables the low-dimensional representation after dimensionality reduction to have sparsity, so that more distinctive sample low-dimensional representation is obtained, and the accuracy of the sound data classification method is improved.)

A sound classification method based on constrained semi-nonnegative matrix factorization is characterized by comprising the following steps:

s1, representing the training sound data samples and the testing sound data samples as a semi-nonnegative matrix X;

s2, constructing a category constraint matrix U according to the semi-nonnegative matrix X, and constructing a sparse constraint matrix S according to the semi-nonnegative matrix X;

s3, under the condition of category constraint and sparse constraint, carrying out constraint semi-nonnegative matrix decomposition on the semi-nonnegative matrix X to obtain a corresponding coefficient matrix H;

s4, taking the low-dimensional representation corresponding to the training voice data samples in the coefficient matrix H and the class information of the training voice data samples as training data, and training the classification model to obtain a classifier R;

s5, the low-dimensional representation corresponding to the test sound data sample in the coefficient matrix H is input to the classifier R, and the classification result of the test sound data sample is output.

The method for sound classification based on constrained semi-non-negative matrix factorization of claim 1, wherein the step of representing the training sound data samples and the testing sound data samples as a semi-non-negative matrix X at S1 is performed as follows:

s11, carrying out amplitude normalization on the training sound data samples and the testing sound data samples, and enabling the amplitude of each sample to be [ -1, 1 ];

s12, representing each training voice data sample as an M-dimensional columnVector, noted as xi(i ═ 1, 2, …, N1), where N1 is the number of training speech data samples; and each test sound data sample is expressed as a column vector with M dimensions, which is marked as xj(j ═ 1, 2, …, N2), where N2 is the number of test sound data samples;

s13, mixing xiAnd xjArranged in a semi-non-negative matrix X (M rows and N columns), X being denoted Xk(k-1, 2, …, N; N-N1 + N2), where the first N1 columns are training samples of known class (x)1…xN1) The remaining N2 columns (N2 ═ N-N1) are test samples of unknown class (x)N1+1…xN)。

The method for sound classification based on constrained semi-nonnegative matrix factorization of claim 1, wherein the step of constructing the class constraint matrix U according to the semi-nonnegative matrix X at S2 is performed as follows:

s201, sound data samples comprise class B, each sound data sample belongs to one class, a matrix C of N1 rows and B columns is constructed according to training samples in a semi-nonnegative matrix X, and the matrix C is marked as Ci,b(i-1, 2, …, N1; B-1, 2, …, B); when training sample xiWhen it is of type b, ci,b1, rest ci,b=0;

S202, constructing a category constraint matrix U with N rows (B + N2) and columns as follows

Wherein O represents a zero matrix, IN2Is an identity matrix of N2 rows and N2 columns.

The method for sound classification based on constrained semi-nonnegative matrix factorization of claim 1, wherein S2 is configured to construct a sparse constraint matrix S from a semi-nonnegative matrix X, specifically:

after each sound data sample is subjected to dimensionality reduction through a constrained semi-nonnegative matrix factorization algorithm, the dimensionality of each sound data sample is changed from M dimensionality to M' dimensionality, and a sparse constraint matrix S is constructed as follows

Figure PCTCN2018119894-APPB-100002

In the formula (1), theta is a sparsity parameter and ranges from 0 to 1; i isM′Is an identity matrix of M 'rows and M' columns; l is a column vector with elements all 1 and dimension M'; lTIs the transpose of l.

The sound classification method based on constrained semi-nonnegative matrix factorization of claim 1, wherein the constrained semi-nonnegative matrix X is subjected to constrained semi-nonnegative matrix factorization under class constraint and sparsity constraint to obtain a corresponding coefficient matrix H in S3, and the method comprises the following steps:

s31, constructing an objective function of the constrained semi-nonnegative matrix factorization

Figure PCTCN2018119894-APPB-100003

In the formula (2), the first and second groups,

Figure PCTCN2018119894-APPB-100004

s32, initializing the values of all elements of the matrix Z to random positive numbers between (0, 1);

s33, calculating the initial value of the base matrix W as

In formula (3), U is a category constraint matrix; s is a sparse constraint matrix; z is a non-negative matrix, and the non-negative matrix Z is a matrix with (P + N2) rows and M' columns; x is a semi-non-negative matrix; sTIs the transposition of S; zTIs the transposition of Z; u shapeTIs a transposition of U;

s34, setting the minimum value of the objective function of the constraint semi-nonnegative matrix factorizationminThe sparsity parameter theta and the value of the dimensionality M' after dimensionality reduction;

and S35, alternately and iteratively updating the matrix Z and the base matrix W: the matrix Z is updated iteratively for one time, then the base matrix W is updated iteratively for one time, and the matrix Z and the base matrix W are updated iteratively in sequence in this way; using formulas

Figure PCTCN2018119894-APPB-100006

in formula (4) and formula (5), U is a category constraint matrix; s is a sparse constraint matrix; z is a non-negative matrix; x is a semi-non-negative matrix; w is a semi-non-negative matrix; sTIs the transposition of S; zTIs the transposition of Z; u shapeTIs a transposition of U; wTIs a transpose of W;

s36, setting the maximum iteration number EmaxCalculating the value of the objective function after each iteration update is completed, and when the value of the objective function is smaller thanminOr the number of iterations reaches EmaxIf so, stopping iteration to obtain a final base matrix W and a final matrix Z;

s37, calculating a coefficient matrix H of the constrained semi-nonnegative matrix factorization

H=(UZ)T(6)

In formula (6), H ═ H1;h2;…;hN]Is expressed asCoefficient matrix of beam semi-nonnegative matrix factorization, hi(i ═ 1, 2, …, N) is a row vector of dimension M'; u is a category constraint matrix; z is a non-negative matrix; (UZ)TIs the transpose of (UZ).

The method for classifying sounds based on constrained semi-nonnegative matrix factorization of claim 1, wherein the step S4 is performed by using the low-dimensional representation of the coefficient matrix H corresponding to the training sound data samples and the class information of the training sound data samples as training data, and training a classification model to obtain a classifier R, according to the following steps:

s41, the first N1 rows in the coefficient matrix H are low-dimensional representations of training audio data samples, denoted as HT, HT ═ HT1;ht2;…;htN1],hti(i ═ 1, 2, …, N1) is a row vector of dimension M';

s42, the class information of the training voice data sample is expressed as a matrix A, and the matrix A is marked as ai,b(i-1, 2, …, N1; B-1, 2, …, B) when htiWhen the corresponding sample belongs to class b, ai,b1, the rest of ai,b=0;

S43, selecting a classification model, marking the classification model as MW, and htingiAs input to the classification model MW, ai,bAnd as the output of the classification model MW, training the classification model MW to obtain a classifier R.

The method for sound classification based on constrained semi-nonnegative matrix factorization of claim 1, wherein the step S5 is performed by inputting the low-dimensional representation corresponding to the test sound data sample in the coefficient matrix H into the classifier R and outputting the classification result of the test sound data sample, as follows:

s51, the (N1+1) to N rows (N2 rows total) in the coefficient matrix H are low-dimensional representations of the test sound data samples, denoted as HC, HC ═ HC1;hc2;…;hcN2],hcj(j ═ 1, 2, …, N2) is a row vector of dimension M';

s52, mixing hc withjThe classifier R is input, and the output of the classifier R is the classification result of the corresponding test sample.

The method for sound classification based on constrained semi-nonnegative matrix factorization of claim 6 wherein the classification model MW employs a nearest neighbor classifier or a support vector machine.

A sound classification apparatus based on constrained semi-nonnegative matrix factorization, comprising:

a processor;

a memory coupled to the processor and storing instructions for performing the steps of implementing the sound classification method based on constrained semi-non-negative matrix factorization of any of claims 1 to 8 by the processor.

The apparatus according to claim 9, wherein the apparatus obtains training sound data samples and test sound data samples.

A computer-readable storage medium, characterized in that it stores an application of a sound classification method based on constrained semi-nonnegative matrix factorization, which implements the steps of the sound classification method based on constrained semi-nonnegative matrix factorization according to any one of claims 1 to 8.

30页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:光盘记录方法、光盘装置和集成电路

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!