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
1 answer
12 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
26 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
0 votes
0 answers
14 views

Automated detection between single and multi agent RL algo

I am not sure if this post belongs here, please let me know if it doesn't. I have multiple RL scripts of both single agent (PPO, DQGN), and multi agent(MADDPG, MAA2C). I am looking to build a ...
Brie MerryWeather's user avatar
1 vote
1 answer
15 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
37 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
27 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
0 answers
10 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
16 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
4 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
14 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
  • 101
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
9 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
17 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
20 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
25 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
18 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
14 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
6 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
0 votes
0 answers
8 views

Add a custom loss in a public github repository on distillation

I’m trying to implement a custom loss in a public repository regarding knowledge distillation. The link to the repository is the following: " https://github.com/DefangChen/SimKD " The main ...
PiEmmeC's user avatar
0 votes
0 answers
10 views

How are the cross validation and training processes interlinked here?

Please consider the code given below. ...
Masroor's user avatar
  • 101
1 vote
2 answers
65 views

Affine 2D mapping in python

I have two sets of 2D data $A$ and $B$ (representing 2D positions on a 2D plane $x,y$) which are related (the first pair of $x,y$ of $A$ is related to the first pair of $x,y$ of $B$ for instance). I ...
patjol's user avatar
  • 11
0 votes
0 answers
24 views

Which model should I select for a Multivariate Time Series interpolation where I have covariates and missing dates?

I have data with the sales of stores across a two year timespan. Sample data: Date Target Store Sales Target Store Promotion Sales_Store1 Promotion_Store1 Sales_Store2 Promotion_Store1 2022-06-27 30....
Notorious's user avatar
0 votes
0 answers
42 views

Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:3! in DPOTrainer with ec2 G5 12X Large

...
Sandun Tharaka's user avatar
1 vote
1 answer
53 views

why validation accuracy is stuck at 75%?

i am using tensorflow=2.15.0 and keras associated with it I have made a cnn network to identify a total of 2294 images into 10 different classes or, data is divided as 229 images are contained in each ...
beschichtung346's user avatar
1 vote
0 answers
49 views

Negative MNIST - Trying to understand what's going on here

I'm new to machine learning and pytorch and any insight would be greatly appreciated. I've been playing around with the MNIST number recognition dataset and thought it would be interesting to train ...
Sloth Man's user avatar
  • 111
0 votes
0 answers
21 views

ValueError with matmul Single Class Sep. mismatch in its core dimension 0

Single Class Separation Problem Creating custom NMF function with custom weights updates (nmf_updateH) and (nmf_updateW). The goal is to compute Single Class Separation (NMF). **Effort to update H is ...
Data Science Analytics Manager's user avatar
3 votes
2 answers
123 views

How bootstrapping works for prediction intervals?

I'm experimenting with prediction interval (PI) over univariant time-data using skforecast pythonic package.. in the documentation it is mentioned that: Prediction intervals A prediction interval ...
Mario's user avatar
  • 396
0 votes
0 answers
7 views

Seeking ML Model Recommendations for Enhancing OCR on Corrupted Text Images

I am working on a project where I need to perform Optical Character Recognition (OCR) on text-based images. However, these images are corrupted in various ways (e.g., blurred, distorted, low ...
Nurbek Ss's user avatar

1
2 3 4 5
134