Feature selection method and device based on quantum algorithm

By applying quantum algorithms in feature selection, using the parallelism and superimposed state characteristics of quantum computing, the problem of insufficient computing efficiency and optimization capabilities of traditional methods on large-scale high-dimensional data sets is solved, and efficient feature selection and model performance improvement is achieved.

CN119808976APending Publication Date: 2025-04-11CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411784176.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Traditional feature selection methods are computationally expensive and inefficient when processing large-scale and high-dimensional data sets, and are prone to falling into local optimal solutions and cannot guarantee the global optimal feature subset.

Method used

Using a feature selection method based on quantum algorithm, the superimposed state parallelism of quantum computing is used to traverse the high-dimensional feature space in polynomial time, and the objective function of the quadratic unconstrained binary optimization problem is constructed, and the quantum approximation optimization algorithm is used to solve it to obtain a subset of features.

Benefits of technology

It significantly improves computing efficiency, enhances global optimization capabilities, and can handle a large number of feature combinations in a very short time, improving the prediction performance and efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808976A_ABST
    Figure CN119808976A_ABST
Patent Text Reader

Abstract

The invention relates to a feature selection method and device based on a quantum algorithm, and the method comprises the steps: setting a feature set as F = {f1, f2,..., fn}, setting a feature subset S, enabling the feature subset S to meet # imgabs0 #, calculating first mutual information between a feature fi and a target variable y, and obtaining the importance Ii of the feature fi; second mutual information between the features fi and fj is calculated, and the redundancy Rij between the feature pairs (fi, fj) is obtained; constructing an objective function h (z) of a quadratic unconstrained binary optimization problem according to the importance Ii and the redundancy Rij; solving a quadratic unconstrained binary optimization problem by adopting a quantum approximate optimization algorithm, outputting a binary vector z, and decoding an output result to obtain a feature subset S; by introducing quantum calculation, a plurality of states are simultaneously represented in a quantum space, and a large number of possible feature combinations are processed, so that the calculation time of feature selection is greatly shortened, and the global optimization capability is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quantum computing and machine learning technology, and in particular to a feature selection method and device based on quantum algorithm. Background Art

[0002] Feature selection is a key preprocessing step in machine learning. Its purpose is to select a subset of features from the original data that is most helpful for model prediction performance. Traditional feature selection methods include filter, wrapper, and embedded methods. The filter method performs preliminary feature screening through statistical tests; the wrapper method regards the feature selection process as a search problem and evaluates the importance of features through the performance of the model; the embedded method performs feature selection during the model training process.

[0003] In current machine learning practice, feature selection is a key step in building efficient prediction models. However, in today's data-driven era, the size of data sets is growing and the feature dimensions are high, which leads to obvious limitations of traditional feature selection methods when dealing with large-scale and high-dimensional data sets. Traditional feature selection methods often require exhaustive searches of all possible feature combinations to find the optimal feature subset, which results in large computational complexity and low efficiency.

[0004] Traditional feature selection methods, especially wrapper methods, usually require model training and evaluation for each candidate feature subset. When the number of features increases, the number of candidate subsets increases exponentially, resulting in a sharp increase in computational costs. For example, for a dataset with n features, the number of possible feature subsets is 2 n , making exhaustive search infeasible.

[0005] In practical applications, the size of data sets continues to expand, and the number of features can reach thousands or even millions. Traditional algorithms are slow to process large-scale data sets and require a lot of computing resources and time, which seriously affects the practicality of the feature selection process and limits its application in scenarios that require rapid response.

[0006] Using heuristic methods, such as greedy algorithms and genetic algorithms, can reduce the amount of calculation to a certain extent. However, this method is often prone to falling into the local optimal solution. This method lacks global search capabilities and cannot guarantee the finding of the global optimal feature subset, thus affecting the prediction performance of the model. Summary of the invention

[0007] The present invention aims to overcome the problems of traditional algorithms that are time-consuming and labor-intensive when processing large-scale data sets, are prone to falling into local optimal solutions, and cannot guarantee global optimality. The present invention combines the feature selection process in quantum computing and machine learning, utilizes the superposition state parallelism of quantum computing, traverses high-dimensional feature space in polynomial time, and simultaneously represents and processes multiple states in quantum space, greatly improving search efficiency.

[0008] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0009] A feature selection method based on quantum algorithm, characterized by comprising:

[0010] S1. Set the feature set to F = {f1,f2,...,f n}, where n is the total number of features, set a feature subset S, the feature subset S satisfies

