Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [feature-engineering]

The tag has no usage guidance.

0
votes
1answer
21 views

How exactly do I extract the important features from strings for machine learning?

Forgive me for my ignorance. Linked below is an image of my dataset with 1000 tuples. https://i.stack.imgur.com/WHIlx.png I have the following questions (1) How exactly do I go about extracting ...
1
vote
2answers
23 views

How exactly do I go about extracting features from timestamps for machine learning? [on hold]

My dataset has a timestamp column with the following format: 06/24/18 0:56 How exactly do I convert this information into features that can be used for classification algorithms like logistic ...
3
votes
2answers
52 views

Manual feature engineering based on the output

So, I'm working on a ML model that would have as potential predictors : age , a code for his city , his social status ( married / single and so on ) , number of his children and the output signed ...
1
vote
0answers
30 views

Target Encoding: missing value imputation before or after encoding

I want to perform a target encoding for my categorical features although I am not sure when to perform the data imputation if any of them has missing values. Let's say I have a few continuous features,...
2
votes
1answer
53 views

Why is Reward Engineering considered “bad practice” in RL?

Reward engineering is an important part of supervised learning: Coming up with features is difficult, time-consuming, requires expert knowledge. "Applied machine learning" is basically feature ...
0
votes
0answers
7 views

Add features from a timeserie target to train set

I have a one year train set, which is a combination of a sequence of time ordered images, while the target is a continuous variable. The source of the problem is that data-set is very small, ...
1
vote
1answer
34 views

Multiclass classification in a balanced dataset with one high-priority label

I have a balanced dataset for a multiclass classification problem with one high-priority label (this ought to be classified properly at all costs). How do I go about creating a workflow for this ...
0
votes
1answer
11 views

Inverse Binary Feature

I am feeding a binary value into my NN which represents whether the given example is a public holiday or not. Is there a difference between assigning a 0 to public holidays and 1 to all other days or ...
2
votes
2answers
61 views

How to Work with Imbalanced Data

I am building a binary classifier from a set of feature vectors some of which are categorical like Yes or No (two options). I am replacing them with 1 and 0 and since there is strong imbalance between ...
0
votes
1answer
29 views

Python Time series: extracting features on a rolling window basis

I have a long univariate time series, and before performing some machine learning models with it, I want to extract as many features as I can from the time series on a rolling-window basis. As a ...
0
votes
0answers
13 views

In network analysis, how do I count the number of nodes that “share” at least one edge?

I have created a network consisting of investors and companies using the Python library NetworkX: ...
1
vote
0answers
25 views

Adding Fourier transform features to data

I'm working on some timeseries data which after visualising seems to be periodic(repeating at some interval), So I planned on finding the Fourier transform of the entire and pick the top n amplitudes ...
0
votes
0answers
9 views

How to impute opt out data

Consider the following problem: You have been given some survey data on job satisfaction and have to create a model for the employees with the highest risk of leaving the company. The questions have ...
1
vote
1answer
17 views

Feature Engineering Lists\Vectors as values in dataframe

Let's say I have a dataframe where some of the columns have lists of strings as values. I would like to use ML Algorithms on this dataframe. In this case, I can: I could add many columns of 1's and ...
0
votes
0answers
14 views

Feature encoding for multiple JSON objects

I have a dataset, where a particular feature is a collection of many JSON objects for a single feature. ...
2
votes
0answers
27 views

Measure the “aggregate preference” of points on a 2D plane

Consider some points on a 2D plane, we know corrdinates of all points, how to measure the "aggregate preference" of them. I don't know what is the exact terminology of "aggregate preference". What I ...
1
vote
1answer
26 views

Should I expect major performance improvements by scaling my features?

I'm trying to decide whether I should scale my features & responses for training, and I'm in a situation where I can't just try both scaling and not scaling. My features currently have an std ...
1
vote
1answer
26 views

Problem with important feature having a lot of missing value

I am facing a dilemma with a project of mine. One of the variables (numerical) doesn't have enough data i,e almost 99% data are missing. However, upon talking to the domain experts, it appears that ...
-1
votes
1answer
61 views

ML: How to think feature selection?

What is the basic philosophy behind feature selection and modelling? How do you actually start? Could you please share your real (practical) inputs? Bit of background: I am actually trying to analyse ...
0
votes
0answers
7 views

Provide optional confidence level as an input to the neural network

I have a name, gender labeled dataset and I know the frequency of particular name can occurred in the dataset. I want to develop a neural network which predict gender when given the name as an input. ...
1
vote
1answer
18 views

Why feature crosses may work better than having them as individual features?

On Google ML Crash Course it is said the following: If we build a feature cross from both these features: [behavior type X time of day] then we'll end up with vastly more predictive ...
0
votes
0answers
19 views

Feature selection through Random Forest and Principal Component Analysis

I am working on a binary classification problem and I have 870 numeric independent features to start with. I tried PCA on input features and picked top 200 variables corresponding to first 10 ...
3
votes
3answers
65 views

How to understand features impact in a non linear case?

