[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
- Validates feature matrix dimensions
- Converts sparse matrices to dense
- Standardizes each feature set using StandardScaler
- Applies weights and combines matrices