Skip to main content

classify_ml

Function classify_ml 

Source
pub fn classify_ml(
    numeric_features: &[f64],
    title_meta: &str,
) -> (PageType, f64)
Expand description

Classify a web page using the ML model.

§Arguments

  • numeric_features - Raw (unscaled) numeric features. Must have length N_NUMERIC_FEATURES. The model handles scaling internally.
  • title_meta - Concatenated title + description text for TF-IDF features.

§Returns

(PageType, confidence) where confidence is in [0.0, 1.0].

§Panics

Panics if numeric_features.len() != N_NUMERIC_FEATURES.