43 votes
Accepted

What is a good way to transform Cyclic Ordinal attributes?

The most logical way to transform hour is into two variables that swing back and forth out of sync. Imagine the position of the end of the hour hand of a 24-hour clock. The ...
user avatar
  • 6,678
33 votes
Accepted

Encoding features like month and hour as categorial or numeric?

Have you considered adding the (sine, cosine) transformation of the time of day variable? This will ensure that the 0 and 23 hour for example are close to each other, thus allowing the cyclical nature ...
user avatar
  • 466
24 votes
Accepted

Feature selection vs Feature extraction. Which to use when?

Adding to The answer given by Toros, These(see below bullets) three are quite similar but with a subtle differences-:(concise and easy to remember) feature extraction and feature engineering: ...
user avatar
  • 2,410
23 votes

Are there any tools for feature engineering?

Very interesting question (+1). While I am not aware of any software tools that currently offer comprehensive functionality for feature engineering, there is definitely a wide range of options in that ...
user avatar
22 votes

Feature Transformation on Input data

We love the normal form In most cases we try to make them act like normal. Its not classifiers point of view but its feature extraction view! Which Transformation? The main criterion in choosing a ...
user avatar
20 votes
Accepted

How to choose the features for a neural network?

A very strong correlation between the new feature and an existing feature is a fairly good sign that the new feature provides little new information. A low correlation between the new feature and ...
user avatar
  • 2,009
20 votes

How to perform feature engineering on unknown features?

You do not need domain knowledge (the knowledge of what your data mean) in order to do feature engineering (finding more expressive ways of framing your data). As Tu N. explained, you can find "...
user avatar
  • 1,326
20 votes
Accepted

Why do we convert skewed data into a normal distribution

You might want to interpret your coefficients. That is, to be able to say things like "if I increase my variable $X_1$ by 1, then, on average and all else being equal, $Y$ should increase by $\beta_1$"...
user avatar
19 votes

What is difference between one hot encoding and leave one out encoding?

They are probably using "leave one out encoding" to refer to Owen Zhang's strategy. From here The encoded column is not a conventional dummy variable, but instead is the mean response over ...
user avatar
18 votes

What is dimensionality reduction? What is the difference between feature selection and extraction?

Dimensionality reduction is typically choosing a basis or mathematical representation within which you can describe most but not all of the variance within your data, thereby retaining the relevant ...
user avatar
  • 1,804
18 votes

Encoding features like month and hour as categorial or numeric?

The answer depends on the kind of relationships that you want to represent between the time feature, and the target variable. If you encode time as numeric, then you are imposing certain restrictions ...
user avatar
  • 631
14 votes
Accepted

Is (manual) feature extraction outdated?

In the general case, this is by no means true. Let's break down the case for different data scenarios: For discriminative image models (e.g. image classification/labeling) this is true for some ...
user avatar
  • 16k
12 votes
Accepted

Feature extraction of images in Python

In images, some frequently used techniques for feature extraction are binarizing and blurring Binarizing: converts the image array into 1s and 0s. This is done while converting the image to a 2D ...
user avatar
  • 8,036
11 votes

List of feature engineering techniques

Missing Data Imputation: Complete case analysis Mean / Median / Mode imputation Random Sample Imputation Replacement by Arbitrary Value Missing Value Indicator Multivariate imputation ...
user avatar
  • 231
11 votes

Is (manual) feature extraction outdated?

No, manual feature extraction is not outdated. In addition, manual feature extraction is hard to do-away, given, a data scientist needs business and domain logic to build a robust model to replicate ...
user avatar
10 votes

List of feature engineering techniques

There is no definite source on how to do feature engineering. It is often dependent on the problem you are trying to solve. Some say it is more of an art than it is science. But I would go through ...
user avatar
  • 720
9 votes

What features are generally used from Parse trees in classification process in NLP?

By using a parse tree, you divide your sentence into parts. Suppose, in the example of sentiment analysis, you can use those parts to assign a positive/negative sentiment to each part and then take ...
user avatar
  • 1,059
9 votes
Accepted

What features from sound waves to use for an AI song composer?

First off, ignore the haters. I started working on ML in Music a long time ago and got several degrees using that work. When I started I was asking people the same kind of questions you are. It is a ...
user avatar
8 votes
Accepted

Pivoting a two-column feature table in Pandas

If there is no value column - introduce it yourself! df["value"]=1 pd.pivot_table(df, values="value", index=["city"], columns="cuisine", fill_value=0) For your ...
user avatar
  • 1,466
8 votes
Accepted

Document classification: tf-idf prior to or after feature filtering?

As you've described it, Step 4 is where you want to use TF-IDF. Essentially, TD-IDF will count each term in each document, and assign a score given the relative frequency across the collection of ...
user avatar
8 votes

Are there any tools for feature engineering?

Featuretools is a recently released python library for automated feature engineering. It's based on an algorithm called Deep Feature Synthesis originally developed in 2015 MIT and tested on public ...
user avatar
8 votes

Feature extraction of images in Python

This great tutorial covers the basics of convolutional neuraltworks, which are currently achieving state of the art performance in most vision tasks: http://deeplearning.net/tutorial/lenet.html ...
user avatar
  • 3,027
8 votes

How to deal with categorical feature of very high cardinality?

This is an old question. I am surprised that I don't see anyone mentioned Mean Encoding (a.k.a Target Encoding). It is very popular in supervised learning problems. Besides, I have seen people use ...
user avatar
  • 181
8 votes

Encoding features like month and hour as categorial or numeric?

I recommend using numerical features. Using categorical features essentially means that you don't consider distance between two categories as relevant (e.g. category 1 is as close to category 2 as it ...
user avatar
8 votes
Accepted

Feature agglomeration: Is it testing interactions?

From the documentation: Similar to AgglomerativeClustering, but recursively merges features instead of samples. In standard agglomerative clustering you receive a matrix $M^{n \times m}$ ...
user avatar
  • 2,156
8 votes
Accepted

How to get spike values from a value sequence?

This is very simple. Let's say your data in Panda format (named data_df), and extracting peaks/spikes over a certain threshold (e.g. 15000 here) is simply: ...
user avatar
  • 4,036
7 votes

What is dimensionality reduction? What is the difference between feature selection and extraction?

As in @damienfrancois answer feature selection is about selecting a subset of features. So in NLP it would be selecting a set of specific words (the typical in NLP is that each word represents a ...
user avatar
  • 599
7 votes
Accepted

How to deal with categorical feature of very high cardinality?

One-hot-encoded ZIP codes shouldn't present a problem with modern tools, where features can be much wider (millions, billions even), but if you really want you could aggregate area codes into regions, ...
user avatar
  • 10.4k
7 votes
Accepted

Why is duplicating inputs bad?

The issue with building a regression model on all 3 of these is that you are potentially introducing multicollinearity into the model. Although log(input) and sqrt(input) are not linear functions of ...
user avatar
  • 523
6 votes
Accepted

Unsupervised feature learning for NER

Yes, it is entirely possible to combine unsupervised learning with the CRF model. In particular, I would recommend that you explore the possibility of using word2vec features as inputs to your CRF. ...
user avatar
  • 2,009

Only top scored, non community-wiki answers of a minimum length are eligible