I give a simple example: I have a set of houses with different features (# rooms, perimeter, # neighbours, etc...), almost 15, and a price value for each house. The features are also quite correlated (...
0
votes
0answers
15 views

Should I use feature reduction or feature expansion with the hashing trick?

I am working on a task to predict the delay time of a flight. For this, I am allowed to use a subset of the features from the carrier-on performance dataset. The ...
1
vote
1answer
172 views

How to use one hot encoding of string categorical features in keras?

I am dealing with a binary classification problem. The output column of my dataset is already encoded in 0/1. The problem is that I have many categorical features (columns), which are strings and I ...
1
vote
2answers
26 views

model to predict annual outcome based on previous years data

I have below datasets for two years each holding about 10.000 records. Every week a new report is generated that shows the performance for the current or any previous month. Therefore a more recent ...
2
votes
0answers
20 views

How to discretize numerice values with predfined ranges in weka?

I'v imported csv file into weka. one of the features have a value with minimum 0 and maximum 160. now, i want to discretize value into three range as you can see below: less than 6 > L more than 6 ...
3
votes
3answers
100 views

Feature engineering from date, mean and standard deviation

I have a multi class classification problem where I should predict the passengers for flights (0-7 classes). The training set consists of the following features: Date of the flight Mean of the weeks ...
0
votes
0answers
23 views

Data leakage and predictive models: should we use past predictions as a feature?

I want to develop a Random Forest Classifier model to predict whether or not a customer will convert 7 days from today. The model is re-trained once a week and makes predictions for the following week....
3
votes
3answers
81 views

how to evaluate feature quality for decision tree model

Most of the tutorials assume that the features are known before generating the model and give no way to select 'good' feature and to discard 'bad' ones. The naive method is to test the model with new ...
1
vote
1answer
33 views

Who wrote the formula for gini importance/sklearn's feature importance score?

I've been looking for a paper where the Gini importance was first proposed, but I am not sure if this is actually how it came to be. Here's the formula I am familiar with and am looking to find in a ...
-1
votes
0answers
34 views

Target Encoding for test dataset

While training, i have used target encoding, to built some features, but i am wondering, how to encode features for test data-set? One way, i can recall, is to use training dataset, to encode ...
1
vote
1answer
29 views

Creating a Feature to determine popularity

I am Building a Recommendation System in which i have Multiple Category , I want to Know how Popular is my Product in each Categories. For that I am considering Probabilty as one factor. For e.g I ...
-1
votes
0answers
16 views

What is cross-labeling?

In an online course I just heard that cross-labeling the Input data improves the accuracy of a Neural Network classifier. Can someone explain what it is and how it influences the accuracy ? Google was ...
1
vote
1answer
112 views

Generating Polynomial Features in R

Is there an optimized way to perform this function "PolynomialFeatures" in R? I'm interested in creating a matrix of polynomial features i.e. interactions between two columns among all columns but I ...
0
votes
1answer
25 views

Queries regarding feature importance for categorical features

Queries regarding feature importance for categorical features: Context: I have almost 185 categorical features and these categorical features have either 2 or 3 or 8 or 1 or sometimes 4 categories, ...
2
votes
1answer
42 views

Should I create metafeatures for my XGBoost training set?

Say I've got two (not necessarily independent) features A and B for my dataset. Should I create metafeatures from them? say for ...
0
votes
2answers
26 views

How important is it for each row of data to have the same number of features?

I'm using decision tree learning to try and classify a device based its components. Different devices have a different number of components and the location of these components within the device is ...
2
votes
2answers
49 views

How can I improve a machine learning model?

I am a Machine learning newbie and i am trying my hands with a dataset which has 9 features and my aim is to figure out the optimal multi class classification model which fits my dataset. I applied ...
1
vote
2answers
45 views

data pre-processing before image classification

I'm working on a machine learning project, Images classification (shape: 100 x 100)-> (vector of 10000), I did some pre-processing before applying decision trees algorithm , I got an accuracy of 55 % ...
2
votes
0answers
44 views

Layman's explanation of when to use which smoother algorithm/technique: FFT, loess, Savitzky-Golay, etc

As an analytics practitioner, I frequently come across noisy data (e.g. IoT data). When building a model or machine learning algorithm, it can be advantageous to smooth this data. Over the years, I ...
2
votes
1answer
21 views

How to include class features to linear SVM

I am planning to do a simple classification with a linear SVM. One feature I have is another classification of some sort done previously. Can I just use this class feature as a 1-hot encoded array? So,...
3
votes
1answer
52 views

Why would a fake feature with random numbers get selected in feature importance?

I'm using a sklearn.ensemble.RandomForestClassifier(n_estimators=100) to work on this challenge: https://kaggle.com/c/two-sigma-financial-news I've plotted my ...
1
vote
1answer
44 views

Is a neural network able to learn to map a completely different feature vector to the same class

Is a neural network (for example a MLPClassifier in Python) able to learn to map a completely (or very) different input feature set to the same output class? Or is it better to work in this case with ...
1
vote
1answer
28 views

Effect of adding extra unrelated features to linear perceptron

Suppose that we are training a linear regressor (perceptron). Adding extra features that are not related to the target (e.g. randomly generated values) before training will typically ____ our training ...
2
votes
1answer
25 views

“help” decision tree by tying 2 features together

Assuming I have in my dataset 2 (or more) features that are for sure linked (for example: feature B indicates the amount of relevance of feature A), is there a way I could design a decision tree that ...
0
votes
1answer
27 views

Is it correct to use non-target values of test set to engineer new features for train set?

Suppose, I have a dataset with a feature_1 value and a target value. Now, I want to engineer a new feature by creating relative value by subtracting mean from each value. Question: Can I (1) use ...
0
votes
1answer
30 views

How to handle “not label Y” in a multi class machine learning problem?

I have a train data set that comprises information in the form: ...
1
vote
0answers
12 views

How to optimize the separation of two distributions from binary classfication

Given a sample where for each individual a classification is predetermined (e.g. sick or not) and 5 random variables are measured. The random variables are on the same scale but from differnt bins. E....
2
votes
1answer
31 views

I want to create an additional feature(column) based on some manipulation of values from existing features

Consider my data-frame to be like this ('x','y','z' are features): I want to create a python function which will take an expression as a string (something like this: 'x+y-2z') and create a new ...