[0011] S2. Calculate feature f i The first mutual information between the target variable y and the feature f i Importance of i ; Calculate feature f i With f j The second mutual information between them is used to obtain the feature pair (f i ,f j ) ij ;

[0012] S3. According to the importance I i and redundancy R ij Construct the objective function h(z) of the quadratic unconstrained binary optimization problem;

[0013] S4. Use the quantum approximate optimization algorithm to solve the quadratic unconstrained binary optimization problem, output the binary vector z, and decode the output result to obtain the feature subset S.

[0014] Furthermore, the importance I i Defined as feature f i The joint probability distribution with the target variable y and the feature f i The expected value of the difference between the logarithm of the product of the respective marginal probability distributions of the target variable y.

[0015] Furthermore, the optimization goal of the objective function h(z) is to find z that minimizes h(z), where z=(z1, z2, ..., z n ) is a binary vector with a value of 0 or 1 to indicate whether the feature is selected:

[0016]

[0017] Among them, α is the weight of the feature importance measure and redundancy measure.

[0018] Furthermore, the use of a quantum approximate optimization algorithm to solve a quadratic unconstrained binary optimization problem includes:

[0019] Initialize n quantum bits to obtain a superposition state Wherein, H is a Hadamard gate, and the n quantum bits are the corresponding n features;

[0020] Apply parameterized quantum gates, construct parameterized quantum states, use classical optimization methods to update parameters, and minimize the expected value of the objective function h(z);

[0021] Measure the quantum state to obtain the eigenstate, obtain the solution to the problem, and output the binary result z.

[0022] Furthermore, the solving of the quadratic unconstrained binary optimization problem further includes:

[0023] A variational quantum eigensolver is employed as a quantum algorithm for solving quadratic unconstrained binary optimization problems.

[0024] Furthermore, the method further comprises:

[0025] The model is trained and evaluated based on the feature subset S, and the evaluation indicators include accuracy, recall rate, and F1 score.

[0026] The present invention also relates to a feature selection device based on quantum algorithm, characterized in that it comprises:

[0027] Setting module, used to set the feature set to F = {f1, f2, ..., f n}, where n is the total number of features, set a feature subset S, the feature subset S satisfies

[0028] Computation module, used to calculate the feature f i The first mutual information between the target variable y and the feature f i Importance of i ; Calculate feature f i With f j The second mutual information between them is used to obtain the feature pair (f i ,f j ) ij ;

[0029] Building blocks for i and redundancy R ij Construct the objective function h(z) of the quadratic unconstrained binary optimization problem;

[0030] The output module is used to solve the quadratic unconstrained binary optimization problem using a quantum approximate optimization algorithm, output a binary vector z, and decode the output result to obtain a feature subset S.

[0031] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.

[0032] The present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;

[0033] The memory is used to store program instructions;

[0034] The processor is used to execute the above method by calling program instructions.

[0035] The present invention also relates to a computer program product, comprising a computer program and / or instructions, characterized in that the computer program and / or instructions implement the steps of the above method when executed by a processor.

[0036] The beneficial effects of the present invention are:

[0037] The feature selection method and device based on quantum algorithm described in the present invention innovatively integrates quantum computing technology and feature selection process in the field of machine learning, and utilizes the superposition state parallelism of quantum computing to traverse high-dimensional feature space in polynomial time, and simultaneously represent and process multiple states in quantum space. Specifically, the present invention introduces quantum computing technology and has the following advantages:

[0038] (1) Significant improvement in computational efficiency: When processing large-scale data sets, traditional feature selection algorithms have a dramatic increase in computational time due to the exponential growth in the number of feature combinations that need to be evaluated. In contrast, the present invention utilizes the super-parallelism of quantum computing to simultaneously process a large number of possible feature combinations in a very short time. This feature of quantum algorithms revolutionizes the computational efficiency of the feature selection process, thereby significantly reducing the computational time of feature selection.

[0039] (2) Enhanced global optimization capability: Traditional methods such as heuristic algorithms are often prone to local optimal solutions when solving feature selection problems, and it is difficult to find the global optimal solution. The quantum algorithms used in the present invention, such as the quantum approximate optimization algorithm (QAOA) and the variational quantum eigensolver (VQE), can effectively search in a wider solution space. The global search capability of the quantum algorithm significantly improves the probability of finding the global optimal feature subset, thereby making it possible to build a high-performance prediction model.

[0040] (3) Improved model performance: While reducing the number of features, the present invention can maintain the model's prediction accuracy and even improve it. The feature subsets optimized by the quantum algorithm can not only capture the key information in the data, but also avoid the noise interference caused by redundant features. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0042] Figure 1 This is a flow chart of a feature selection method based on quantum algorithm of the present invention;

