NMath Reference Guide

## NMFact Class |

Class NMFact performs non-negative matrix factorization.

Inheritance Hierarchy

Syntax

The NMFact type exposes the following members.

Constructors

Name | Description | |
---|---|---|

NMFact | Creates an NMFact object with default settings for cost at each step, update algorithm, and number of iterations. | |

NMFact(Boolean) | Constructs an NMFact using the default number of iterations and update algorithm with the specified cost at each step. | |

NMFact(INMFUpdateAlgorithm) | Constructs an NMFact object with the given update algorithm and the default number of iterations. | |

NMFact(Int32) | Constructs an NMFact object that uses the default cost at each step and update algorithm with the given number of iterations. | |

NMFact(Boolean, Int32) | Constructs an NMFact with the default update algorithm and the given cost at each step and number of iterations. | |

NMFact(Int32, INMFUpdateAlgorithm) | Constructs an NMFact object which uses the given update algorithm to update the factors and the given number of iterations. | |

NMFact(Boolean, Int32, INMFUpdateAlgorithm) | Constructs an NMFact object with the given parameters for cost at each step, number of iterations and the update algorithm. |

Properties

Name | Description | |
---|---|---|

ComputeCostAtEachStep | If true, the error of the approximation will be computed at each iteration step. If false, only the final error will be computed. | |

Cost | Returns the error in the factorization in the last call to Factor. The error is computed using the Cost function in the INMFUpdateAlgorithm. | |

DefaultCostAtEachStep | Whether, by default, the cost is evaluated at each step. | |

DefaultNumIterations | Gets and sets the default number of iterations. | |

DefaultUpdateAlgorithm | Gets and sets the default update algorithm. | |

H | Returns the second factor in the factorization of V = WH. | |

NumIterations | Gets and sets the number of iterations to perform. | |

StepCost | A DoubleVector containing the error at each iteration step if ComputeCostAtEachStep is true. Otherwise it is a vector of length one containing only the final error. | |

UpdateAlgorithm | Gets and sets the algorithm used by this factorization object. | |

V | Returns the matrix being factored. | |

W | Returns the first factor in the factorization of V = WH. |

Methods

Name | Description | |
---|---|---|

Clone | Creates a deep copy of this NMFact. | |

Factor(DataFrame, Int32) | Factors the matrix contained in data into the product WH using an iterative method. The initial values for WH are random. | |

Factor(DoubleMatrix, Int32) | Factors the matrix contained in data into the product WH using an iterative method. The initial values for WH are random. | |

Factor(DataFrame, Int32, DoubleMatrix, DoubleMatrix) | Factors the matrix contained in data into the product WH using an iterative method. The provided W and H are used as starting points for the iteration. | |

Factor(DoubleMatrix, Int32, DoubleMatrix, DoubleMatrix) | Factors the matrix contained in data into the product WH using an iterative method. The provided W and H are used as starting points for the iteration. | |

PercentExplainedVarianceFactors | Variance importance percent by factors. | |

PercentExplainedVarianceFullModel | Percentage of variance explained by the full model. |

Fields

Name | Description | |
---|---|---|

computeCostAtEachStep_ | If true, the error in the approximation will be computed after each iteration step. If false, only the final error will be computed. | |

cost_ | Cost. | |

H_ | H. | |

numIterations_ | Number of iterations. | |

stepCost_ | Step cost. | |

updateAlgorithm_ | The update algorithm. | |

V_ | V. | |

W_ | W. |

Remarks

Users can choose the number of iterations, whether the cost
is computed at each step, and the update algorithm.

See Also