Feature engineering

Source: Wikipedia, the free encyclopedia.

Feature engineering is a preprocessing step in

statistical modeling[1] which transforms raw data into a more effective set of inputs. Each input comprises several attributes, known as features. By providing models with relevant information, feature engineering significantly enhances their predictive accuracy and decision-making capability.[2][3][4]

Beyond machine learning, the principles of feature engineering are applied in various scientific fields, including physics. For example, physicists construct dimensionless numbers such as the Reynolds number in fluid dynamics, the Nusselt number in heat transfer, and the Archimedes number in sedimentation. They also develop first approximations of solutions, such as analytical solutions for the strength of materials in mechanics.[5]

Clustering

One of the applications of feature engineering has been clustering of feature-objects or sample-objects in a dataset. Especially, feature engineering based on matrix decomposition has been extensively used for data clustering under non-negativity constraints on the feature coefficients. These include Non-Negative Matrix Factorization (NMF),[6] Non-Negative Matrix-Tri Factorization (NMTF),[7] Non-Negative Tensor Decomposition/Factorization (NTF/NTD),[8] etc. The non-negativity constraints on coefficients of the feature vectors mined by the above-stated algorithms yields a part-based representation, and different factor matrices exhibit natural clustering properties. Several extensions of the above-stated feature engineering methods have been reported in literature, including orthogonality-constrained factorization for hard clustering, and manifold learning to overcome inherent issues with these algorithms.

Other classes of feature engineering algorithms include leveraging a common hidden structure across multiple inter-related datasets to obtain a consensus (common) clustering scheme. An example is Multi-view Classification based on Consensus Matrix Decomposition (MCMD),[2] which mines a common clustering scheme across multiple datasets. MCMD is designed to output two types of class labels (scale-variant and scale-invariant clustering), and:

  • is computationally robust to missing information,
  • can obtain shape- and scale-based outliers,
  • and can handle high-dimensional data effectively.

Coupled matrix and tensor decompositions are popular in multi-view feature engineering.[9]

Predictive modelling

Feature engineering in

correlation matrices.[10]

Features vary in significance.[11] Even relatively insignificant features may contribute to a model. Feature selection can reduce the number of features to prevent a model from becoming too specific to the training data set (overfitting).[12]

Feature explosion occurs when the number of identified features is too large for effective model estimation or optimization. Common causes include:

  • Feature templates - implementing feature templates instead of coding new features
  • Feature combinations - combinations that cannot be represented by a linear system

Feature explosion can be limited via techniques such as: regularization, kernel methods, and feature selection.[13]

Automation

Automation of feature engineering is a research topic that dates back to the 1990s.

automated feature engineering has been commercially available since 2016.[15]
Related academic literature can be roughly separated into two types:

Multi-relational decision tree learning (MRDTL)

Multi-relational Decision Tree Learning (MRDTL) extends traditional decision tree methods to

decision nodes, refined systematically until a specific termination criterion is reached.[14]

Most MRDTL studies base implementations on relational databases, which results in many redundant operations. These redundancies can be reduced by using techniques such as tuple id propagation.[16][17]

Open-source implementations

There are a number of open-source libraries and tools that automate feature engineering on relational data and time series:

  • featuretools is a Python library for transforming time series and relational data into feature matrices for machine learning.[18][19][20]
  • MCMD: An open-source feature engineering algorithm for joint clustering of multiple datasets . [21][2]
  • OneBM or One-Button Machine combines feature transformations and feature selection on relational data with feature selection techniques.[22]

    [OneBM] helps data scientists reduce data exploration time allowing them to try and error many ideas in short time. On the other hand, it enables non-experts, who are not familiar with data science, to quickly extract value from their data with a little effort, time, and cost.[22]

  • getML community is an open source tool for automated feature engineering on time series and relational data.[23][24] It is implemented in C/C++ with a Python interface.[24] It has been shown to be at least 60 times faster than tsflex, tsfresh, tsfel, featuretools or kats.[24]
  • tsfresh is a Python library for feature extraction on time series data.[25] It evaluates the quality of the features using hypothesis testing.[26]
  • tsflex is an open source Python library for extracting features from time series data.[27] Despite being 100% written in Python, it has been shown to be faster and more memory efficient than tsfresh, seglearn or tsfel.[28]
  • seglearn is an extension for multivariate, sequential time series data to the scikit-learn Python library.[29]
  • tsfel is a Python package for feature extraction on time series data.[30]
  • kats is a Python toolkit for analyzing time series data.[31]

