Skip to main content

Questions tagged [python]

Use for data science questions related to the programming language Python. Not intended for general coding questions (which should be asked on Stack Overflow).

Filter by
Sorted by
Tagged with
1 vote
0 answers
14 views

Interpretation of this learning rate finder plot

I have the following plot relating to learning rate finder results (following the principles of Smith (2015)), made according to this code example and found the loss drop section to be very narrow, ...
Marco's user avatar
  • 111
-1 votes
0 answers
7 views

Python Faces Image Reconstruction: NMF algorithm : Error: reconstructed faces is blank missing

*** Problem Statement *** NMF and PLSI faces.npy face images emoticons with eight different human faces each of which is a vectorized 2D array, 441 dimensional vectors into a 21 × 21 2D array. ...
Matt Leadership's user avatar
1 vote
1 answer
25 views

Data binning for interval data

I am trying to create a ML model for salary classification into 5 categories (0-90k, 90-120k, 120-180k and so on). The problem is that in my dataset almost all salary data is presented in intervals. ...
pinkkdeerr's user avatar
2 votes
1 answer
21 views

Custom loss function in python

I am trying to implement a custom loss function inspired by https://arxiv.org/pdf/2305.10464.pdf. That is: $ L(\mathbf{x}) = (1-y) \left\lVert \mathbf{x_{true} - \mathbf{x_{pred}}} \right\rVert^2 + y \...
Gst's user avatar
  • 21
0 votes
0 answers
11 views

I need help with asr_evaluation library

I have an assignment for which i need to find out the word error rate. Now asr_evaluation is supposed to be the library that i use but i am not able to use it. Help. Link: https://github.com/belambert/...
Push29's user avatar
  • 1
0 votes
0 answers
14 views

Question regarding model inference consistency

I am doing some research on gaze estimation model L2CS provided in here. When you look at the inference predictions on provided image, when face/eye direction barely changes, inference predictions ...
JohnDoe's user avatar
0 votes
1 answer
32 views

Build a Neural Network for Multi-output Regression

I have a network model that accepts about 25 inputs and outputs 3 actions. The outputs are: delta X and delta Y of the robot and the angle of the robot. After I enter the data into the model, I get ...
May's user avatar
  • 1
-1 votes
0 answers
6 views

How to get pmi score and count for NLTK everygrams / pmi and count all possible sizes of phrases in my text . Same as below for everygrams

...
98fly's user avatar
  • 1
0 votes
1 answer
24 views

tf.keras.layers.LSTM: where did all these parameters came from?

Why does this code... model = tf.keras.Sequential() model.add(tf.keras.layers.LSTM(9,input_shape=(6,1),activation='relu')) print(model.summary()) ... print 396 ...
BsAxUbx5KoQDEpCAqSffwGy554PSah's user avatar
0 votes
0 answers
15 views

Create model for manufacturing defect detection using python

Has anyone done some work on manufacturer defect detection? I need some input on this. I have done some research and found some examples like TensorFlow/Keras and CNN, but I need some real-time ...
Reetesh Nigam's user avatar
0 votes
0 answers
11 views

a few records for training, and one record after training

