text stringlengths 83 79.5k |
|---|
H: What preprocessing should I do to a multiclass segmentation mask?
I am working on a segmentation problem. My masks are tensors with a shape of (4767, 192, 192, 1) --> (num_img, height, width, number of channels). Each mask contains 13 different pixel values (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 255).
What preproce... |
H: Understanding of stacking
I use various autoML solutions so I can't stack my models directly (for example via StackingClassifier, mlextend or as layers in keras) so I want to implement my own pipeline for this case using only models output files.
The problem is that I have absolutely no idea how this stacking works... |
H: Confused about output shape of the transformer
I have followed this tutorial https://www.youtube.com/watch?v=U0s0f995w14 to create a minified version of a transformer architecture but I am confused about the final shape of the output.
Heres the code:
https://github.com/aladdinpersson/Machine-Learning-Collection/blo... |
H: Difference among ID3, C4.5, C5.0
The C4.5 algorithm uses information gain ratio instead of information gain like ID3, and it also adds pruning.
What does C5.0 add more? Is there any example of code? I looked on the web but there is not anything interesting.
AI: According to wikipedia:
C5.0 offers a number of impro... |
H: Better results when adding a dropout layer before a single layer classifier - counter intuitive result
I am working on an multi-class image classification problem (with 9 classes), i am using a pretrained DenseNet121 (on ImageNet), i'm using Keras.
i am using densenet as a feature extractor, with a single layer as ... |
H: Outliers: How to handle data values of future
I am learning ML. I have a dataframe with some features and a target column. For simplicity condiser X has one feature, for eg X = [1, 2, 3, 4, 5, 6, 6, 1, 2, 12]
One of the pre-processing step is find outliers and impute with mean.
Case-1
Suppose X represent train set,... |
H: Is sequence length and hidden size is the same in Transformer
I'm confused about sequence length and hidden size if they are the same in Transformer.
I think they are different but not sure.
class Embeddings(nn.Module):
"""Construct the embeddings from patch, position embeddings.
"""
def __init__(self, ... |
H: Difference between Word2Vec and contextual embedding
am trying to understand the difference between word embedding and contextual embedding.
below is my understanding, please add if you find any corrections.
word embedding algorithm has global vocabulary (dictionary) of words. when we are performing word2vec then i... |
H: How do I prevent ConfusionMatrixDisplay.from_predictions from showing the plot?
ConfusionMatrixDisplay docs say:
It is recommend to use from_estimator or from_predictions to create a ConfusionMatrixDisplay.
However, I want to plot the matrix manually on some axes I configure, and when I use from_predictions, I ca... |
H: Analysing 1GB of 200K of data rows having 50 columns
Total Newbie question here :
5 years ago, I wrote a web application in LAMP stack not using a framework, targeting end users, which now has over 200,000 rows where each row has 50+ columns and the MySQL database size is over a GB.
How do I analyze the stats of th... |
H: What is the ELMO approach to learn contextual embedding?
BERT, GPT, and ELMo used the contextual embedding. but, their approach of learning contextual embedding is different.
so, what is the ELMo approach to learn contextual embedding?
AI: ELMo provides contextual word embeddings, but they are completely different ... |
H: How to handle OOV in non-contextual embedding (word2vec, Glove, FastText)?
how non-contextual embedding (Word2Vec, Glove, FastText) handle OOV (incase if given word is not available in vocabulary)
AI: In the case of word2vec and GloVe, the out-of-vocabulary (OOV) problem is usually addressed by simply ignoring the ... |
H: What are the preprocessing steps for text classification after removing stopwords?
I am working on an NLP project where I have text that I need to categorize based on topics (The data is 2 columns, text and topic).
Something that I am stuck on now is the preprocessing part. What are the steps and in what order?
So ... |
H: Will LLMs accumulate its skills after each time it is taught by one in-context learning?
If the model’s parameters aren’t updated during the in-context learning (ICL),
is the skills it just learned during the current ICL be kept/saved somehow in the model by some other way other than parameters?
Put it in another w... |
H: Building BERT tokenizer with custom data
I'm wondering if there is a way to train our own Bert tokenizer instead of using pre-trained tokenizer provided by huggingface?
AI: Yes, of course, it is possible, but that implies that you need to train again the whole model, not only the tokenizer.
Here you can find the st... |
H: Query on Attention Architecture
As we most know that, Attention is focuses on specific parts of the input sequence those are most relevant in generating output sequence.
Ex: The driver could not drive the car fast because it had a problem.
how attention finds the specific parts(here it is 'it') in input and how it... |
H: Training GPT Model with Swagger Documents, Need Help with Model Fit
We are currently developing an application that performs actions based on user input using 'gpt-3.5-turbo-0613'.
For example, if a user enters the prompt "create a user with the name Potter and the role wizard,"
it should call the add_admin method ... |
H: Fine-tuning LLM or prompting engineering?
For some type of chatbot, like a customized chatbot, may it be better to fine-tune the LM for the domain-specific data and the type of question instead of relying on the prompt as prompts have to be processed by the LM every time?
Another reason is that how can the system a... |
H: When training a sklearn machine learning model, what part of a data from a csv file needs scaling like MaxAbsScaler or MinMaxScaler?
Consider the code below:
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
import pandas as pd
data = pd.read_csv("data.csv")
x = da... |
H: memory and context in LLM models
I have a large document and I may need to introduce a large part of it to my llm for insight generation I know that that text can be chunked into parts and with the right prompt I can get what I want with the langchain memory feature but how long can my model remember past conversat... |
H: Clustering and grouping noisy time series fuel data
I have a time series of fuel data which are split into distinct clusters (as shown in the image below. I'm looking at the green line). The clusters almost always have a descending gradient. I would like to identify these clusters programmatically (I'm using python... |
H: Correlation between multiple time series
For research, we put some test samples through a physical process for a certain period of time and make measurements. The general structure of the data we collect is as follows:
Experiment A
- Measurement A1
- Measurement A2
- Measurement A3
...
and similarly
Experiment B
-... |
H: Filter rows with multiple conditions using two dataframes
I have two dataframes that share an ID number column. I'd like to filter df1's rows based on two conditions: 1) it shares the ID with df2 and 2) it meets a condition in a column in df2.
I have this code:
filter = df1[df1['ID'].isin(df2['ID']) & (df2['section... |
H: Feature Selection - determining the significance of imbalanced categorical data column
I have a dataset with a categorical column that contains three categories. One of the categories represents 98% of the data, while the remaining 2% are distributed between the other two categories, with a few (maybe around 50) in... |
H: Smart Selection of Training Data for Fine-tuning Language Models in Small Domains
Background
I am working to make language models (for example, Stanford's Alpaca model) perform well on a new small domain through fine-tuning on domain-specific dataset $D$.
If the size of $D$ is $N$, I would like to find a subset $n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.