CN113012713A - Music genre classification method based on logistic regression algorithm in machine learning - Google Patents
Music genre classification method based on logistic regression algorithm in machine learning Download PDFInfo
- Publication number
- CN113012713A CN113012713A CN202110229785.XA CN202110229785A CN113012713A CN 113012713 A CN113012713 A CN 113012713A CN 202110229785 A CN202110229785 A CN 202110229785A CN 113012713 A CN113012713 A CN 113012713A
- Authority
- CN
- China
- Prior art keywords
- music
- data
- machine learning
- music data
- mel
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
- G10L25/00—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
- G10L25/03—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters
- G10L25/24—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the type of extracted parameters the extracted parameters being the cepstrum
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
- G10L25/00—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
- G10L25/27—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 characterised by the analysis technique
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
- G10L25/00—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
- G10L25/48—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
- G10L25/51—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
- G10L25/54—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination for retrieval
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Acoustics & Sound (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computational Linguistics (AREA)
- Signal Processing (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Auxiliary Devices For Music (AREA)
Abstract
A music genre classification method based on a logistic regression algorithm in machine learning belongs to the technical field of data processing. The invention provides a method for solving manual classification, improving the accuracy and speed of music genre classification and providing great convenience for users to retrieve and distinguish various types of music genres. The method comprises the steps of collecting preset music data of various types, carrying out format conversion processing on the collected music data, extracting characteristic parameters of the music data from the music data by utilizing a Mel cepstrum coefficient, training and modeling extracted characteristic parameter vectors of the music data by utilizing a logistic regression algorithm in machine learning, and predicting classification of music genres by utilizing a trained model.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a music genre classification method based on a logistic regression algorithm in machine learning
Background
At present, with the popularization of computers and the rapid development of networks, a large amount of music resources are transmitted to users through the networks, and different users have different preference degrees for different types of music. Users have a need to find related music types that meet their preferences, so the classification of music genres becomes one of the popular research directions in the field of music information retrieval.
Music is extremely diversified and huge data volume, and music information retrieval becomes very difficult. The classification is a necessary means for managing music data, the traditional classification is music retrieval based on manually labeled text, and a large amount of human resources and time are consumed, so that the method adopts a logistic regression algorithm in machine learning to perform supervised learning modeling on music characteristic parameter vectors to obtain corresponding genre classification, avoids manual classification, improves the accuracy and speed of music genre classification, and provides great convenience for users to retrieve a certain type of music.
Disclosure of Invention
The invention aims to solve the problem of music genre classification in huge music data volume, and provides a music genre classification method based on a logistic regression algorithm in machine learning.
1. The invention mainly comprises the following steps:
step 101: collecting preset music data of various types, and carrying out format conversion processing on the collected music data;
step 102: extracting characteristic parameters of the music data by utilizing a Mel cepstrum coefficient;
step 103: and training and modeling the extracted music data characteristic parameter vectors by using a logistic regression algorithm in machine learning, and predicting the classification of music genres by using the trained models.
Further, the format conversion processing of the collected music data includes the following steps:
the format of music data is converted into a lossless waveform audio format, each point of real sound waves is sampled according to fixed frequency, and the conversion from real signals to analog signals is realized; the sampling frequency needs to satisfy the nyquist sampling law to ensure the original signal to be restored, and meanwhile, in order to improve the signal-to-noise ratio, the lossless waveform audio data needs to be preprocessed.
Further, the step of extracting the characteristic parameters of the music data by using mel frequency cepstrum coefficients for the music data comprises the following steps:
extracting characteristic parameters of the music data by utilizing the Mel cepstrum coefficient, and performing discrete Fourier transform and Mel cepstrum on the preprocessed data to obtain music characteristics.
Further, training and modeling the extracted music data characteristic parameter vector by using a logistic regression algorithm in machine learning, and predicting the classification of music genres by using a trained model comprises the following steps:
converting the characteristic parameters of the music data into vectors, normalizing the characteristics, writing a weight function by using a logistic regression algorithm in machine learning, and iterating by using a gradient descent algorithm by using a cross entropy loss function according to an activation function. And determining the model weight according to the minimized cross entropy loss function, and performing classification prediction.
The invention has the advantages that: the music genre classification method based on the machine learning algorithm is reasonable in setting, easy to operate, simple and understandable in applied algorithm, high in training running speed, and capable of greatly reducing manual intervention and improving the efficiency and accuracy of genre classification by combining the machine learning algorithm and the audio data.
Drawings
FIG. 1 is a flowchart of music genre classification steps based on logistic regression algorithm in machine learning according to the present invention
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The first embodiment is as follows: the following describes the present embodiment with reference to fig. 1, and the music genre classification method based on the logistic regression algorithm in machine learning according to the present embodiment mainly includes:
first, for each type of music data that is collected and preset, format conversion processing is performed on the collected music data.
Secondly, extracting characteristic parameters of the music data by utilizing the Mel cepstrum coefficient.
And finally, training and modeling the extracted music data characteristic parameter vectors by using a logistic regression algorithm in machine learning, and predicting the classification of music genres by using a trained model.
The second embodiment: the specific embodiment example of classifying genres by using music characteristic parameters based on a logistic regression algorithm in machine learning mainly includes:
converting the characteristic parameters of the music data into vectors, normalizing the characteristics, writing a weight function by using a logistic regression algorithm in machine learning, and iterating by using a gradient descent algorithm by using a cross entropy loss function according to an activation function. And determining the model weight according to the minimized cross entropy loss function, and performing classification prediction.
Claims (4)
1. A music genre classification method based on a logistic regression algorithm in machine learning. The method extracts characteristic parameters from various audios, performs characteristic engineering, constructs a music genre classification model by using a logistic regression algorithm, can classify different types of music, and mainly comprises the following steps:
step 1: collecting preset music data of various types, and carrying out format conversion processing on the collected music data;
step 2: extracting characteristic parameters of the music data by utilizing a Mel cepstrum coefficient;
and step 3: and training and modeling the extracted music data characteristic parameter vectors by using a logistic regression algorithm in machine learning, and predicting the classification of music genres by using the trained models.
2. The method for classifying music genres based on machine learning according to claim 1, wherein the step 1, music data format processing in a sample for collecting music of a preset genre, further comprises: the format of music data is converted into a lossless waveform audio format, each point of real sound waves is sampled according to fixed frequency, and the conversion from real signals to analog signals is realized; the sampling frequency needs to satisfy the Nyquist sampling law, and the original signal is ensured to be restored; meanwhile, in order to improve the signal-to-noise ratio, the lossless waveform audio data needs to be preprocessed, and the preprocessing is approximately expressed by the following formula:
y(t)=x(t)-α*x(t-1)
3. the method for classifying music genre based on machine learning according to claim 1, wherein said step 2 extracts feature parameters of music data by using mel frequency cepstrum coefficients, and said method further comprises: performing discrete Fourier transform and Mel cepstrum on the preprocessed data to obtain music characteristics; mel cepstral coefficients are cepstral parameters extracted in the Mel-scale frequency domain, the Mel-scale describes the non-linear characteristic of human ear frequency, and the common frequency scale is converted into Mel-frequency scale, wherein the mapping relationship is as follows:
Mel(f)=2595*lg(1+f/700)
by this mapping relationship, the sensitivity of the human ear to frequency becomes linear under the Mel scale.
4. The method for classifying music genres according to claim 1, wherein in step 3, the extracted music data feature parameters are trained by using a machine learning algorithm to obtain classifications of music genres, and the method further comprises: converting the characteristic parameters of the music data into vectors, carrying out normalization processing on the characteristics, writing a weight function by utilizing a logistic regression algorithm in machine learning, and adopting a cross entropy loss function according to an activation function:
L(Y,P(Y|X))=-logP(Y|X)
and (4) iterating by using a gradient descent algorithm, determining the weight of the model according to the minimized cross entropy loss function, and performing classified prediction. Collecting data from an audio file, selecting extracted features and models according to the characteristics of the collected data, intercepting a part of data to train a classifier, and finally adjusting and finally determining the parameters of the classifier according to the test result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110229785.XA CN113012713A (en) | 2021-03-02 | 2021-03-02 | Music genre classification method based on logistic regression algorithm in machine learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110229785.XA CN113012713A (en) | 2021-03-02 | 2021-03-02 | Music genre classification method based on logistic regression algorithm in machine learning |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113012713A true CN113012713A (en) | 2021-06-22 |
Family
ID=76402270
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110229785.XA Pending CN113012713A (en) | 2021-03-02 | 2021-03-02 | Music genre classification method based on logistic regression algorithm in machine learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113012713A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113450828A (en) * | 2021-06-25 | 2021-09-28 | 平安科技(深圳)有限公司 | Music genre identification method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101540017A (en) * | 2009-04-28 | 2009-09-23 | 黑龙江工程学院 | Feature extraction method based on byte level n-gram and junk mail filter |
CN106407960A (en) * | 2016-11-09 | 2017-02-15 | 浙江师范大学 | Multi-feature-based classification method and system for music genres |
CN106651057A (en) * | 2017-01-03 | 2017-05-10 | 有米科技股份有限公司 | Mobile terminal user age prediction method based on installation package sequence table |
CN109408660A (en) * | 2018-08-31 | 2019-03-01 | 安徽四创电子股份有限公司 | A method of the music based on audio frequency characteristics is classified automatically |
CN111414513A (en) * | 2020-03-16 | 2020-07-14 | 腾讯音乐娱乐科技(深圳)有限公司 | Music genre classification method and device and storage medium |
-
2021
- 2021-03-02 CN CN202110229785.XA patent/CN113012713A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101540017A (en) * | 2009-04-28 | 2009-09-23 | 黑龙江工程学院 | Feature extraction method based on byte level n-gram and junk mail filter |
CN106407960A (en) * | 2016-11-09 | 2017-02-15 | 浙江师范大学 | Multi-feature-based classification method and system for music genres |
CN106651057A (en) * | 2017-01-03 | 2017-05-10 | 有米科技股份有限公司 | Mobile terminal user age prediction method based on installation package sequence table |
CN109408660A (en) * | 2018-08-31 | 2019-03-01 | 安徽四创电子股份有限公司 | A method of the music based on audio frequency characteristics is classified automatically |
CN111414513A (en) * | 2020-03-16 | 2020-07-14 | 腾讯音乐娱乐科技(深圳)有限公司 | Music genre classification method and device and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113450828A (en) * | 2021-06-25 | 2021-09-28 | 平安科技(深圳)有限公司 | Music genre identification method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101599271B (en) | Recognition method of digital music emotion | |
CN102982803A (en) | Isolated word speech recognition method based on HRSF and improved DTW algorithm | |
Stowell et al. | Birdsong and C4DM: A survey of UK birdsong and machine recognition for music researchers | |
CN103310789A (en) | Sound event recognition method based on optimized parallel model combination | |
CN105206270A (en) | Isolated digit speech recognition classification system and method combining principal component analysis (PCA) with restricted Boltzmann machine (RBM) | |
CN111128236B (en) | Main musical instrument identification method based on auxiliary classification deep neural network | |
CN103761965B (en) | A kind of sorting technique of instrument signal | |
CN106295717A (en) | A kind of western musical instrument sorting technique based on rarefaction representation and machine learning | |
CN112331220A (en) | Bird real-time identification method based on deep learning | |
Hao et al. | Time-domain neural network approach for speech bandwidth extension | |
CN113012713A (en) | Music genre classification method based on logistic regression algorithm in machine learning | |
Huang et al. | A classification method for wood vibration signals of Chinese musical instruments based on GMM and SVM. | |
Dalsaniya et al. | Development of a novel database in Gujarati language for spoken digits classification | |
Yu | Research on music emotion classification based on CNN-LSTM network | |
CN112735477B (en) | Voice emotion analysis method and device | |
Li | Information retrieval method of professional music teaching based on Hidden Markov Model | |
Roy et al. | A hybrid VQ-GMM approach for identifying Indian languages | |
CN114550675A (en) | Piano transcription method based on CNN-Bi-LSTM network | |
Xiwen | Design of voice recognition acoustic compression system based on neural network | |
Mangalam et al. | Emotion Recognition from Mizo Speech: A Signal Processing Approach | |
Konduru et al. | Multidimensional feature diversity based speech signal acquisition | |
Therese et al. | A linear visual assessment tendency based clustering with power normalized cepstral coefficients for audio signal recognition system | |
Bhat et al. | Transfer Learning Based Automatic Model Creation Tool For Resource Constraint Devices | |
Miao et al. | Construction of multimodal music automatic annotation model based on neural network algorithm | |
Kumar et al. | Effect of background Indian music on performance of speech recognition models for Hindi databases |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20210622 |
|
WD01 | Invention patent application deemed withdrawn after publication |