[function] combine_features() - P3chys/textmining GitHub Wiki

3. Feature Combination and Analysis

Function: combine_features()

Purpose

Combines multiple feature matrices with optional weighting and standardization.

Syntax

combine_features(features_list, weights=None)

Parameters

Parameter Type Default Description
features_list list Required List of feature matrices
weights list None Weights for each feature set

Returns

  • numpy.ndarray: Combined and standardized feature matrix

Algorithm

  1. Validates feature matrix dimensions
  2. Converts sparse matrices to dense
  3. Standardizes each feature set using StandardScaler
  4. Applies weights and combines matrices