0

I have a lot of datasets with different shapes. For example few of them are (90, 892), (74, 853), (93, 765), ... etc.

I want to convert this shape to (90, 4), (74, 4), (93, 4) ... (x, 4). And, after this I will pass the updated data to a quantum machine learning model with 4 qubits and wires.

I want to transform the entire data into the above mentioned shape rather than splitting the data into train and test.

Do I need to use dimensionality reduction techniques for getting the expected result? If yes, what technique do I need to follow.

Any sample code will be really helpful

Thanks in advance

Shikhar
  • 1
  • 1
  • Start off with PCA to retain the maximum variance, thereby projecting the dataset into lower dimensions (4 in your case). – Polymath Aug 11 '22 at 05:50
  • 1
    Does this answer your question? [What is dimensionality reduction? What is the difference between feature selection and extraction?](https://datascience.stackexchange.com/questions/130/what-is-dimensionality-reduction-what-is-the-difference-between-feature-selecti) – Lucas Morin Aug 11 '22 at 15:29
  • You can use PCA from sklearn library. Pass 4 as argument . – amol goel Aug 11 '22 at 06:54

0 Answers0