I try to make some credit score task. I stuck in conceputal problem. There is: train_data (62 columns, 10339239 rows, 1250000 unique ID values [0 - 1249999]([min-max] ID values)) test_data (62 ...
Excentricitet's user avatar
1 vote
1 answer
17 views

Need inputs on logging Machine Learning models and their versions in logs for my application

So i have a web application that recommends movies based on the subject and question that the user puts in , it also uses NLP and ML models like Named Entity Recognition(NER) model to extract keywords ...
nOhAr's user avatar
  • 11
0 votes
1 answer
20 views

why is my svm taking much time to run what changes should i make in my code?

...
Kshitija Thakur's user avatar
1 vote
1 answer
35 views

What's wrong with my implementation of an MLP?

I'm trying to predict housing prices from a Kaggle dataset using an MLP with 3 hidden layers (10 neurons each). Having read about MLPs and backprop in the CS229 notes, I tried to do my own ...
The_Monetarist's user avatar
1 vote
1 answer
18 views

How to Balance Dataset extracted using image_dataset_from_directory

I'm new to tensorflow, so I've been trying to find the best way to do class balancing over a dataset where I used image_dataset_from_directory to load. But I haven't find the way to do it. I saw from ...
lopez-mgu's user avatar
0 votes
0 answers
60 views

How to prune my Yolov8 object detection model?

I trained a yolov8-medium object detection model, but I'm not sure how to apply pruning on it. What is the proper way to prune it? I got this example code, but it only looks for ...
Mary H's user avatar
  • 1
0 votes
0 answers
31 views

Why do seaborn.histplot and pyplot.hist generate two different histograms on the same data?

I'm trying to visualize a customer data, two of the variables I'm looking at are verified_status and video_transcription_length. ...
user161913's user avatar
0 votes
1 answer
14 views

Understanding batching in pytorch models

I have following model which forms one of the step in my overall model pipeline: ...
Mahesha999's user avatar
0 votes
1 answer
17 views

Pytorch backward error

Here I overcame a problem about backward, below is a simple example written by python code. the print information is that This really confused me as self.weights is used as a important part in my ...
Ecthelion's user avatar
0 votes
0 answers
17 views

Calculation of Covariance Matrices for a QDA classifier in Python Numpy

For a school project, I have to design a QDA classifier for 28x28 pixel images of letters in sign language. I have been given 27455 images for training, which have to be flattened to a 784 pixel ...
Neev Penkar's user avatar
0 votes
0 answers
8 views

Feature Selection in no labeled data

I'm new to this field and trying to learn by working with a fraud dataset. Initially, I used the dataset as is, but now I'm trying unsupervised learning without the labels. I've tried clustering ...
DrGenius's user avatar
  • 101
1 vote
0 answers
21 views

What is the most optimal way to work with the "names" variables?

Suppose the following df: ...
Daniel_DS's user avatar
0 votes
0 answers
5 views

Adding sliding window dimension to data causes error: "Expected 3D or 4D (batch mode) tensor ..."

I wrote a pytorch data loader which used to return data of shape (4,1,192,320) representing the 4 samples of single channel image, each of size ...
Mahesha999's user avatar
0 votes
0 answers
15 views

Lost when trying to get good time series prediction results (regression problem) even after trying many things

I'm not able to get good results after a long time testing when using TensorFlow to predict time series data (regression problem). I don't know if the problem is with the data (little quantity and/or ...
Marco's user avatar
  • 111
0 votes
0 answers
14 views

I want to know how to debug this code because it gives me error

The following is a code for the cvrp problem using simmulated annealing algorithm but im trying to incorporate the time windows as delivery schedule. but its not working ...
user161734's user avatar
0 votes
0 answers
19 views

Multiclass PyTorch neural net is stuck predicting 1 class, even with "simple" dataset

I'm trying to predict a class of some data, and am struggling. So, to debug I created a simple test dataset, yet I am having the same issues. I've tried adding weighting, and lastly adding a column ...
Russ's user avatar
  • 1
0 votes
0 answers
10 views

Understanding the code for calculating the 95% confidence interval of AUC using bootstrapping

It's really embarrassing, but I lack statistical knowledge. I would like to find the confidence interval for AUC at 95%. Actually, I got the code from here(https://stackoverflow.com/questions/52373318/...
JAE's user avatar
  • 13
1 vote
0 answers
10 views

Saliency Mesh Computation/Interest Point Detection in Python

I want to calculate salient vertices in a 3D mesh, meaning those points, that are of interest. This paper https://doi.org/10.1007/s00371-015-1199-3 describes well, what I would like to achieve. ...
julianmueller's user avatar
0 votes
0 answers
20 views

How to visualize a decision tree classifier?

I'm using ID3 algorithm to build a classifier and was wondering if there is any way to visualize the decision tree that the algorithm builds. This is my code for a decision tree in Python: ...
Xx_22's user avatar
  • 11
0 votes
0 answers
21 views

Questions about the process of feature selection through feature importance

'Shap feature importance' was obtained through xgboost, and variables with the lowest feature importance were removed one by one from 50 variables until only 1 variable remained. As a result of ...
JAE's user avatar
  • 13
0 votes
0 answers
6 views

How to do Time Series Forecast for data appearing on the same day for different Fiscal Years

I've been trying to figure out a solution to this problem for the past couple of weeks and after all my efforts I realized this is a very niche problem. I'm trying to forecast data for event ...
Minhaz Khan's user avatar
1 vote
0 answers
21 views

Pretrain a Stable Baseline 3 SAC algo from recorded historical / real-life data

I currently have a database recorded from human behavioural (observation, action, reward, next action) with 400k examples collected in real-life conditions. I want to implement a kind of pretraining ...
GerardL's user avatar
  • 13
0 votes
0 answers
10 views

what are Non-AI methods in detecting how much brown pixels an image have

looking for a non-AI approach on how to find how much "brown" color a 256x256 px image have. I am making a dataset that will be used as training data for AI later on. There are several ...
DrakeJest's user avatar
  • 101
0 votes
1 answer
11 views

issue with data sample

...
lyel's user avatar
  • 1
0 votes
0 answers
19 views

Pipelines in SKLEARN

I am building a pipeline. I am downloading a dataset from an online ML repository and generating descriptive stats for it. The link for the dataset is https://archive.ics.uci.edu/dataset/45/heart+...
EngineerP's user avatar
0 votes
0 answers
27 views

I have a poor understanding of nested cv and generalization

I'm not sure if I understand the purpose and generalization of 'nested cv' correctly. I found information online that the purpose of nestd cv is to be able to correctly estimate generalization error. ...
JAE's user avatar
  • 13
0 votes
0 answers
13 views

How can I change my input shape in the architecture for the cnn(transfer learning)?

I have already made a model and trained it, and then saved the model along with its weights. The input shape in that model is [900,300,1] which is [height,width,channel]. I want to use the same model ...
beschichtung346's user avatar
1 vote
0 answers
19 views

Improving Detection Model - Adding image clarification

I trained an object detection model with 5K images, it works most of the time, but I am facing an issue, for few times, the object is not getting detected. So, I planned to retrain the model, for that ...
Vishak Raj's user avatar
0 votes
0 answers
19 views

Generating a Sample T-Distribution in Python

I'm new to DataScience. I'm going through the stats module and the ways to create a sample T-distribution. Using the below line to generate the sample. However, my question is how is the array ...
naveent2785's user avatar
1 vote
0 answers
14 views

I can't understand why the validation and training loss almost constant and not converging?

...
user731995's user avatar
0 votes
0 answers
8 views

Model for k means clustering of last mile logsitics data set

I want to utilize Orange for K means clustering for Network Design for Courier Company using K means clustering. Data set includes Longitude & latitude of delivery points, parcel weight, area type ...
asdcxbx's user avatar
0 votes
0 answers
18 views

What is the best library for time-series analysis?

Recently, I've been using statsmodels, but I would like to know if others work fine for you.
L1rola's user avatar
  • 13
0 votes
0 answers
9 views

Using a neural network to predict disease outcomes in individual cases

I'm working on a research project with the goal of using a neural network to predict disease outcomes for patients. I've built a neural network using Tensorflow and Keras and I've trained and tested ...
Daniel Tveten's user avatar
0 votes
1 answer
28 views

What's the purpose of using MLM when pretraining?

If BERT is a stack of transformer encoders, and the encoder already operates bidirectionally, understanding both left and right contexts and generating contextual embeddings, what is the purpose of ...
user avatar
0 votes
0 answers
15 views

Select estimators for Voting classifier

I don't know the efficient method to select the best subset of the estimator that saves time and highest accuracy. How to choose the best estimators for the Voting classifier? Voting Classifier is an ...
Davann Tet's user avatar
0 votes
0 answers
5 views

Activity Classification through LOG file

I have a big dataset containing logs/steps that the user performed on my webpage (for example: Clicking on a "Homepage" button, typing some text in the field, etc.) These steps are labelled ...
Aayushmaan Garg's user avatar
0 votes
0 answers
23 views

Doing a join between excel tables/sheets in Python Pandas, why do all of the entries in one particular column have the same values after the join?

I have two excel docs: invasive_plants_in_and_around_park_with_compared_and_with_habitat_data_hand_edited.xlsx -with 3 sheets "Species_only_at_park", "Species_only_outside_park", ...
Henry 's user avatar
0 votes
0 answers
22 views

Validation loss and training loss is not increasing in pytorch

validation loss and training loss is not increasing. I try to imply l2 regularization in form of weight decay as 0.05 but I have removed and tried maybe that could be the reason. I have even removed ...
beschichtung346's user avatar
0 votes
0 answers
10 views

Need to print kNN K's together with NNF / STFT covariance matrix

Challenge on printing print kNN K's together with NNF / STFT covariance matrix Effort works for summary covariance but need solution to print print kNN K's together with NNF / STFT covariance matrix ...
Data Science Analytics Manager's user avatar
0 votes
1 answer
49 views

Fine tuning or just feature extraction or both using Roberta?

I'm reading a program that use the pre-trained Roberta model (roberta-base). The code first extracts word embeddings from each caption in the batch, using the last hidden state of the Roberta model. ...
user avatar

1
2 3 4 5
134