# neuronPCA

## Description

The `compressNetworkUsingProjection`

function uses principal
component analysis (PCA) to identify the subspace of learnable parameters that result in the
highest variance in neuron activations by analyzing the network activations using a data set
representative of the training data. The PCA step can be computationally intensive. If you
expect to compress the same network multiple times (for example, when exploring different
levels of compression), then you can perform the PCA step up front using a
`neuronPCA`

object.

Depending on the network, projection configuration, and code generation libraries used (including library-free code generation), forward passes of a projected deep neural network can be faster when you deploy the network to embedded hardware.

If you prune or quantize your network, then use compression using projection after pruning and before quantization.

## Creation

### Description

computes the principal component analysis of the neuron activations in
`npca`

= neuronPCA(`net`

,`mbq`

)`net`

using the data in the mini-batch queue
`mbq`

. The software analyzes the input and output activations of the
projectable layers in `net`

. This feature requires the Deep Learning Toolbox™ Model Quantization Library support package. This support package is a free add-on that you can download using
the Add-On Explorer. Alternatively, see Deep Learning Toolbox Model Quantization Library.

sets the `npca`

= neuronPCA(___,`Name=Value`

)`LayerNames`

property or specifies additional options using
one or more name-value arguments.

### Input Arguments

## Properties

## Examples

## References

[1] "Compressing Neural Networks Using Network Projection." Accessed July 20, 2023. https://www.mathworks.com/company/technical-articles/compressing-neural-networks-using-network-projection.html.

## Extended Capabilities

## Version History

**Introduced in R2022b**