[0043] Figure 2 This is a schematic diagram of the structure of a feature selection device based on quantum algorithm of the present invention;

[0044] Figure 3 The figure is a schematic structural diagram of an electronic device of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. It should be understood that the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments, and these embodiments are only used to illustrate the present application and are not used to limit the scope of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0046] like Figure 1 As shown, the embodiment of the present invention discloses a feature selection method based on quantum algorithm, and the steps of the method include:

[0047] Step S1. Set the feature set to F = {f1, f2, ..., f n}, where n is the total number of features, set a feature subset S, the feature subset S satisfies

[0048] The goal of feature selection in this invention is to select a feature subset from a feature set F This makes the model performance of the feature subset training optimal.

[0049] Step S2. Calculate feature f i The first mutual information between the target variable y and the feature f i Importance of i ; Calculate feature f i With f jThe second mutual information between them is used to obtain the feature pair (f i ,f j ) ij .

[0050] Specifically, define the feature f i The mutual information (MI) between the feature and the target variable y is the expected value of the difference between the logarithm of their joint probability distribution and the product of their respective marginal probability distributions. The formula is as follows:

[0051]

[0052] Among them, X and Y are the ranges of the feature and target variable, p(x,y) is the joint probability distribution, and p(x) and p(y) are the marginal probability distributions. The larger the value of the mutual information, the more important the feature.

[0053] Specifically, define the feature pair (f i ,f j ) is the redundancy R between two features. ij =MI(f i ;f j ). The smaller the value of the mutual information, the lower the redundancy between the features.

[0054] Step S3. According to the importance I i and redundancy R ij Construct the objective function h(z) of the quadratic unconstrained binary optimization (QUBO) problem.

[0055] In the present invention, the feature selection problem is transformed into a quadratic unconstrained binary optimization (QUBO) problem through the balance constraints of importance and redundancy.

[0056] The optimization goal of the objective function h(z) in the present invention is to find z so that h(z) is minimized, where z=(z1, z2, ..., z n ) is a binary vector that can take values ​​of 0 or 1 to indicate whether the feature is selected:

[0057]

[0058] α is the weight of the feature importance measure and redundancy measure. α can be configured as needed.

[0059] Step S4. Use the quantum approximate optimization (QAOA) algorithm to solve the quadratic unconstrained binary optimization (QUBO) problem, output a binary vector z, and decode the output result to obtain the feature subset S.

[0060] Specifically, the quantum approximate optimization algorithm is used to solve the quadratic unconstrained binary optimization problem, including:

[0061] Initialize n quantum bits to obtain a superposition state Where H is the Hadamard gate, and the n qubits are the corresponding n features. A qubit can be in two states: |0> and |1>, and can also be in a superposition of these two states, that is, in quantum computing, a qubit can be in both |0> and |1> states at the same time. The Hadamard gate can convert the |0> state to The superposition state of |1> is converted to In the embodiment of the present invention, the initial state of the quantum bit is |0>, and the Hadamard gate is applied to n quantum bits to convert the quantum bits to the superposition state, and finally a quantum state containing 2 is obtained. n This method can support the simultaneous processing of large amounts of information.

[0062] Apply parameterized quantum gates, construct parameterized quantum states, and use classical optimization methods to update parameters to minimize the expected value of the objective function h(z). The parameterized quantum gate is defined as:

[0063]

[0064] Among them, γ and β are parameter vectors used to control the quantum gate and The intensity of action, X j is the Pauli-X gate of the jth qubit, H C is the target Hamiltonian, X j It helps to form a mixture between quantum states and promotes the diffusion of quantum states in the Hilbert space, so that the algorithm can explore a wider solution space. C It directly corresponds to the objective function of the optimization problem. Its selection ensures that the quantum state tends to form a state close to the solution of the optimization problem during its evolution. The algorithm is iteratively optimized, repeatedly applying parameterized quantum gates, and updating the parameters γ and β through classical optimization methods (such as gradient descent, conjugate gradient method, etc.) to minimize the expected value of h(z). After each iteration, the quantum state is measured to estimate the value of the objective function. After repeated multiple times to obtain statistically significant results, the binary string with the highest frequency can be selected as the approximate optimal solution to the problem.

[0065] The quantum state is measured to obtain the eigenstate, the solution to the problem is obtained, and the binary result z is output. After the final iteration, the quantum state is measured to obtain the eigenstate of the ground state Hamiltonian, and the binary result z is obtained. In this embodiment, the ground state of the target Hamiltonian corresponds to the optimal solution to the problem, and decoding the measured quantum state can obtain the solution to the problem.

