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
12 views

Stuck with constant loss and network not learning

I am trying to predict certain function coefficients (output: a, b) based on its curve (input: frequency_response) with the help of https://github.com/Blealtan/efficient-kan (Kolmogorov-Arnold Network)...
SuperKogito's user avatar
0 votes
0 answers
20 views

What is the most accurate way of computing the evaluation time of a neural network model?

I am training some neural networks in pytorch to use as an embedded surrogate model. Since I am testing various architectures, I want to compare the accuracy of each one, but I am also interested in ...
HWIK's user avatar
  • 1
0 votes
1 answer
18 views

Why is my Transformer model outputting the same class for every token and not improving despite decreasing loss?

I'm currently training a Transformer model for a sequence classification task using CrossEntropyLoss. My input tensor has the shape (batch_size, classes, seq_len) and my target tensor has the shape (...
Tobias's user avatar
  • 101
1 vote
1 answer
16 views

Tracking people problem

I am trying to implement a system for counting people in a building using Python and OpenCV, but I have one problem. The system for tracking people doesn't work very well; it can't track a person all ...
user163895's user avatar
1 vote
0 answers
37 views

Why can't I replicate the results from this paper?

I'm trying to train a model to evaluate chess positions, following the methodology from this paper (note that the author presents several different architectures, but I'm only looking at the ANN with ...
William Markley's user avatar
0 votes
1 answer
42 views

How to predict sales in advance using tradition model in time series data?

...
Bad Coder's user avatar
0 votes
0 answers
16 views

What's wrong with my retention chart?

Recently, I had been assigned a problem to draw a retention chart from a given JSON data of user sessions over time. Here's the actual problem statement - "Draw a retention chart, which shows the ...
Vishal Kumar's user avatar
1 vote
0 answers
18 views

python model to predict future performance

