Sklearn NMF icon

Sklearn NMF

Non-negative Matrix Factorization for dimensionality reduction

Fit Transform

AI-generated

Summary

Fit NMF on selected feature columns and return transformed data with component metadata

Inputs

  • featureColumns (required) — Comma‑separated list of feature column names (must be non‑negative)
  • nComponents — Number of components to extract
  • init — Method for initialization
  • maxIter — Maximum number of iterations
  • randomState — Random seed for reproducibility
  • pythonPath — Path to Python executable with scikit‑learn installed

Output shape

A list of items extending each input record with NMF transformed values and metadata (e.g., nmf_component_X, nmf, reconstruction_error, n_iterations)

The shape may vary between fitTransform and transform; fitTransform adds component fields and summary stats, transform only adds transformed values.

Examples

Example 1: Fit NMF on three feature columns and obtain transformed data

featureColumns="col1,col2,col3", nComponents=4, init="nndsvda", maxIter=200, randomState=42, pythonPath="python3"

Example 2: Transform new data using a previously fitted NMF model

nmfData=, transformFeatureColumns="col1,col2", pythonPath="python3"

Discussion