Skip to main content

Questions tagged [encoding]

Encoding in machine learning and data science refers to the process by which non-numeric data is transformed into a numeric representation that can be fed into machine learning algorithms.

41 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
774 views

Target mean encoding worse than ordinal encoding with GBDT ( XGBoost, CatBoost )

I have a dataset of 23k rows of an unbalanced dataset 85/15 ratio, 10 variables ( 9 of which are categorical ) , i'm using CatBoost and XGBoost for a binary classification. I applied cv (5 iteration ...
Blenz's user avatar
  • 2,074
2 votes
0 answers
54 views

Attention mechanisms without a linear layer

I am currently looking into attention mechanism as they are used in (non-Transformer) encoder-decoder architectures, meaning an architecture where some RNN (usually LSTM or GRU) is used in both the ...
krise's user avatar
  • 121
2 votes
0 answers
69 views

Catboost: Categorcial Feature Encoding

I would like to understand all the methods available in Catboost for encoding categorical features. Unfortunately, the published articles by Yandex ("CatBoost: gradient boosting with categorical ...
calpyte's user avatar
  • 121
2 votes
0 answers
74 views

Why don't Target/LeaveOneOut Encoders work well for Regression Tasks?

In this review of categorical encoding, it states early on that For regression tasks, Target and LeaveOneOut probably won’t work well and later repeats that Target/LeaveOneOut (Owen Zhang's ...
Alexander Wang's user avatar
2 votes
0 answers
130 views

how to extract the Top contributing labels/words in universal-sentence-encoder-large - TransformerModel?

I'm using the universal-sentence-encoder-large (Transformer Model) encoding process for embedding and then using the embedding for Clustering - Basically for unsupervised learning. I want to get the ...
Arav's user avatar
  • 61
1 vote
0 answers
98 views

In rotary positional embeddings (RoPE), why do we not rotate the values as well?

Actually, the question is all there is As per the paper I see that the rotations are applied only to the keys and the queries. Why are the rotations not applied to the values as well? The reasons for ...
figs_and_nuts's user avatar
1 vote
0 answers
126 views

CLIP Visual Transformer image encoder

I was doing some experiments with the CLIP's visual transformer encoder output (clip-ViT-B-32). So basically given the same scene or image, it should output almost ...
Mary's user avatar
  • 217
1 vote
1 answer
148 views

How to encode & scale IP addresses as input for ML models

Im currently working on an anomaly detection while making a transaction. As a part of the data that I extracted, I have the IP addresses of the indivduals who made the transaction. Since the IP ...
Sivadithiyan official's user avatar
1 vote
1 answer
605 views

How to predict on data that is label encoded as end user will input a categorical data?

My dataset contains about 29 features with 3 class labels as result. Among these 29 features around 24 features are categorical i cannot transform each category into numbers as there are many more ...
Muhammad Minhas's user avatar
1 vote
0 answers
5 views

quereies related to autoencoder

i want to design an deep auto encoder after following keras tutorial. Input is a simple 2-dimensional image consists of 512 rows and 50 columns matrix My trial code is ...
simond's user avatar
  • 73
1 vote
0 answers
89 views

When doing feature selection, are features like "year", "month" considered as ordinal features or should I convert them to strings?

I am working on a hotel reservation dataset that has both categorical and numerical (continuous and discrete) features (26 columns, 30244 rows). Target is also categorical and it says if the user &...
leahnanno's user avatar
1 vote
0 answers
25 views

Modeling time spent on different websites

Apologies in advance for the poor title. I didn't know exactly how to phrase what I want in a succinct manner so hopefully I can elaborate a bit more. I have a dataset where I have customer_id, ...
dyao's user avatar
  • 111
1 vote
0 answers
50 views

How does the R implementation of RandomForest split nodes on categorical data?

The R implementation of RandomForest can take in categorical features as factors and train and predict on these features without encoding. Normally, I use the python implementation from scikit-learn ...
David Stein's user avatar
1 vote
2 answers
981 views

Aggregating multiple encoded categorical values

I am trying find commonly used techniques when dealing with high cardinality multi-valued categorical variables. I am currently using a dataset with a feature CATEGORY which has a cardinality of ~20,...
Vishwa Kalyanaraman's user avatar
1 vote
1 answer
221 views

How to do target encoding when data has repeated rows?

How can I do encoding for a category when data has repeated rows? Can I do target encoding? Or Can I utilize another encoding? I want to figure out how to include a categorical variable in a model to ...
pierround's user avatar
1 vote
0 answers
323 views

How to encode H3 geohash in regression model

I'm trying to train a random forest regression model based on a number of features, including location. I know that raw lat/long can't be used directly, so I've bucketed them using H3. I'm struggling ...
HaasPT's user avatar
  • 11
1 vote
0 answers
44 views

How to pre-process frequency of a series of signals?

I use a neural net to generate predictions based on a time series of signals. I use a sliding window to feed the data to an LSTM model. The input signals have a random frequency that - I believe - is ...
Manngo's user avatar
  • 193
0 votes
0 answers
22 views

Why is positional encoding preferable over adding additional features for transformer models?

Why is information about the position not added as an additional feature? I read in forums that the only reason would be length-based overfitting, but I couldn't find a reliable source for that. What ...
kot's user avatar
  • 11
0 votes
0 answers
16 views

What is the advantage of positional encoding over using additional features?

Popular models such as the transformer model use positional encoding on existing feature dimensions. Why is this preferred over adding more features to the feature dimension of the tensor which can ...
kot's user avatar
  • 11
0 votes
0 answers
7 views

Strategies for Encoding Large Datasets in Symbolic Music Generation for BERT-type Model

I am creating a BERT-type model for symbolic music generation. An observation of my database is a musical piece. Actually, is a "viewpoint" of the piece: ...
Kikolo's user avatar
  • 101
0 votes
0 answers
8 views

Best way to encode a tag column for clustering

I have a dataset which tells me a tech support case used a particular tech document. Every case has been tagged with which product it pertains to. Similarly tech documents are tagged with certain key ...
haldar55's user avatar
0 votes
1 answer
25 views

Encoding soft clustering results as features

I want to use cluster numbers from soft clustering algorithm output as a some sort of categorical feature (or features), add them to other features for further training in another model (Y's from soft ...
franz-german's user avatar
0 votes
1 answer
31 views

Why are 1/n, 2/n, 3/n ... 2048/n not good positional encodings to be concatenated to the word vectors in transformers?

The transformer architecture has no sense of the relative positions of the word and hence we need to pass that information apriori to the along with the word embeddings to the model The positional ...
figs_and_nuts's user avatar
0 votes
1 answer
22 views

Trouble Loading Lines from Text File with Various Encodings

I have been facing difficulties while loading specific lines from a text file. The lines contain characters such as ٹام بیمار ÛÛ’Û” ٹام بیمار ÛÛ’. I have tried using different ...
Abdul Basit Niazi's user avatar
0 votes
1 answer
22 views

How do I handle "Greater than X" in a field of integers?

I've been tasked with cleaning a dataset with a "Drive Time" column that lists times taken to drive to a specific location in whole minutes. The values range from 3 to 180 minutes but there ...
Leon's user avatar
  • 1
0 votes
0 answers
14 views

How to encode data set with all categorical predictors

I have a data set with all categorical predictors. They are 14 in number. If I do one-hot encoding, I would be getting more than 35 new features, which I think is not right due to the curse of ...
emekadavid's user avatar
0 votes
0 answers
26 views

Feature Engineering Encoding for multiple category with huge category range

I need to encode a column "Tags" that has a total of 144 different types and at the same time a row can contain multiple tags. What's the best encoding method in this situation? One-hot ...
victor's user avatar
  • 1
0 votes
0 answers
19 views

Is the result of my feature encoding numeric or categorical?

I have the following categorical feature in a data table (recording the day of week when a certain action happened): ...
Hendrik's user avatar
  • 8,617
0 votes
0 answers
240 views

What is the difference between one hot encoding and 1-of-c encoding?

I am tasked with using 1-of-c encoding for a NN problem but I cannot find an explanation of what it is. Everything I have read sounds like it is the same as one hot encoding... Thanks
Bryon's user avatar
  • 111
0 votes
0 answers
160 views

Do I need to encode numerical variables like "year"?

I have a simple time-series dataset. it has a date-time feature column. ...
smarks70's user avatar
0 votes
1 answer
41 views

Preprocess multi-sample time series data: encode each sample separately or in aggregate?

Let's say I have 3 dense sequences of uniform length. Should I fit a scaler on them separately or together? ...
Kermit's user avatar
  • 529
0 votes
2 answers
123 views

Handling encoding of a dataset which has more than total 2000 columns

Whenever we have a dataset to be pre processed, before feeding it to the model we convert the categorical values to numerical values for which we generally use LabelEncoding, One Hot encoding etc ...
Sahil's user avatar
  • 101
0 votes
1 answer
498 views

What is multi-hot encoding?

I was read and paper for machine learning, and i found this term "multi-hot encoding" without explanation. Can you help me please? the paper: https://arxiv.org/abs/2001.06917
Abdelali Mohammed's user avatar
0 votes
1 answer
863 views

Mean encoding With KFold regularization

I just learned that regularizing the mean encoding reduce the leakage hence generalize better than mean encoding without it but I made 2 submissions with XGB in <...
Mohy Mohamed's user avatar
0 votes
1 answer
1k views

splitting into train test by train_test_split of float values?

How to split into train test by train_test_split of float values ? I used LabelEncoder but I have about 300K lines and when I used the cross_val I saw ...
user10296606's user avatar
  • 1,834
0 votes
0 answers
44 views

Is random forest a kind of spatial feature encoding?

From the book "Deep Learning and Convolutional Neural Networks for Medical Image Computing" On the other hand, CNN models have been proved to have much higher modeling capacity, compared to the ...
JJJohn's user avatar
  • 623
0 votes
1 answer
288 views

String indices must be integers

I was trying to encode the string values of the feature 'ProductCategory' into integer values, but I got this error. Also, I would like to ask if label-encoding ...
Abel's user avatar
  • 1
0 votes
0 answers
247 views

Pre-processing data to make predictions on deployed Sklearn model

I am new to Machine Learning. I have trained a ML model on the Diamond Prices Dataset to predict the price of a diamond given it's features (carat, cut color, clarity, etc...) I have used pickle to ...
Kag Tes's user avatar
0 votes
2 answers
129 views

When to use Label Encoder and One Hot encoding with target variables?

As the title says, When to use Label Encoder and One Hot encoding with target variables ?
John adams's user avatar
-1 votes
1 answer
1k views

y should be a 1d array, got an array of shape (60630, 2) instead

...
Wajeeh Rathore's user avatar
-2 votes
1 answer
5k views

How to use same encode label with same value used in training

I did save my model and using that model I want to predict the data. I am using Flask HTTP server for prediction endpoint. I have training data like this. I did save my model and using that model I ...
Keyur's user avatar
  • 1