Deep feature synthesis

The deep feature synthesis (DFS) algorithm beat 615 of 906 human teams in a competition.[32][33]

Feature stores

The feature store is where the features are stored and organized for the explicit purpose of being used to either train models (by data scientists) or make predictions (by applications that have a trained model). It is a central location where you can either create or update groups of features created from multiple different data sources, or create and update new datasets from those feature groups for training models or for use in applications that do not want to compute the features but just retrieve them when it needs them to make predictions.[34]

A feature store includes the ability to store code used to generate features, apply the code to raw data, and serve those features to models upon request. Useful capabilities include feature versioning and policies governing the circumstances under which features can be used.[35]

Feature stores can be standalone software tools or built into machine learning platforms.

Alternatives

Feature engineering can be a time-consuming and error-prone process, as it requires domain expertise and often involves trial and error.[36][37] Deep learning algorithms may be used to process a large raw dataset without having to resort to feature engineering.[38] However, deep learning algorithms still require careful preprocessing and cleaning of the input data.[39] In addition, choosing the right architecture, hyperparameters, and optimization algorithm for a deep neural network can be a challenging and iterative process.[40]

See also

References

  1. .
  2. ^ .
  3. .
  4. .
  5. .
  6. .
  7. .
  8. ].
  9. .
  10. ^ "Feature engineering - Machine Learning Lens". docs.aws.amazon.com. Retrieved 2024-03-01.
  11. ^ "Feature Engineering" (PDF). 2010-04-22. Retrieved 12 November 2015.
  12. ^ "Feature engineering and selection" (PDF). Alexandre Bouchard-Côté. October 1, 2009. Retrieved 12 November 2015.
  13. ^ "Feature engineering in Machine Learning" (PDF). Zdenek Zabokrtsky. Archived from the original (PDF) on 4 March 2016. Retrieved 12 November 2015.
  14. ^ .
  15. ^ "Its all about the features". Reality AI Blog. September 2017.
  16. S2CID 1183403
    .
  17. .
  18. ^ "What is Featuretools?". Retrieved September 7, 2022.
  19. ^ "Featuretools - An open source python framework for automated feature engineering". Retrieved September 7, 2022.
  20. ^ "github: alteryx/featuretools". GitHub. Retrieved September 7, 2022.
  21. ^ Sharma, Shubham, mcmd: Multi-view Classification framework based on Consensus Matrix Decomposition developed by Shubham Sharma at QUT, retrieved 2024-04-14
  22. ^ ].
  23. ^ "getML documentation". Retrieved September 7, 2022.
  24. ^ a b c "github: getml/getml-community". GitHub. Retrieved September 7, 2022.
  25. ^ "tsfresh documentation". Retrieved September 7, 2022.
  26. ^ "Time Series FeatuRe Extraction on basis of Scalable Hypothesis tests (tsfresh – A Python package)". Retrieved September 7, 2022.
  27. ^ "predict-idlab/tsflex". GitHub. Retrieved September 7, 2022.
  28. S2CID 244527198
    . Retrieved September 7, 2022.
  29. ^ "seglearn user guide". Retrieved September 7, 2022.
  30. ^ "Welcome to TSFEL documentation!". Retrieved September 7, 2022.
  31. ^ "github: facebookresearch/Kats". GitHub. Retrieved September 7, 2022.
  32. ^ "Automating big-data analysis". 16 October 2015.
  33. S2CID 206610380
    .
  34. ^ "What is a feature store". Retrieved 2022-04-19.
  35. ^ "An Introduction to Feature Stores". Retrieved 2021-04-15.
  36. ^ "Feature Engineering in Machine Learning". Engineering Education (EngEd) Program | Section. Retrieved 2023-03-21.
  37. ^ explorium_admin (2021-10-25). "5 Reasons Why Feature Engineering is Challenging". Explorium. Retrieved 2023-03-21.
  38. OCLC 1064776283.{{cite book}}: CS1 maint: location missing publisher (link
    )
  39. .
  40. , retrieved 2023-03-21

Further reading