I would like to build a python model to predict how a student will perform on a given math test. I have data relating to each student and also their score on up to 100 previous tests that (each ...
lolo's user avatar
  • 11
0 votes
0 answers
9 views

Cost Function Increases, Then Stops Growing

I understand the zig-zag nature of the cost function when applying gradient descent, but what bothers me is that the cost started out at a low 300 only to increase to 1600 in the end. The cost ...
Miguel Angel's user avatar
0 votes
0 answers
7 views

Is this recursive forecasting right for timeseries analysis?

Training a model just to make a quick prototype ...
Juan Cruz Alric Cortabarria's user avatar
1 vote
0 answers
11 views

How to predict Future CPU Usage in Time Series reusing your already trained model?

I'm currently working on a time series problem where I need to predict future CPU usage. I have historical data consisting of CPU usage along with features like hour, day of week, and month. However, ...
Juan Cruz Alric Cortabarria's user avatar
1 vote
1 answer
30 views

Predicted output is only 0s

I am developing a neural network using Home credit Default Risk Dataset. The prediction should be between 0.0 and 1.0 but my algorithm's outcome is just 0.0 for every row. My Code ...
Erevos's user avatar
  • 13
0 votes
0 answers
8 views

Why PySpark `BinaryClasssificationEvaluator` metric `areaUnderROC` returns slightly different across multiple evaluations on the same dataset?

I am using BinaryClasssificationEvaluator in Pyspark to calculate AUC, however, I find that the returned auc across multiple evaluations on the same dataset are ...
helloworld's user avatar
2 votes
1 answer
42 views

Noob question - which NLP/deep learning technique shoud I use

Let's say I have dataset with inputs and expected outputs like this: ...
Cube64's user avatar
  • 21
1 vote
1 answer
41 views

Resources for Integrating Good Machine Learning Techniques (CoursEra preferred)

I've plateaued as a Python programmer. I understand the ins and outs of developing: Cross Validated ML Scripts for a variety of models (Random Forest, SVM, SVR, ...) Multivariate tools (Lasso, ...
Englishman Bob's user avatar
0 votes
0 answers
14 views

Supply weights/number of obs to instead of one obs per row when doing multinomial regression?

EDIT: The code below is using statsmodels but I have the same problem when using sklearn. I'm trying to do multinomial regression using the statsmodels MNLogit package. It says in the documentation ...
anders's user avatar
  • 101
0 votes
0 answers
7 views

How to find out that a conversation with a chatbot is likely ended

I'm working on a ChatBot with Python and langchain, and I'd like to have a metric that I could use to understand how close we ...
user163273's user avatar
0 votes
0 answers
13 views

Latest Tree-based models

What are the latest Tree-based models that are used in machine learning? Tell the new models except the old ones such as the Decision tree, Random Forest, Gradient Boosting, LightGBM, XGBoost, and ...
Madhes Monnish's user avatar
0 votes
0 answers
5 views

Reinforcement learning with Q learning doesn't seem to be learning

I'm encountering an issue with my PyTorch-based Q-learning model. Despite implementing the reinforcement learning algorithm, the model seems to be stuck at the same balance level without showing any ...
ugroon's user avatar
  • 1
0 votes
0 answers
15 views

Multi-class Classification with Categorical and Time-series Features

I have a problem where I want to classify certain entries into clusters, based on their categorical features (such as Country, Category, as dataframe columns), and also their selling pattern (time ...
Leandro's user avatar
1 vote
1 answer
31 views

Validation accuracy can't increase above 70%

I am building a classifying model to predict images over 3 classes. The data is balanced, with 10.5k images for train ( 3.5k for each ), 3k validation images ( 1k each ). I increased my ...
Dragos123's user avatar
0 votes
1 answer
27 views

How to update first layer weights?

I’m trying to make a neural network without using any deep learning library that recognizes numbers in the mnist database. Its structure is: 784 input neurons (for the 784 pixels in the number images),...
Allo Bonjour's user avatar
0 votes
0 answers
52 views

why there is discrepancy in the result of code giving different results in matlab and python?

I want to solve the 1-D transient heat transfer equation Define a 1-D geometry(a line) in y-direction **dT/dt = (k/(rhocp))d²T/dy² I.C. : @t=0, temperature of all elements is 25°C B.C. : The geometry ...
beschichtung346's user avatar
0 votes
0 answers
12 views

Reinforcement learning give reward after finishing the data classification instead of acting one by one and CNN based reinforcement learning

I am trying to write an reinforcement based based trading system and while trying to do that, the only way that I can do and I found is rewarding the model for each action but it actually performs bad ...
ugroon's user avatar
  • 1
1 vote
0 answers
27 views

Validation accuracy stuck in tf keras

So I have a model to classify images into 3 classes. I have 10.5k train images ( 3.5 per each category ) and 3k ( 1k per each category ) validation images but I can't increase my val_acc no matter ...
Dragos123's user avatar
1 vote
0 answers
21 views

Interpreting the SHAP values presented in layered violin plot in SHAP-library for Scikit binary RandomForestClassifier

I am using the SHAP-library for computing feature Shapley values for a binary RandomForestClassifier which has naturally two outputs, 0 or 1. The forest itself consists from 100 decision tree ...
jjepsuomi's user avatar
  • 111
0 votes
0 answers
11 views

Why is my model (using GATv2conv) stuck on its loss? (Predicting same value for every node)

I am trying to create a Geometric Deep Learning model using Pytorch. I have around 5000 graphs, which are split into a training set, validation set and test set. Every graph has one 'correct' node and ...
ThijsTUE's user avatar
0 votes
0 answers
6 views

ways to calculate the accuracy of a object detection model

In case of classification, we will calculate the accuracy by performance of model on test dataset. ...
MohanGandhi's user avatar
0 votes
1 answer
27 views

I have some topics from python out of which I want to know the one which actually needs to be studied for data science roles specifically

The topics are as follows: Collections Itertools Regex and parsing Error and exceptions Date and time
Kanika Dixit's user avatar
0 votes
1 answer
25 views

Optimal combination of variables to minimise output

To be honest I'm not 100% sure how much this is purely a coding issue or a data science issue, but I'll take my chances. I've developed a matrix which is a mixture of various hyperparameters, the ...
Dante Saint-Germain's user avatar
2 votes
1 answer
47 views

How to analyze time series data and create time series model in Python?

I am trying to understand time-series data and model. In youtube tutorial and others, mostly univariate examples are shown. And they are applicable or suitable for those conditions. What if our ...
Bad Coder's user avatar
1 vote
1 answer
28 views

Callback handlers in Langchain

This might be an odd question, but why is there two codes for the class BaseCallbackHandler? https://api.python.langchain.com/en/latest/_modules/langchain_core/callbacks/base.html#BaseCallbackHandler ...
Justin Jonany's user avatar
0 votes
0 answers
19 views

How to view Ep Reward mean when using TensorBoard with stable Baselines 3

I am not seeing ep_rwd_mean when running tensorboard. I can only see ...
Mich's user avatar
  • 111
0 votes
0 answers
26 views

Segment a spectrogram into a series of images by (constant) beats per minute to train a Deep Neural Network

I have a .csv file with information about a soundtrack and it is divided into beats (per minute), which are ordered by row. As in: the index corresponds to each beat, and the columns have info about ...
Johnathan Smitherton's user avatar
1 vote
1 answer
37 views

Improving GPU Utilization in LLM Inference System

I´m trying to build a distributed LLM inference platform with Huggingface support. The implementation involves utilizing Python for model processing and Java for interfacing with external systems. ...
Cardstdani's user avatar
0 votes
0 answers
30 views

Fuzzy Name Matching with Machine Learning. Input data encoding

I have a huge dataset: Last name, first name, date of birth of Indian residents and I need to match them for similarity. The matching is fuzzy, the data looks like this (names are fictitious for the ...
ккк ккк's user avatar
0 votes
1 answer
80 views

Test Error is extremely higher than Training error after gridsearch and crossvalidation

I'm currently working on a machine learning project. It's a supervised learning problem. My goal is to predict for given data of an animal(keeping,size,weight,...) ingredients(energy,vitamine etc..). ...
Marco Cotrotzo's user avatar
2 votes
1 answer
37 views

Techniques for solving the problem with an unbalanced data set

I am trying to solve a problem with an unbalanced data set. I have two classes, one is for patients with risk (1), the other for patients without risk (0). I have a larger number of patients without ...
Naty's user avatar
  • 21
0 votes
1 answer
34 views

Can anyone help me understand this problem in my data?

I tried making a model using the autoTS library but the thing is in the result it gives me the following results. I checked everything there is no missing data but the original data had a missing ...
theunknown's user avatar
0 votes
1 answer
22 views

Cross label two dataframes using arbitrary comparison of two columns using pandas

I have two dataframes each with geometric data (shapely shape files). Call them df1 and df2. The geometry in df1 is a polygon (an area) and the geometry in df2 are points. All polygons are unique and ...
Chad Sexington's user avatar
1 vote
0 answers
27 views

recognition of names, surnames and patronymics

is there an example of neural networks on Github or Kaggle that perform the task of recognizing identical surnames, first names and patronymics? I'm just learning neural networks so it's interesting ...
nanana's user avatar
  • 11
0 votes
0 answers
43 views

Is it possible to train a neural network to feed into a Random Forest Classifier or any other type of classifier like XGBoost or Decision Tree?

I want to create a model architecture to predict future stock price movement as such: The Goal of this model is to predict if the price will go UP or DOWN within the next 3 months. I have tried a few ...
Evank's user avatar
  • 1
0 votes
0 answers
40 views

Can't reduce val_loss when teaching computer vision

I tried everything, improved the architecture, added layers, neurons, but it doesn’t work. Could this be because I'm training images at 384x384 resolution? ...
Роман Чаузов's user avatar
0 votes
1 answer
19 views

What to do if I have a very low metric on one of the classes during multiclass classification?

I trained multiclass text classififer with fasttext. I have a very low metric on one of the classes. Here are results of metrics for each class on test data: ...
user162857's user avatar
0 votes
0 answers
9 views

cGAN: Discriminator loss going to zero while Generator's going always up but the result is very good

I have a Conditional Generative Adversarial Network for Quantum State Tomography. The metrics I am monitoring during the training process are the losses and the Fidelity (the degree of similarity ...
Dimitri's user avatar
  • 23
2 votes
1 answer
83 views

How do I interpret probability results in conjunction with my known precision/accuracy/recall scores?

I have a Random Forest Classifier (trained with sklearn) modeling a binary data set. Here's what the configuration looks like (I've tuned it for precision intentionally): ...
Colin's user avatar
  • 123
1 vote
0 answers
71 views

Learning from label proportions

Can someone please tell me how to implement this algorithm via this paper in simple Python as possible? I asked for code from the author but got no reply after 7 months of retrying. EDIT: Added code ( ...
SamTheGoodOne's user avatar
0 votes
0 answers
8 views

How to implement CP tensor completion with extra calculations?

I am new to tensor decomposition. I want to know from a practical point of view, how to use an already known tool/library to compute CP factorization for tensor completion. Specifically, I want to ...
jjjj's user avatar
  • 1
-2 votes
2 answers
47 views

Determining the threshold value for the neural network

I have a dataset with last name, first name, middle name of people participating in sporting events. I need to train a neural network that will match similar surnames, first names and patronymics. But ...
nanana's user avatar
  • 11
0 votes
0 answers
12 views

How to know the tendencies from a dataset of two columns of categorical values

This is a dataset and my task is to find out the answer of the question: Do men tend to prefer Product A more compared to women? How to approach? If there was numerical values in both columns we could ...
Man_From_India's user avatar

1
2 3 4 5
135