743 questions
2
votes
0
answers
61
views
How can I create a Streamlit app to predict based on my MLP model?
I am trying to create a Streamlit application that predicts hypertension risk based on patient input data using the MLP (Multilayer Perceptron) model I trained. Below is my Keras model code:
from ...
0
votes
0
answers
11
views
Set_weights for the FedBN algorithm
Attack classification with FedBN algorithm, but normalization is causing difference in weight set.
ValueError: You called `set_weights(weights)` on layer "model_1" with a weight list of ...
1
vote
0
answers
104
views
Custom Labelling in Multi-Class Classification in XGBoost/ LightGBM
I have the following dataframe which records the IQ, Hours (number of hours of studying) and Score (past exam score for student 1,2,3,4 in different classes (Class_ID) and I would like to use these ...
0
votes
1
answer
119
views
Inconsistent numbers of samples error in multi-class / multi-label machine learning model
I have a OneVsOne model running fine with textual feature and target fields. To progress to a multi-class model (i.e. with multiple textual feature fields), I believe OneVsRest with Logistic ...
0
votes
1
answer
251
views
Cross-entropy loss with varying number of classes
Is there a standard/efficient way in Pytorch to handle cross-entropy loss for a classification problem where the number of classes depends on the sample?
Example:
In a batch of size 3, I have:
logits1 ...
0
votes
2
answers
302
views
Multiclass Confusion Matrix
I have this multiclass confusion matrix of Asian currencies and this is the first time I've gotten something like this and it's giving me a hard time to interpret it and also identifying the TP, TN, ...
0
votes
0
answers
107
views
How can I implement regression after multi-class multi-label classification?
I have a dataset where some objects (15%) belong to different classes and have a property value for each of those classes. How can I make a model that predicts multi-label or multi-class and then make ...
-1
votes
1
answer
64
views
How to track loss of multi-label MLP?
I am given binary data points of dimension 5,000. I am asked to perform machine learning predicting a binary vector of length 1k, where each position of the output is a class. The classes are not ...
0
votes
0
answers
29
views
Why doesn't my accuracy vary no matter the dataset and the model used?
I am working on a gait classification problem, using two type of data time-series skeleton and foot pressure. However, no matter which dataset I use and which type of model the accuracy stays pretty ...
1
vote
0
answers
151
views
Why is error "OSError: GetModuleFileNameEx failed" generated in running scikit-learn k-nearest neighbours?
In using scikit's 'KNeighborsClassifier' (with n_neighbors = 3) and '.fit' to train, then using '.predict' to do multinomial classification I am getting the error message "OSError: ...
0
votes
0
answers
92
views
Transformer Model Not Training Correctly, Likely Tensor Size Mismatch
I am very new to Transformers and LLMs, and I am trying to re-purpose a model from this tutorial (https://towardsdatascience.com/how-to-code-the-transformer-in-pytorch-24db27c8f9ec#1b3f) for my ...
1
vote
1
answer
285
views
ValueError with XGBoost on Multi-Class Dataset: Expected Classes 0-8, Got 0-9
I am encountering a ValueError when running an XGBoost model on a multi-label dataset. The error message is:
ValueError: Expected class labels {0,1,2,3,4,5,6,7,8}, got {0,1,3,4,5,6,7,8,9}
My dataset ...
0
votes
1
answer
65
views
What error it is when I put gridsearchCV to multiclass svm model it work time almost day now from 1 minute?
When I run my multiclass svm model without gridsearchCV it use 1 minute I only have 3 class and 24 data per class. When I use put gridsearchCV to get more accuracy it work until now for day. I think ...
0
votes
1
answer
721
views
Why is the accuracy of average="micro" the same as precision or recall in multi-class classification?
I have been studying multi-class classification metrics. In the process, I discovered that in the case of the parameter average='micro', accuracy, precision, recall, and the f-1 score are all the same....
1
vote
0
answers
142
views
Retrieving Clustered Datapoints and Finding Optimal Cluster Count in ML.NET
I'm delving into machine learning and am currently experimenting with multiclass classification in ML.NET.
Background:
I have a dataset containing financial data and I aim to infer a category from it....
0
votes
0
answers
65
views
Classification problem: Choosing medication to prevent side effects based on patient characteristics
I need your help to solve a classification problem. Typically, we have independent variables and we try to predict a target variable. I have a different type of problem to solve.
In my case, let's ...
0
votes
1
answer
354
views
Confusion Matrix only shows diagonal values for selected labels despite misclassifications
I'm trying to create a confusion matrix for a subset of labels from my data. Despite having misclassified rows, the resulting confusion matrix shows zeros everywhere except the diagonal. Am I missing ...
1
vote
1
answer
935
views
How does CatBoost perform multiclass classification?
I am trying to figure out how CatBoost performs multiclass classification with MultiClass loss function. As I understand it, for each prediction MultiClass requires M values for each of M classes. My ...
0
votes
1
answer
230
views
How to use NDCG for multiclass classification problem
I have 20 different labels and they are [0, 1, 2, ..., 20]. Let's say that I have 5 samples and their predictions are: [2,1,17,9,6] and true_labels are [3,2,15,7,4].
from sklearn.metrics import ...
0
votes
1
answer
90
views
Find largest intersection of groups within groups from multiple multi-class classifications
I have different algorithms that classify individuals into groups A,B,C, or D.
The predicted classification data set looks like (it is a mess!) :
# sample data
df_orig = tibble(
Individuals = c(1, 2,...
0
votes
1
answer
524
views
Fine tuning multiclass multilabel wav2vec2 model with transformers
I have managed to adapt the HuggingFace audio classification tutorial to my own dataset:
https://github.com/mirix/messaih/blob/main/charts/fine_tune_w2v.py
I can now fine-tune a wav2vec model on my ...
0
votes
1
answer
379
views
Multi-class classification Confusion Matrix as Metric in Keras Neural Network
I have a Keras neural network with 4 output neurons (0, 1, 2, 3).
model = models.Sequential()
model.add(Dense(6000, activation='relu', input_shape=(4547,)))
model.add(Dense(3000, activation='relu'))
...
0
votes
0
answers
105
views
FileNotFoundError: [Errno 2] No such file or directory: '../output/kaggle/working/train'
i was trying to generate image dataset from images folder , first i copied the trained and validation dataset in separate folders train and validation respectively in /output/kaggle/working, then i ...
3
votes
0
answers
142
views
A data resampler based on support vectors
I am working to implement a data resampler to work based on support vectors. The idea is to fit an SVM classifier, get the support vector points of the classes, then balance the data by selecting only ...
0
votes
1
answer
513
views
How does TfBertForSequenceClassification work?
The main job of bert is two - one is to predict the masked word and second is to predict the if sentence b is related to sentence a or not , then how TfBertForSequenceClassification is helping me for ...