Exploratory Nodes
Summary
Reference: nodes for exploring data without targets — PCA, clustering, peak finding, and related diagnostics.
Exploratory nodes reveal structure before supervised modeling.
PCA, Decomposition, and Curve Resolution
New PCA starters apply scaling inside PCA: mean-centering for spectra and
unit-variance scaling for feature tables. Component reconstruction CV fits those
statistics separately in each training fold. Source-inclusion curation defines
the analysis population; it is not a learned transform. Existing workflows with
upstream fitted scalers remain unchanged and cannot claim automatic fold-local
replay. Reconstruction CV is a development diagnostic, not independent test
performance or response-prediction error.
model.pca: Explore variance, scores, loadings, outliers, and compressed features. Uses Sherpa's native exact full-SVD authority. n_components="mle" uses Minka's automatic dimensionality method and requires n_samples >= n_features. Keep scaling choices consistent with your spectroscopy convention.
model.pca_transform: Project new spectra into an already fitted PCA model. Use the same preprocessing as the fitted PCA model.
model.nmf: Resolve non-negative concentration-like and spectrum-like factors. Input must be non-negative; use Clip Floor or baseline correction first if needed.
model.ica: Blind source separation when independent latent sources are plausible.
model.parafac: Resolve components in sample-first or spatial-first multiway data while keeping every physical mode distinct. Input rank is 3–6 with explicit mode roles. Uses deterministic native CP-ALS. A three-mode image cube may carry an exact binary mask over its first two spatial modes; every ALS update and the reconstruction error honor that mask. No hidden unfolding is performed.
model.mcr_als: Resolve mixture concentration profiles and pure spectra with constraints. Requires SpectroChemPy.
model.efa: Estimate evolving rank/component count in ordered mixture or process data. Requires SpectroChemPy.
model.simplisma: Estimate pure variables/components by purity maximization. Requires SpectroChemPy.
MCR and FastICA application also require the recorded feature axis and signal
identity; refit older states that lack this information.
PCA rejects requested components whose eigenvalues are at or below 1e-12
times the largest retained eigenvalue. Reduce n_components to the resolved
numerical rank. PCA and outlier screening use this same relative tolerance and
the same T² calculation, without an absolute eigenvalue floor. Calibration T²
uses the Jackson F limit without the new-sample mean-uncertainty factor. Q uses
the Jackson–Mudholkar residual-spectrum limit, with an explicitly reported
chi-squared moment fallback if the JM shape parameter is nonpositive. When all feature
directions are retained, Q is zero because no orthogonal residual space remains;
floating-point reconstruction error alone does not create Q outliers.
PCA Transform requires the fitted signal units, quantity, and measurement mode
as well as the fitted feature axis. Explicitly convert incompatible inputs and
refit PCA states created before this input identity was recorded.
Library comparison also requires matching signal units, quantity, and measurement
mode before similarity scoring. Convert percent transmittance to absorbance
explicitly when comparing against an absorbance library.
SpectroChemPy's MCR-ALS and baseline documentation are useful background for constrained curve-resolution thinking: https://www.spectrochempy.fr/0.7.0/userguide/analysis/mcr_als.html and https://www.spectrochempy.fr/0.8.3/userguide/processing/baseline.html.
PARAFAC is deliberately an expert-only canvas node in 0.6.0: no analysis
starter references it. A supported pixels-by-features Eigenvector image DSO
exposes a second, explicitly named image-cube scientific result. Select that
result and add model.parafac manually. The exact IASIM16 Test 1 source has a
private, data-free qualification receipt, but that exploratory decomposition
does not establish melamine detection or challenge performance.
Clustering
model.hca: Build hierarchical clusters and dendrograms from spectra or scores. Ward linkage expects Euclidean distance.
model.kmeans: Partition samples into a chosen number of compact clusters.
model.dbscan: Find density-based clusters and noise/outlier samples. Tune eps carefully after scaling.
Peak and Library Nodes
analysis.peak_finding: Detect candidate spectral peaks for interpretation, masking, or library workflows. Detection controls mirror SciPy find_peaks; consensus tolerance groups detections by their axis position.
analysis.compare_library: Rank a sample against selected reference spectra using HQI and cosine similarity.
PeakTable includes the numbered consensus group, position statistics, detection fraction, labels, and complete detection membership. The former Salient Features port is consolidated into this table; existing editable-workflow connections migrate automatically, while historical run records remain unchanged. Re-run the workflow after upgrading to generate the merged table.
For each spectrum, the measurement matrix contains four columns per consensus group: peak_position_N, magnitude_at_peak_N, group_position_N, and magnitude_at_group_position_N. An undetected peak leaves the first two values missing; the nearest measured coordinate to the consensus guide and its magnitude remain available. Connect either table to Data Table and use Quick Plot's Column selector to plot any scalar column against its one-based row index. A downstream Plot node offers the same column choice. Missing values remain gaps, text values use a categorical axis, and nested membership lists should be inspected in Data View.
SciPy documents the find_peaks controls for height, threshold, distance, prominence, and width here: https://docs.scipy.org/doc/scipy-1.16.0/reference/generated/scipy.signal.find_peaks.html.
Numeric editors preserve typed decimals and scientific notation. They do not round
values to the suggested step or clamp them to a bound. Invalid entries remain
visible and block execution. Blank optional inputs are saved as null, which
becomes Python None.
| Field |
Effective meaning |
| Height |
Blank: height=None, no height filter. Otherwise a minimum in response units. |
| Threshold |
Blank: threshold=None, no neighbor-threshold filter. Otherwise in response units. |
| Distance |
Clearing it passes distance=None. Legacy 0 also explicitly disables it; other values must be at least 1 sample point. See the generated reference for the new-node default. |
| Prominence |
Blank: prominence=None, no prominence filter. Otherwise in response units. |
| Width |
Blank: width=None. Legacy 0 also explicitly disables the filter. Otherwise minimum half-prominence width in sample points. |
| Consensus tolerance |
Zero groups only identical positions. Positive values set the maximum consensus-bin span in feature-axis units. This is a Sherpa postprocessing setting, not a SciPy argument. See the generated reference for its default and admission metadata. |
New results retain the exact scipy.signal.find_peaks keyword arguments, including
wlen=None, rel_height=0.5, and plateau_size=None, together with the SciPy
version. Executed peak-finding inputs shows the retained call in both the
Inspector and expanded view. It describes the result's execution, independently
of subsequent edits to the settings. Historical results without that record are
explicitly marked unavailable; current settings are not used to reconstruct it.
Reported widths are measured separately using
scipy.signal.peak_widths(spectrum, indices, rel_height=0.5, prominence_data=None, wlen=None)
and mapped to the feature axis. To reproduce a run, use the same upstream spectral
matrix, axis and sample ordering as well as the recorded calls and version.
Consensus markers and full-height dotted vertical guides are visible in new plots.
Rerun Peak Finding to obtain these guides and the new matrix; historical run outputs are unchanged.
The Per-spectrum Peak Matrix output connects directly to Data Table. It retains
one row per spectrum and four columns for each consensus group x (numbered from 1
in ascending consensus-position order): peak_position_x, magnitude_at_peak_x,
group_position_x, and magnitude_at_group_position_x. The first pair is NaN when
no peak was detected for that spectrum. The second pair always uses the measured
feature coordinate nearest the consensus guide and its actual magnitude, without
interpolation. Equidistant coordinates use the lower coordinate. If a spectrum has
multiple detections within one group, the nearest detection to the guide supplies
the first pair (ties use the lower position); all detections remain in Peak List.
Column-specific units and the exact guide positions are retained as metadata.
The original Peak List remains the consensus/membership summary; connect the
new matrix output for a rectangular per-spectrum table and CSV export. Data Table's
Quick Plot offers each numeric column separately, with null detections left as gaps.
Practical Use
Use exploratory nodes to understand variation, outliers, clusters, pure-component estimates, and candidate spectral features before locking in a calibration or classification model. Prefer scores plots for sample structure, loadings or coefficients for variable interpretation, and residual/limit plots for model adequacy.
LLM-assisted peak interpretation is available through the privacy-gated Sherpa Advisor conversation after deterministic Peak Finding. Advisor responses are human-reviewed interpretation, not canonical DAG execution or independently reproducible scientific evidence.
The Q limit follows Eigenvector's residual-limit convention,
and the calibration T² limit follows its documented F formula.
These are model-based screening limits, not robust-fit guarantees or independent validation.
Registry reference
Generated from registered node metadata. Edit methodology and examples outside the marked section.
Defaults and options below are JSON values; null means no concrete default is declared.
Internal parameters are retained for contract inspection and are not scientist-editable controls.
Conditional visibility describes the editor; execution admission remains node-owned.
| Node |
Operation |
| Compare vs. Library |
analysis.compare_library |
| Peak Finding |
analysis.peak_finding |
| Fit DBSCAN Clustering |
model.dbscan |
| Fit EFA Decomposition |
model.efa |
| Fit HCA Clustering |
model.hca |
| Fit FastICA Decomposition |
model.ica |
| Fit K-Means Clustering |
model.kmeans |
| Fit MCR-ALS Decomposition |
model.mcr_als |
| Fit NMF Decomposition |
model.nmf |
| Fit PARAFAC Decomposition |
model.parafac |
| Fit PCA Transform |
model.pca |
| Apply PCA Transform |
model.pca_transform |
| Fit SIMPLISMA Pure Components |
model.simplisma |
Compare vs. Library (analysis.compare_library)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
sample |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
["X_spectra"] |
| input |
library |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
["X_spectra"] |
| output |
default |
spectrasherpa://types/Comparison/1.0 |
true |
false |
[] |
| output |
data |
spectrasherpa://types/Any/1.0 |
true |
false |
[] |
| output |
metadata |
spectrasherpa://types/Any/1.0 |
true |
false |
[] |
| output |
ranking |
spectrasherpa://types/Comparison/1.0 |
true |
false |
[] |
| output |
hqi_report |
spectrasherpa://types/Comparison/1.0 |
true |
false |
[] |
| output |
best_matches |
spectrasherpa://types/Comparison/1.0 |
true |
false |
[] |
| output |
plots |
spectrasherpa://types/Visualization/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
top_n |
number |
false |
10 |
— |
{"max_value": 10000, "min_value": 1, "step": 1} |
{"category": "basic"} |
Number of ranked library species to report for each sample spectrum Bounds ranking output size and pairwise local-worker cost. |
library_filter |
text |
false |
"" |
— |
— |
{"category": "basic"} |
Optional comma-separated library labels to compare; blank compares all library spectra |
hqi_mode |
select |
false |
"whole_spectrum" |
["whole_spectrum", "band_limited"] |
— |
{"category": "basic"} |
Whole-spectrum uses conventional full-overlap HQI. Band-limited uses library diagnostic bands scaled by each band peak, which is better for multi-component mixture screening. |
diagnostic_band_threshold |
number |
false |
0.2 |
— |
{"max_value": 1, "min_value": 0, "step": 0.01} |
{"category": "basic"} |
Library relative peak threshold used to define band-limited HQI regions A relative diagnostic-band threshold is a fraction of the library peak. |
hqi_accept_threshold |
number |
false |
750 |
— |
{"max_value": 1000, "min_value": 0, "step": 1} |
{"category": "basic"} |
Mark candidates at or above this HQI as auto-selected for review The declared HQI scale spans zero through 1000. |
hqi_reject_threshold |
number |
false |
500 |
— |
{"max_value": 1000, "min_value": 0, "step": 1} |
{"category": "basic"} |
If a sample's best HQI is below this value, mark every candidate for that sample as rejected The declared HQI scale spans zero through 1000. |
min_overlap_coverage |
number |
false |
0.5 |
— |
{"max_value": 1, "min_value": 0, "step": 0.05} |
{"category": "basic"} |
Minimum fraction of both spectra's x-axis span required before strong or excellent HQI labels are allowed Overlap coverage is a fraction of each spectrum's measured span. |
min_overlap_points |
number |
false |
20 |
— |
{"max_value": 1000000, "min_value": 2, "step": 1} |
{"category": "basic"} |
Minimum matched x-axis points required before strong or excellent HQI labels are allowed Bounds resampled vectors and pairwise local-worker memory. |
baseline_gap_threshold |
number |
false |
0.25 |
— |
{"max_value": 2, "min_value": 0, "step": 0.05} |
{"category": "basic"} |
Flag matches where uncentered cosine exceeds Pearson correlation by this amount, suggesting baseline or offset dominance The maximum gap between two similarities on [-1, 1] is two. |
Peak Finding (analysis.peak_finding)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
peaks |
spectrasherpa://types/PeakTable/1.0 |
true |
false |
[] |
| output |
plots |
spectrasherpa://types/Visualization/1.0 |
true |
false |
[] |
| output |
per_spectrum |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
height |
number |
false |
null |
— |
{"min_value": 0.0, "step": 0.01} |
{"category": "basic"} |
Minimum peak height in response units. Blank passes height=None (no height filter). |
threshold |
number |
false |
null |
— |
{"min_value": 0.0, "step": 0.01} |
{"category": "basic"} |
Minimum vertical distance to neighbors in response units. Blank passes threshold=None. |
distance |
number |
false |
10 |
— |
{"min_value": 0, "step": 1} |
{"category": "basic"} |
Minimum horizontal distance in sample points (default 10). Blank or 0 passes distance=None (disabled); otherwise must be >= 1. |
prominence |
number |
false |
null |
— |
{"min_value": 0.0, "step": 0.01} |
{"category": "basic"} |
Minimum prominence in response units. Blank passes prominence=None (no prominence filter). |
width |
number |
false |
null |
— |
{"min_value": 0, "step": 1} |
{"category": "basic"} |
Minimum width at half prominence in sample points. Blank or 0 passes width=None (no width filter). |
consensus_tolerance |
number |
true |
0.0 |
— |
{"min_value": 0.0, "step": 0.1} |
{"category": "basic"} |
Maximum span of one cross-sample consensus bin in feature-axis units; enter 0 to group only identical positions. Required; not a SciPy find_peaks argument. |
Fit DBSCAN Clustering (model.dbscan)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/Array2D/1.0 |
true |
false |
["X_spectra", "X_features"] |
| output |
default |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
model |
spectrasherpa://types/FittedModel/1.0 |
true |
false |
[] |
| output |
labels |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
cluster_assignment |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
cluster_summary |
spectrasherpa://types/Any/1.0 |
true |
false |
[] |
| output |
embedding |
spectrasherpa://types/Array2D/1.0 |
true |
false |
[] |
| output |
visualization |
spectrasherpa://types/Visualization/1.0 |
true |
false |
[] |
| output |
n_clusters |
spectrasherpa://types/Scalar/1.0 |
true |
false |
[] |
| output |
metadata |
spectrasherpa://types/Any/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
eps |
number |
true |
0.5 |
— |
{"min_value": 0.01, "step": 0.01} |
{"category": "basic"} |
Neighborhood radius |
min_samples |
number |
true |
5 |
— |
{"max_value": 100000, "min_value": 2, "step": 1} |
{"category": "basic"} |
Minimum samples within the neighborhood radius, including the point itself, for a core point. This is not a minimum cluster-size filter. Points not density-connected to a core point are labeled noise. Bounds neighborhood support bookkeeping to a finite cohort-scale request. |
metric |
select |
false |
"euclidean" |
["euclidean", "manhattan", "cosine"] |
— |
{"category": "advanced"} |
Distance metric |
Fit EFA Decomposition (model.efa)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
forward_eigenvalues |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
backward_eigenvalues |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_components |
number |
false |
10 |
— |
{"max_value": 500, "min_value": 1, "step": 1} |
{"category": "basic"} |
Number of components to compute Bound exploratory rank and memory use on local workbench data |
Fit HCA Clustering (model.hca)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/Array2D/1.0 |
true |
false |
["X_spectra", "X_features"] |
| output |
default |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
model |
spectrasherpa://types/FittedModel/1.0 |
true |
false |
[] |
| output |
labels |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
cluster_assignment |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
cluster_summary |
spectrasherpa://types/Any/1.0 |
true |
false |
[] |
| output |
linkage_matrix |
spectrasherpa://types/Array2D/1.0 |
true |
false |
[] |
| output |
dendrogram_data |
spectrasherpa://types/Visualization/1.0 |
true |
false |
[] |
| output |
embedding |
spectrasherpa://types/Array2D/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_clusters |
number |
true |
3 |
— |
{"max_value": 500, "min_value": 2, "step": 1} |
{"category": "basic"} |
Number of clusters to form Bounds the quadratic hierarchy and scientist-facing dendrogram output. |
linkage |
select |
false |
"ward" |
[{"label": "Ward", "value": "ward"}, {"label": "Average", "value": "average"}, {"label": "Complete", "value": "complete"}, {"label": "Single", "value": "single"}] |
— |
{"category": "basic"} |
Linkage criterion |
metric |
select |
false |
"euclidean" |
[{"label": "Euclidean", "value": "euclidean"}, {"label": "Manhattan", "value": "manhattan"}, {"label": "Cosine", "value": "cosine"}] |
— |
{"category": "advanced"} |
Distance metric (ward requires euclidean) |
Fit FastICA Decomposition (model.ica)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
model |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
fitted_state |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
sources |
spectrasherpa://types/ScoreMatrix/1.0 |
true |
false |
[] |
| output |
components |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
mixing_matrix |
spectrasherpa://types/Array2D/1.0 |
true |
false |
[] |
| output |
unmixing_matrix |
spectrasherpa://types/Array2D/1.0 |
true |
false |
[] |
| output |
residuals |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_components |
number |
true |
3 |
— |
{"max_value": 50, "min_value": 2, "step": 1} |
{"category": "basic"} |
Bounds whitening and fixed-point solver cost. |
algorithm |
select |
false |
"parallel" |
["parallel", "deflation"] |
— |
{"category": "advanced"} |
— |
fun |
select |
false |
"logcosh" |
["logcosh", "exp", "cube"] |
— |
{"category": "advanced"} |
— |
whiten |
select |
false |
"unit-variance" |
["unit-variance", "arbitrary-variance"] |
— |
{"category": "advanced"} |
— |
max_iter |
number |
false |
400 |
— |
{"max_value": 2000, "min_value": 50, "step": 50} |
{"category": "advanced"} |
Bounds fixed-point solver cost. |
tol |
number |
false |
0.0001 |
— |
{"min_value": 1e-08, "step": 0.0001} |
{"category": "advanced"} |
— |
random_seed |
number |
false |
42 |
— |
{"max_value": 2147483647, "min_value": 0, "step": 1} |
{"category": "advanced"} |
Matches the deterministic 32-bit solver seed domain. |
Fit K-Means Clustering (model.kmeans)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/Array2D/1.0 |
true |
false |
["X_spectra", "X_features"] |
| output |
default |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
model |
spectrasherpa://types/FittedModel/1.0 |
true |
false |
[] |
| output |
labels |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
cluster_assignment |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
cluster_summary |
spectrasherpa://types/Any/1.0 |
true |
false |
[] |
| output |
centroids |
spectrasherpa://types/Array2D/1.0 |
true |
false |
[] |
| output |
embedding |
spectrasherpa://types/Array2D/1.0 |
true |
false |
[] |
| output |
visualization |
spectrasherpa://types/Visualization/1.0 |
true |
false |
[] |
| output |
inertia |
spectrasherpa://types/Scalar/1.0 |
true |
false |
[] |
| output |
n_clusters |
spectrasherpa://types/Scalar/1.0 |
true |
false |
[] |
| output |
metadata |
spectrasherpa://types/Any/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_clusters |
number |
true |
3 |
— |
{"max_value": 500, "min_value": 2, "step": 1} |
{"category": "basic"} |
Number of clusters to form Bounds K-means memory, fit cost, and the scientist-facing centroid table. |
n_init |
number |
false |
10 |
— |
{"max_value": 100, "min_value": 1, "step": 1} |
{"category": "advanced"} |
Number of k-means initializations Bounds repeated K-means fits while preserving robust multi-start use. |
max_iter |
number |
false |
300 |
— |
{"max_value": 10000, "min_value": 1, "step": 50} |
{"category": "advanced"} |
Maximum iterations per initialization Bounds one initialization's iterative work and recorded convergence budget. |
random_state |
number |
false |
42 |
— |
{"max_value": 4294967295, "min_value": 0, "step": 1} |
{"category": "advanced"} |
Random seed for reproducibility Matches the closed unsigned 32-bit seed domain used by the fitted implementation. |
Fit MCR-ALS Decomposition (model.mcr_als)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
model |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
fitted_state |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
C |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
St |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
residuals |
spectrasherpa://types/SpectralDataset/1.0 |
false |
false |
[] |
| output |
ground_truth_comparison |
spectrasherpa://types/ValidationResult/1.0 |
false |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_components |
number |
true |
3 |
— |
{"max_value": 50, "min_value": 2, "step": 1} |
{"category": "basic"} |
Number of pure components to resolve Bounds SVD initialization and alternating least-squares cost. |
non_negative_C |
boolean |
false |
true |
— |
— |
{"category": "basic"} |
Enforce non-negative concentration profiles |
non_negative_St |
boolean |
false |
true |
— |
— |
{"category": "advanced"} |
Enforce non-negative spectra |
max_iter |
number |
false |
200 |
— |
{"max_value": 2000, "min_value": 10, "step": 10} |
{"category": "advanced"} |
Maximum ALS iterations. Raised from 50 → 200 in v0.4.3 to give the tighter default tolerance (1e-5) room to converge on typical spectra. Bounds alternating least-squares work in the interactive runtime. |
tol |
number |
false |
1e-05 |
— |
{"min_value": 1e-08, "step": 1e-06} |
{"category": "advanced"} |
Relative change in St between successive ALS iterations at which the solver stops. Lowered from 0.1 → 1e-5 in v0.4.3 to match mdatools / pyMCR convention; values >1e-3 emit a 'loose-tolerance' warning. References: Tauler et al. (Chemom. Intell. Lab. Syst. 1995); pyMCR uses 1e-5, mdatools `mcrals()` uses 1e-6. |
normSpec |
select |
false |
"euclid" |
[{"label": "Euclidean norm", "value": "euclid"}, {"label": "Maximum intensity", "value": "max"}, {"label": "None", "value": "none"}] |
— |
{"category": "advanced"} |
Normalize resolved pure spectra during MCR-ALS. Euclidean normalization stabilizes the concentration/spectrum scale ambiguity for shape comparison. |
validation_target_index |
number |
false |
1 |
— |
{"min_value": 1, "step": 1} |
{"category": "validation"} |
1-based ground-truth concentration column to compare. Only this user-selected target is emitted to ValidationResult. |
validation_component_index |
number |
false |
1 |
— |
{"min_value": 1, "step": 1} |
{"category": "validation"} |
1-based recovered MCR concentration profile to compare against the selected target. MCR component matching is intentionally user-controlled. |
Fit NMF Decomposition (model.nmf)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
model |
spectrasherpa://types/FittedModel/1.0 |
true |
false |
[] |
| output |
concentrations |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
spectra |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
reconstruction_error |
spectrasherpa://types/Scalar/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_components |
number |
true |
3 |
— |
{"max_value": 500, "min_value": 2, "step": 1} |
{"category": "basic"} |
Number of components to extract Bounds factor-state size and iterative decomposition cost. |
solver |
select |
false |
"mu" |
["mu", "cd"] |
— |
{"category": "advanced"} |
NMF solver: 'mu' (Multiplicative Update) or 'cd' (Coordinate Descent) |
max_iter |
number |
false |
200 |
— |
{"max_value": 10000, "min_value": 1, "step": 50} |
{"category": "advanced"} |
Maximum number of iterations Bounds the declared convergence budget. |
tol |
number |
false |
0.0001 |
— |
{"max_value": 0.1, "min_value": 1e-12, "step": 0.0001} |
{"category": "advanced"} |
Convergence tolerance Prevents a tolerance so loose that factorization stops without useful refinement. |
random_state |
number |
false |
42 |
— |
{"max_value": 4294967295, "min_value": 0, "step": 1} |
{"category": "advanced"} |
Seed for deterministic initialization and fixed-basis application Matches the closed unsigned 32-bit seed domain. |
Fit PARAFAC Decomposition (model.parafac)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
default |
spectrasherpa://types/ScoreMatrix/1.0 |
true |
false |
[] |
| output |
sample_scores |
spectrasherpa://types/ScoreMatrix/1.0 |
true |
false |
[] |
| output |
model |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
component_weights |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
relative_reconstruction_error |
spectrasherpa://types/Scalar/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_components |
number |
true |
3 |
— |
{"max_value": 20, "min_value": 1, "step": 1} |
{"category": "basic"} |
Bounds factor-state size and CP-ALS computation. |
max_iter |
number |
false |
200 |
— |
{"max_value": 500, "min_value": 1, "step": 10} |
{"category": "advanced"} |
Bounds deterministic CP-ALS execution time. |
tol |
number |
false |
1e-06 |
— |
{"max_value": 0.1, "min_value": 1e-10, "step": 1e-06} |
{"category": "advanced"} |
Prevents accepting a tolerance too loose for meaningful convergence. |
ridge |
number |
false |
1e-12 |
— |
{"max_value": 1.0, "min_value": 0.0, "step": 1e-12} |
{"category": "advanced"} |
Bounds regularization so it cannot dominate the decomposition. |
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/Array2D/1.0 |
true |
false |
["X_spectra", "X_features"] |
| output |
default |
spectrasherpa://types/ScoreMatrix/1.0 |
true |
false |
[] |
| output |
model |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
fitted_state |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
scores |
spectrasherpa://types/ScoreMatrix/1.0 |
true |
false |
[] |
| output |
X_scores |
spectrasherpa://types/ScoreMatrix/1.0 |
true |
false |
[] |
| output |
loadings |
spectrasherpa://types/LoadingMatrix/1.0 |
true |
false |
[] |
| output |
X_loadings |
spectrasherpa://types/LoadingMatrix/1.0 |
true |
false |
[] |
| output |
variable_correlations |
spectrasherpa://types/LoadingMatrix/1.0 |
true |
false |
[] |
| output |
explained_variance |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
eigenvalues |
spectrasherpa://types/Array1D/1.0 |
true |
false |
[] |
| output |
diagnostic_state |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
component_curve |
spectrasherpa://types/ValidationResult/1.0 |
true |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_components |
text |
true |
"2" |
— |
— |
{"category": "basic"} |
Number of components: integer (e.g., '2'), 'mle' (Minka maximum-likelihood automatic selection), or float 0-1 (e.g., '0.95' for 95% variance) Must be ≤ min(n_samples, n_features). The 'mle' choice additionally requires n_samples ≥ n_features. This is checked at execution time — a value that is too large will raise an error. Use '0.95' to automatically retain enough components for 95% explained variance. |
standardized |
boolean |
false |
false |
— |
— |
{"category": "basic"} |
Subtract the column mean AND divide by column standard deviation before PCA (full standardization). Use when variables have different units or scales, e.g. mixing spectral and non-spectral predictors. |
scaled |
boolean |
false |
false |
— |
— |
{"category": "advanced"} |
Apply min-max scaling, (X - column minimum) / column range, then center the scaled variables before PCA. Rarely appropriate for spectral data — prefer 'Mean Center + Unit Variance' or leave both off to use mean-centering only (the spectroscopy default). |
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
X_new |
spectrasherpa://types/Array2D/1.0 |
true |
false |
["X_spectra", "X_features"] |
| input |
model |
spectrasherpa://types/DecompositionResult/1.0 |
true |
false |
[] |
| output |
default |
spectrasherpa://types/ScoreMatrix/1.0 |
true |
false |
[] |
| output |
scores |
spectrasherpa://types/ScoreMatrix/1.0 |
true |
false |
[] |
Parameters
No parameters.
Fit SIMPLISMA Pure Components (model.simplisma)
Ports
| Direction |
Port |
Type URI |
Required |
Variadic |
Accepted data roles |
| input |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
default |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
concentrations |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
spectra |
spectrasherpa://types/SpectralDataset/1.0 |
true |
false |
[] |
| output |
purity_values |
spectrasherpa://types/Array1D/1.0 |
false |
false |
[] |
Parameters
| Parameter |
Editor type |
Required |
Default |
Options / enum |
Bounds / step |
Visibility / category |
Description |
n_components |
number |
true |
3 |
— |
{"max_value": 500, "min_value": 2, "step": 1} |
{"category": "basic"} |
Number of pure components to resolve Bound local decomposition rank and memory use |
tol |
number |
false |
0.1 |
— |
{"max_value": 100.0, "min_value": 0.001, "step": 0.01} |
{"category": "advanced"} |
Convergence tolerance Closed percentage tolerance accepted by SpectroChemPy SIMPLISMA |
noise |
number |
false |
3.0 |
— |
{"max_value": 15.0, "min_value": 0.0, "step": 0.1} |
{"category": "advanced"} |
Noise level for purity calculation SpectroChemPy documents the SIMPLISMA noise range as 0-15 percent |
MCR spectral truth alignment
Pure-spectrum recovery scores require a retained physical axis with compatible
quantity and units. A reversed axis is reconciled by reversing its truth
spectra as well. Machine-level float roundoff is accepted within four ULPs;
this is not a tolerance for experimental resolution or a rounded report.
No interpolation or inferred unit conversion is performed. Missing, shifted
or ambiguous coordinates leave spectral truth scoring unavailable, with a
visible reason in Quick Plot and Detailed View. Other MCR results remain
available. Retained comparison metadata records the alignment used.