# nwpredmodel class

Predictor model class, which specifies the mapping from nodes and excitations of a network structure to inputs and outputs of a predictor model. An instance of this class is required for single module identification, where a subset of the excitation and node signals from the full network are required for the estimation of the target module.

## Construction

`pred = nwpredmodel(networkStructure)`

creates a full network identification predictor model based on the topology in the provided`LabelledAdjStruct`

argument.`pred = nwpredmodel(networkStructure,target,Rset,Dset,Yset)`

creates a single module identification predictor model based on the topology in the provided`LabelledAdjStruct`

argument, and the provided target, input excitations (Rset), input nodes (Dset) and output nodes (Yset).`pred = nwpredmodel(path)`

creates a predictor model object from file, previously stored using the`save`

method.`pred = nwpredmodel(__,Name=Value)`

creates a predictor model with additional properties set according to the provided values. Currently, the`type`

,`NoiseCovariance`

and`Report`

properties cannot be set in this way.

## Properties

### Name

character array string Name of predictor model. Empty by default.

### NetworkStructure

Structure array Details of the network structure from which the predictor model is generated. When set either during construction or after, this structure must be provided as a

`LabelledAdjStruct`

object. The object is then converted to a structure array. Modifying fields of this structure array directly is currently not supported.### type

string Type of the predictor model. Defaults to 'tf'.

### target

`[:,2]`

arrayTarget module for identification, specified by the indices of the input and output nodes in the network structure. Similar to

`targetLabelNr`

, but here the set of integers refers to the position of the nodes in the network structure, rather than the node numbers. For example, when`NetworkStructure.NodeNumbers = [1 3 2 4]`

and`targetLabelNr = [1 2]`

, then`target = [1 3]`

.### Rset

$[1,n_{R}]$ array Indices of input excitations in the predictor model. Similar to

`RsetLabelNr`

, but here the set of integers refers to the position of the excitations in the network structure, rather than the excitation numbers. For example, when`NetworkStructure.ExcitationNumbers = [1 3 2 4]`

and`RsetLabelNr = [1 2]`

, then`Rset = [1 3]`

.### Dset

$[1,n_{D}]$ array Indices of input nodes in the predictor model. Similar to

`DsetLabelNr`

, but here the set of integers refers to the position of the nodes in the network structure, rather than the node numbers. For example, when`NetworkStructure.NodeNumbers = [1 3 2 4]`

and`DsetLabelNr = [1 2]`

, then`Dset = [1 3]`

.### Yset

$[1,n_{Y}]$ array Indices of output nodes in the predictor model. Similar to

`YsetLabelNr`

, but here the set of integers refers to the position of the nodes in the network structure, rather than the node numbers. For example, when`NetworkStructure.NodeNumbers = [1 3 2 4]`

and`YsetLabelNr = [1 2]`

, then`Yset = [1 3]`

.### targetLabelNr

`[:,2]`

integer arrayTarget module for identification, specified by the label numbers of the input and output nodes in the network structure (corresponding to

`NetworkStructure.NodeNumbers`

). An empty (`[0,2]`

) array indicates the full network should be identified. Defaults to an empty array.### RsetLabelNr

$[1,n_{R}]$ integer array Label numbers of input excitations in the predictor model, corresponding to

`NetworkStructure.ExcitationNumbers`

. For a full network predictor model, all excitations in the`NetworkStructure`

property appear in the input. For a single module predictor model, this property defaults to an empty array.### DsetLabelNr

$[1,n_{D}]$ integer array Numbers of input nodes in the predictor model, corresponding to

`NetworkStructure.NodeNumbers`

. For a full network predictor model, all nodes in the`NetworkStructure`

property appear in the output. For a single module predictor model, this property defaults to an empty array.### YsetLabelNr

$[1,n_{Y}]$ integer array Numbers of output nodes in the predictor model, corresponding to

`NetworkStructure.NodeNumbers`

. For a full network predictor model, all nodes in the`NetworkStructure`

property appear in the output. For a single module predictor model, this property defaults to an empty array.### G

`PredictorMap`

objectStructural and estimation properties of the mapping from input nodes to output nodes.

### T

`PredictorMap`

objectStructural and estimation properties of the mapping from excitations to output nodes.

### H

`PredictorMap`

objectStructural and estimation properties of the mapping from noise signals to output nodes.

### order

positive scalar Initial order of the transfer functions in

`G`

,`T`

and`H`

. Note that this order can be superseded by modifying the $G$, $T$ and $H$ properties.### NoiseCovariance

$[n_{E},n_{E}]$ double array Estimated noise covariance matrix.

### Report

`nwreport`

objectEstimation report, containing e.g. information on data used, fit and estimation method used.

### nodesW

`struct`

Structure specifying the indices of the input and output nodes in the predictor model, with the fields:

- Y (nodes appearing in output)
- D (nodes appearing in input)
- Q (nodes appearing in both input and output)
- O (nodes appearing only in output)
- U (nodes appearing only in input)

### nodesR

$[n_{R},1]$ array Indices of excitations appearing in the predictor model.

### idmodule

`tf`

objectTransfer function representation of the (to be) identified module. Retrieved by indexing the

`G`

property with the indices specified in the`target`

property.### nD

positive scalar Number of input nodes.

### nY

positive scalar Number of output nodes.

### nR

positive scalar Number of excitation signals.

### nE

positive scalar Number of noise signals.

### nU

positive scalar Total number of inputs.

### full

logical scalar Indicates if the predictor model specifies full network identification.

### struc

`LabelledAdjStruct`

objectShorthand for

`NetworkStructure`

## Methods

### save

Save properties of the object.

#### Syntax

`save(pred,path)`

stores a`struct`

containing the properties of the predictor model object at the location specified by`path`

.

#### Input arguments

pred

`nwpredmodel`

objectpath

character array string Path to folder in which the predictor model details should be stored.

### get

Displays the properties of the object.

#### Syntax

`get(pred)`

displays a`struct`

containing the properties of the`nwpredmodel`

object.

#### Input arguments

pred

`nwpredmodel`

object