agentsclimarketplace

Lc gradient vector encoding and decoding

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/lc-gradient-vector-encoding-and-decoding

Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill lc-gradient-vector-encoding-and-decoding

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when when preparing LC gradient configurations for Bayesian optimization, or when converting predicted optimal vectors back into actionable LC instrument parameters. Specifically, use this skill when you have a set of gradient parameters to optimize (e.

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

8.0 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

LC-gradient vector encoding and decoding

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Converts between human-readable LC gradient parameters (e.g., flow rate, solvent composition, temperature profiles) and normalized numerical vectors suitable for Bayesian optimization and Gaussian Process regression. This bidirectional transformation enables efficient exploration of high-dimensional gradient space while preserving chemical interpretability.

When to use

When preparing LC gradient configurations for Bayesian optimization, or when converting predicted optimal vectors back into actionable LC instrument parameters. Specifically, use this skill when you have a set of gradient parameters to optimize (e.g., initial/final %B, flow rate, column temperature) and need to represent them as scaled numeric vectors for GP model training, or conversely when a BO acquisition function has proposed a point in normalized vector space and you need to retrieve the corresponding unscaled gradient parameters for experimental execution.

When NOT to use

  • Input is already a validated, experiment-ready gradient configuration and no optimization is planned.
  • Gradient parameters follow categorical or nominal logic (e.g., column choice, detector type) rather than continuous numeric ranges.
  • Search space bounds are not well-defined or parameters have non-standard units that cannot be normalized consistently.

Inputs

  • Raw gradient parameter set (e.g., dict or structured object with %B_initial, %B_final, flow_rate, temperature, etc.)
  • Parameter bounds and units (lower/upper limits for each dimension)
  • Fitted scaler object (sklearn.preprocessing.StandardScaler or equivalent) from training data
  • Grid search space (gridX) or predicted vector from acquisition function

Outputs

  • Encoded vector (normalized numeric array, typically shape (n_parameters,), scaled to 0–1 range)
  • Decoded gradient parameters (human-readable dict or object with original units and physical meaning)
  • Scaler/transformer object (for reproducible forward and inverse transformations)

How to apply

First, define the bounds and units for each gradient parameter (e.g., %B solvent composition from 5–95%, flow rate in mL/min, temperature in °C). Encode gradient configurations into scaled numeric vectors by normalizing each parameter to a standard range (typically 0–1) using min-max scaling or similar transformation; store the scaler object for later inversion. Use these encoded vectors as inputs to the GP model and search space generation (genSearchSpace). When the acquisition function identifies a promising point in vector space, retrieve the corresponding unscaled gradient by applying the inverse transformation, then validate that decoded parameters fall within physically meaningful instrument limits before proposing them as the next experimental run. The encoding scheme should preserve the chemical semantics of the parameter space (e.g., solvent composition as continuous, not categorical).

Related tools

  • scikit-learn (Provides StandardScaler for normalizing gradient parameters to 0–1 range and inverse transformation to recover original units)
  • BAGO (Bayesian optimization framework that accepts encoded gradient vectors and returns acquisition-function-selected proposals as normalized vectors) — https://github.com/huaxuyu/bago/
  • bago Python package (Implements genSearchSpace and fit functions that operate on encoded gradient vectors within the BO workflow) — https://github.com/huaxuyu/bago

Examples

from sklearn.preprocessing import StandardScaler; import numpy as np; scaler = StandardScaler(); gradient_raw = np.array([[10, 90, 0.6, 30], [5, 95, 0.4, 25]]); gradient_encoded = scaler.fit_transform(gradient_raw); gradient_decoded = scaler.inverse_transform(gradient_encoded)

Evaluation signals

  • Encoded vectors lie within [0, 1] for all dimensions and are reproducible (same input → same output after scaler initialization).
  • Decoded parameters match original input values within numeric precision (e.g., < 1e-6 relative error) when scaler is applied and inverted.
  • Decoded parameters respect original bounds: %B_initial ≥ min_B and ≤ max_B, flow_rate ≥ min_flow, temperature ≥ min_temp, etc.
  • Encoding/decoding is consistent across multiple BO iterations: vectors proposed by the acquisition function decode to valid, distinct gradient configurations.
  • Scaler object state (mean, scale) is consistent and documented so that new test vectors can be encoded/decoded without drift.

Limitations

  • Encoding assumes parameter ranges are known and fixed a priori; dynamic or data-driven bounds are not explicitly addressed in the source material.
  • Non-linear parameter relationships or unit conversions (e.g., temperature-dependent viscosity effects) are not captured by simple linear scaling; domain knowledge may be needed to encode coupled parameters correctly.
  • The source article does not provide explicit guidance on handling ordinal or categorical parameters (e.g., column chemistry); continuous-only encoding is implied.
  • Scaler object must be saved and versioned alongside trained GP models to ensure reproducibility across BO iterations and experiments.

Evidence

  • [methods] Receive a trained gpModel object with fitted Gaussian process regression, scaled training data (scaledX), grid search space (gridX), and model uncertainty estimates: "Receive a trained gpModel object with fitted Gaussian process regression, scaled training data (scaledX), grid search space (gridX), and model uncertainty estimates (mean and variance predictions)."
  • [methods] Function to fit the data to Gaussian process regression model: "genSearchSpace - generate search space for Gaussian process model"
  • [methods] a :class:sklearn.preprocessing.StandardScaler object: "a :class:sklearn.preprocessing.StandardScaler object"
  • [methods] Retrieve the corresponding unscaled gradient from gridX and return as output: "Retrieve the corresponding unscaled gradient from gridX and return as output."
  • [readme] Omics-scale evaluation on compound separation - Separation efficiency was defined to evaluate the performance of a gradient: "Wonder how omics-scale evaluation is achieved? Read more about [encodings]"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.