[0066] In the embodiment of the present invention, the model is trained and evaluated based on the feature subset S after feature selection, and the evaluation index may be accuracy, recall rate, F1 score or other related indexes.

[0067] In an embodiment of the present invention, a (VQE) variational quantum eigensolver may be used as a quantum algorithm for solving the (QUBO) quadratic unconstrained binary optimization (QUBO) problem.

[0068] like Figure 2 As shown, the embodiment of the present invention discloses a feature selection device based on quantum algorithm, and its structure includes:

[0069] Setting module, used to set the feature set to F = {f1, f2, ..., f n}, where n is the total number of features, set a feature subset S, the feature subset S satisfies

[0070] Computation module, used to calculate the feature f i The first mutual information between the target variable y and the feature f i Importance of i ; Calculate feature f i With f j The second mutual information between them is used to obtain the feature pair (f i ,f j ) ij ;

[0071] Building blocks for i and redundancy R ij Construct the objective function h(z) of the quadratic unconstrained binary optimization problem;

[0072] The output module is used to solve the quadratic unconstrained binary optimization problem using a quantum approximate optimization algorithm, output a binary vector z, and decode the output result to obtain a feature subset S.

[0073] By using this device, the above-mentioned calculation processing method can be executed and the corresponding technical effects can be achieved.

[0074] The present invention provides a possible embodiment to demonstrate the application of the present invention on an actual data set. The embodiment is only used to illustrate the present invention and is not used to limit the scope of the present invention. In the embodiment of the present invention, the technical solution of the present invention is verified by credit data. In this embodiment, the quantum simulation process is implemented on the quantum software framework TensorCircuit, which has efficient quantum circuit simulation and optimization capabilities and can provide support for the implementation of quantum algorithms.

[0075] The credit data set includes multiple features. In this embodiment, the following eight features are selected: the borrower's credit score, loan amount, loan term, borrower's annual income, debt-to-income ratio, loan purpose, years of employment, and housing status. In addition, a key target variable is selected: loan default. 1,000 samples are randomly selected from the data set, and the samples are evenly distributed in terms of default or not, that is, the samples of loan default and loan non-default each account for 50%.

[0076] In this embodiment, the mutual information between each feature and the target variable is calculated to determine the importance of the feature, and the mutual information between the features is calculated to determine the redundancy between the features.

[0077] According to the calculated feature importance I i and redundancy R ij The objective function h(z) of the quadratic unconstrained binary optimization (QUBO) problem is constructed, which can reflect the trade-off between model performance and feature redundancy in a given feature set, where

[0078]

[0079] α is the weight of the feature importance measure and redundancy measure.

[0080] In this embodiment, the quantum approximate optimization (QAOA) algorithm is selected to solve the quadratic unconstrained binary optimization (QUBO) problem, and eight quantum bits are initialized, corresponding to eight features. The value range of the α parameter is 0.2 to 0.8. The parameterized quantum gate is applied and multiple iterations are performed. After each iteration, the classical optimization algorithm is used to update the parameters of the optimized quantum circuit to minimize the expected value of the objective function, ensuring that the algorithm gradually approaches the global optimal solution.

[0081] In this embodiment, the quantum algorithm is used to output a series of binary vectors, the output results are decoded into the results of feature selection, and the selected feature subset is used to train the model to evaluate the performance of the method of the present invention.

[0082] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

[0083] The embodiment of the present invention further provides an electronic device for executing the above method, as a device for implementing the method, and its structure is as follows: Figure 3As shown, the electronic device 300 includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one. It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the electronic device 300. In other embodiments of the present application, the electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Optionally, the electronic device may also include a display screen 305 for displaying images, or receiving user operation instructions when necessary.

[0084] The processor 301 is applied in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 304 may include a receiver and a transmitter. The transceiver 304 is applied in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.

[0085] Processor 301 may be a CPU (Central Processing Unit), a general purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0086] The processor 301 may also include one or more processing units, for example, the processor 301 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor (NPU). Among them, different processing units may be independent devices or integrated into one or more processors. Among them, the controller may be the nerve center and command center of the electronic device 300. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 301 for storing instructions and data. In some embodiments, the memory in the processor 301 is a high-speed cache memory. The memory may store instructions or data that the processor 301 has just used or circulated. If the processor 301 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, the waiting time of the processor 301 is reduced, and the efficiency of the system is improved.

