- Notifications
You must be signed in to change notification settings - Fork11
Feature selection for machine learning using mutual information.
License
dwave-examples/feature-selection-notebook
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Important
This repository has been archived and is no longer maintained. An updated version of the Feature Selection demo can be foundhere.
This notebook develops a QPU programming model for an optimization problem thatselects a subset and demonstrates it using Ocean software'sdwave-hybridon an example of feature selection for machine learning.
The notebook has the following sections:
- What is Feature Selection? defines and explains the feature-selection problem.
- Feature Selection by Mutual Information describes a particular method offeature selection that is demonstrated in this notebook.
- Solving Feature Selection on a Quantum Computer shows how such optimizationproblems can be formulated for solution on a D-Wave quantum computer.
- Example Application: Predicting Survival of Titanic Passengers demonstratesthe use ofKerberos,an out-of-the-box classical-quantumhybridsampler, to select optimal features for a public-domain dataset.
Statistical and machine-learning models use sets of input variables ("features")to predict output variables of interest. Feature selection can be part of the modeldesign process: selecting from a large set of potential features a highly informativesubset simplifies the model and reduces dimensionality.
For systems with large numbers of potential input information—for example,weather forecasting or image recognition—model complexity and required computeresources can be daunting. Feature selection can help make such models tractable.
However, optimal feature selection can itself be a hard problem. This exampleintroduces a powerful method of optimizing feature selection based on a complexprobability calculation. This calculation is submitted for solution to a quantumcomputer.
You can run this example without installation in cloud-based IDEs that supporttheDevelopment Containers specification(aka "devcontainers").
For development environments that do not supportdevcontainers
, installrequirements:
pip install -r requirements.txt
If you are cloning the repo to your local system, working in avirtual environment isrecommended.
Your development environment should be configured toaccess Leap’s Solvers.You can see information about supported IDEs and authorizing access to yourLeap accounthere.
The notebook can be opened by clicking on the01-feature-selection.ipynb
file in VS Code-based IDEs.
To run a locally installed notebook:
jupyter notebook
SeeLICENSE file.