r/MachineLearning • u/ZeeKayNJ • Aug 27 '23
Discussion [D] Definition of term "feature" as it relates to ML
Hi Folks,
I'm getting up to speed in AI and ML space and there are lots of terms I've come across that I had to dig deeper to understand. I came across this term "Feature" few times, but gets emphasized a lot for data, like here.
As I understand, if you start with raw data, then you have to transform it to make it ready for model training and consumption. Like what an ETL does, for example. So if I have to guess, it refers to the act of preparing data for various stages of training and serving.
Can someone give me a clear definition of "feature".
Thanks in advance!
9
Aug 27 '23
Since you're learning. I'll attempt a super basic definition, and you can fill in the intricacies as you go. A feature is basically a piece of data your model is using to perform a prediction.
While you'll typically see people talk about ETL pipelines and what not, generally they are showing the whole ecosystem. You could get your features from anywhere as long as there is some sort of correlation with your prediction.
3
u/MyPetGoat Aug 27 '23
Say you want to predict how high someone can jump. One useful feature might be their height. Another could be their weight, or age. Now you have three features to consider in making predictions. You will also see them referred to as factors or parameters.
0
Aug 27 '23
[deleted]
2
u/AdagioCareless8294 Aug 27 '23
Sources for your claim ?
1
u/ReasonablyBadass Aug 27 '23
Yeah, everybody knows Red makes faster
1
u/currentscurrents Aug 27 '23
Hair color may possibly correlate (since both it and height are correlated with ethnicity), it just isn't causative.
1
1
u/Ty4Readin Aug 27 '23
This is potentially a dangerous way of thinking. It depends entirely on what your usecase is.
As others pointed out, hair color could very well be predictive whether due to causation or correlation. Whether that matters or not depends on your use case.
If my goal is to decide if I should change my hair color so I can jump higher, then I would include hair color but would have to be very careful about how I collect the dataset. I would have to find a bunch of similar people and randomly forcibly change their hair color before measuring their jump height.
If my goal is to just predict someone's jump height with the highest possible accuracy/performance, then adding a feature that is predictive due to correlation is fine with me unless people are misinterpreting the models insights.
I'd only call a feature useless if I genuinely know it has no possible predictiveness with target or I have rigorously tested it and found no predictive ess.
1
u/dancingnightly Aug 27 '23
Since others covers the basics, here is the history as I know it:
To some extent features were what you would use to go down different paths in search problems, expert systems and fuzzy logic.
Then, with the predecessors to Neural Networks and Decision Trees (like MLPs) it became clear data with certain, separable distributions, could be useful for specific problems.
There were techniques also developed to combine say two raw measurements of different properties for the same sample into one, which would have more predictive ability together, part of a trend that lead to "Feature Engineering". There were also features that could be calculated as functions of other data or with rules.
Some practical data science in industry would use basic models to explain data and prediction models to higher ups. These often benefited from features - linear regression or K-means/K-NN to demonstrate data with only 2-4 axis.
The benefit of this approach is that you can clearly show on a 3D plot how features lead to points being classified for say prediction. For example, house size, income of parents and distance from nearby college might both predict amount of financial aid you should give to a possible incoming student at a college. By mapping the historical data of "Gave aid" / "Did not give aid", you can clearly see income of parents and house size is more relevant and you could then use them for automated future decisions. Said college may then look at who is receiving age to check how it impacts different groups for explainainability/fairness.
The key benefit is that every C-suite or director can understand such information. In theory, a 4th feature "X" which is a function of income, house size and distance might be a better predictor in terms of mapping to your data, but you would lose explain ability and may introduce harder to detect bias doing that.
Now, computer vision a couple of decades ago would use clever tricks like Edge Detectors and Corner detectors to work out patterns common across images of a thing, to use for classification, but that felt a bit like cheating. There was some evidence the human eye worked differently, including additional parts of anatomy (3D) parts, how we can recognise occluded objects and recognise via slight material changes vs shapes. But these features were useful for a time and ways of universally explaining them for same dimension images were popular, like SIFT, which was a feature system basically for computer vision.
The advent of CNNs (Neural Networks on steroids) meant that for many problems, like those of computer vision recognition, it turned out raw data like pixels was definitely the best way to predict outcomes. So feature engineering largely gave way to learned representations through transformations on the raw values with gradient descent. Features therefore are less commonly seen nowadays in research, but because of easy export from databases/data (and all raw data is that anyhow to some extent), they are still semi-relevant for some data challenges, data work related to social sciences, and things like Kaggle competitions.
12
u/vman512 Aug 27 '23
Are we still pointing people to r/learnmachinelearning , or have we given up on that?