[0087] The processor 301 can run the method provided in the embodiment of the present application. The processor 301 can include different devices. For example, when a CPU and a GPU are integrated, the CPU and the GPU can cooperate to execute the method provided in the embodiment of the present application, for example, part of the algorithm in the method is executed by the CPU, and another part of the algorithm is executed by the GPU to obtain faster processing efficiency.

[0088] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0089] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or may include a high-speed random access memory, or may include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0090] Optionally, the memory 303 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the method provided in any embodiment of the present application.

[0091] The memory 303 can be used to store computer executable program codes, which include instructions. The processor 301 executes various functional applications and data processing of the electronic device 300 by running the instructions stored in the memory 303. The memory 303 may include a program storage area and a data storage area. Among them, the program storage area may store the code of the operating system, application program, etc. The data storage area may store data created during the use of the electronic device 300 (such as images, videos, etc. collected by the camera application), etc.

[0092] The memory 303 may also store one or more computer programs corresponding to the method provided in the embodiment of the present application. The one or more computer programs are stored in the above-mentioned memory 303 and are configured to be executed by the one or more processors 301. The one or more computer programs include instructions, and the above-mentioned instructions can be used to execute each step in the above-mentioned corresponding embodiment.

[0093] Of course, the code of the method provided in the embodiment of the present application can also be stored in an external memory. In this case, the processor 301 can run the code of the method stored in the external memory through the external memory interface, and the processor 301 can control the running process.

[0094] The display screen 305 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 300 may include 1 or N display screens 305, where N is a positive integer greater than 1. The display screen 305 can be used to display information input by a user or information provided to a user and various graphical user interfaces (GUI). For example, the display screen 305 can display photos, videos, web pages, or files.

[0095] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.

[0096] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0097] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0098] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0100] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A feature selection method based on quantum algorithm, characterized in that: include: S1. Set the feature set to F = {f1,f2,...,f n }, where n is the total number of features, set a feature subset S, the feature subset S satisfies S2. Calculate feature f i The first mutual information between the target variable y and the feature f i Importance of i ; Calculate feature f i With f j The second mutual information between them is used to obtain the feature pair (f i ,f j ) ij ; S3. According to the importance I i and redundancy R ij Construct the objective function h(z) of the quadratic unconstrained binary optimization problem; S4. Use the quantum approximate optimization algorithm to solve the quadratic unconstrained binary optimization problem, output the binary vector z, and decode the output result to obtain the feature subset S.

2. The method according to claim 1, characterized in that The importance of i Defined as feature f i The joint probability distribution with the target variable y and the feature f i The expected value of the difference between the logarithm of the product of the respective marginal probability distributions of the target variable y.

3. The method according to claim 1, characterized in that The optimization goal of the objective function h(z) is to find z that minimizes h(z), where z=(z1, z2, ..., z n ) is a binary vector with a value of 0 or 1 to indicate whether the feature is selected: Among them, α is the weight of the feature importance measure and redundancy measure.

4. The method according to claim 1, characterized in that The method of using a quantum approximate optimization algorithm to solve a quadratic unconstrained binary optimization problem includes: Initialize n quantum bits to obtain a superposition state Wherein, H is a Hadamard gate, and the n quantum bits are the corresponding n features; Apply parameterized quantum gates, construct parameterized quantum states, use classical optimization methods to update parameters, and minimize the expected value of the objective function h(z); Measure the quantum state to obtain the eigenstate, obtain the solution to the problem, and output the binary result z.

5. The method according to claim 1, characterized in that The solving of the quadratic unconstrained binary optimization problem also includes: A variational quantum eigensolver is employed as a quantum algorithm for solving quadratic unconstrained binary optimization problems.

6. The method according to claim 1, characterized in that The method further comprises: The model is trained and evaluated based on the feature subset S, and the evaluation indicators include accuracy, recall rate, and F1 score.

7. A feature selection device based on quantum algorithm, characterized in that: include: Setting module, used to set the feature set to F = {f1,f2,...,f n }, where n is the total number of features, set a feature subset S, the feature subset S satisfies Computation module, used to calculate the feature f i The first mutual information between the target variable y and the feature f i Importance of i ; Calculate feature f i With f j The second mutual information between them is used to obtain the feature pair (f i ,f j ) ij ; Building blocks for i and redundancy R ij Construct the objective function h(z) of the quadratic unconstrained binary optimization problem; The output module is used to solve the quadratic unconstrained binary optimization problem using a quantum approximate optimization algorithm, output a binary vector z, and decode the output result to obtain a feature subset S.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store program instructions; The processor is configured to execute the method according to any one of claims 1 to 6 by calling program instructions.

10. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.