The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [python]

Use for data science questions related to the programming language Python. Not intended for general coding questions (-> stackoverflow).

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

Find the most relevant columns for each single class in pandas

The following question (this one) did not help me. I have a big dataset, and I want to know which Columns are the most relevant for the Target Variable. I know that, in my case, for each class in the ...
1
vote
1answer
20 views

Combining multiple neural networks with different activation functions

I have 3 neural networks where each has as a different activation function: Sigmoid, Tanh and Softmax. I am planning to average their final predictions, but as we know the functions doesn't have the ...
0
votes
1answer
65 views

Tensorflow error: Input signature not matching inputs

I have been stuck on this one for awhile and I hate this website so I wouldn't post here unless I've tried everything else but I've been following Sentdex's tutorials on Youtube about Deep Learning ...
0
votes
1answer
22 views

How to Split And Resample Imbalanced Dataset Into Train, Validation and Test

I want to understand how to split the imbalanced data set with a binary target variable where 87% of the samples are negative and 13% of the samples are positive. Now, I know that you should always ...
0
votes
1answer
22 views

Gradient decent in Python

I just finished working on my first machine learning algorithm i.e Linear regression. I want to reduce the rmse by optimising the model. I found out that gradient decent does the same job. But i dont ...
0
votes
1answer
15 views

MobileNet and MobileNetV2: Bad Inference Results

unfortunately I am having subjectively bad results in inference with pre-trained models of both MobileNet v1 and v2: ...
0
votes
0answers
25 views

Backpropagation incorrect only for hidden layer bias node

I am trying to implement a neural network in Python, however I am having some trouble when it comes to the implementation of backpropagation. I have been checking my results with this example and ...
0
votes
0answers
15 views

How to find zone of image?

Hello.! I have been working on a gujrati handwritten dataset to identify character using kNN. i'm not able to find the zone of image like above in python. please help me..!!
0
votes
0answers
14 views

Neural Network to classify target subitens?

Nowadays i am doing a research project where i am allowed to classify given a sample from a large dataset with an already existed sample/target model the belonging target, but in my project there are ...
0
votes
1answer
22 views

Probabilities of a Poisson distribution not making sense

I am trying to find probabilities of orders a restaurant gets on Sunday's. For last 6 months average orders are 1000 without any big anomalies like 700 or 1300. This is a case of poisson distribution &...
1
vote
1answer
23 views

Sklearn classification report is not printing the micro avg score for multi class classification model

There are 6 class labels encoded as 0,1,2,3,4,5 While executing classification report score it outputs accuracy,macro avg,weighted avg .The micro average score is missing in the output . Im not ...
0
votes
1answer
38 views

Sublime Text 2 with Pandas for Excel (Combining Data) & Data Visualization

I'm new to programming with Python, and so far it's been a headache to create a build environment- and need your support and expertise in this area. Background I'm running a MacBook, and using ...
0
votes
1answer
16 views

Drawing validation set from test set

I am building a 3 neural network models on dataset that is already separated to train and test sets. From my analysis, I found that this dataset has values on test set which don't exist in the train ...
1
vote
1answer
27 views

Normalize the output of a dense layer with linear activation

I have the following architecture of my network: ...
0
votes
1answer
26 views

General approach on time series for customer retention/churn in retail

I have a time series of data in the following form: ...
0
votes
1answer
15 views

Why is my prediction using ARIMA better if I'm using less historic data?

I have a data set containing hourly electricity prices for since 1.01.19 until September. Since the process turned out to be (weakly) stationary, I applied an ARIMA model in Python in order to predict ...
2
votes
1answer
30 views

Hierarchical Clustering: Extract observations from large heatmap

I'm currently trying to visualize a large data set as heat map. That in itself works smoothly but I struggle with gaining insights from interestingly looking clusters. Specifically, I have two ...
1
vote
1answer
16 views

Split time series by python or by keras?

In Python you can use TimeSeriessplit() to split a time series properly for training but you can also do the same(?) in Keras by TimeseriesGenerator. Which one is recommendable? And/or what are ...
0
votes
0answers
19 views

How can I build a dataset with a few numerical attributes and an image attribute

I'm gathering data to make a dataset but I got a problem in this case I want to build a dataset containing height, age, sex and a picture from bones but I don't know in which format and how I can do ...
2
votes
1answer
21 views

Neural Network Multiple | Averging predictions

I am training multiple neural networks with various parameters. I am trying to average their predictions, but I am not really sure what that means, I am confused about what to average exactly. Here is ...
0
votes
0answers
4 views

Pandas dataframe manipulation [migrated]

I am working on cleaning a huge dataset using python. I have a data frame with 20,000 rows that looks like this: ...
-1
votes
0answers
20 views

Issues with YOLO training

I want to detect plates using on this dataset, I follow this tutorial But an error generated in the beginnig of the training: Any idea how to fix this?
0
votes
0answers
17 views

Get new features from map using pickup/destination longitude and latitude to improve arrival time expectation

I am learning a model to predict the estimated time of delivery for orders. Specifically, from the instance of driver pickup to the point of arrival at its final destination. I attempted this with ...
2
votes
1answer
41 views

Tensorflow uses more memory, the more epochs it completes

I created a genetic algorithm "optimizer" for Tensorflow but it is written in python. I know TensorFlow was not designed like this and I need to rather create the optimizer in C++ using their API's ...
0
votes
0answers
9 views

GradCAM heatmap all negative

I've fully trained the VGG16 model on my dataset, resulting in a 97% validation accuracy. I'm using the code from this github: https://github.com/PowerOfCreation/keras-grad-cam but for 2 of my 16 ...
0
votes
0answers
59 views

Building a speech commands dataset for audio recognition applications

I'm working on a DL project to recognize (10 - 15) Arabic speech commands from a continuous stream of audio, and I want to create a dataset similar to Google's Speech Commands dataset. Fortunately, I ...
0
votes
0answers
9 views

play session from ratings dataset in Movie20 M

I need to extract listening sessions from the ratings dataset which has the columns cols = [userId movieId rating timestamp] timestamp is just a number for eg 1112486027 listening sessions are ...
0
votes
1answer
13 views

How to perform preprocessing for hyperspectral images

Here I would like to apply the CNN and DNN for face recognition computing and later will compare that both of them which one is better or faster My idea is - In the UWA hyperspectral face database, ...
1
vote
0answers
9 views

Google Collaboratory Downloaded Libraries and Files Location [closed]

So, when using Google Collab, by default it's actually a built-in Python environment in the browser, right? Usually, user will import library from Unknown location into Collab. I said Unknown ...
0
votes
1answer
23 views

What do graphs of signal vs background neural network outputs represent?

For example, this image shows the output of a neural network I assume but I am not sure how the output is not symmetric. So if the neural network gives a .6 for signal it should give a .4 for ...
-1
votes
0answers
11 views

How to save trained TF-IDF model in database

I have a TF-IDF object like so: from sklearn.feature_extraction.text import TfidfVectorizer v = TfidfVectorizer() x = v.fit_transform(intent_data["sentence"]) I ...
-1
votes
1answer
16 views

How to plot datasets 1 factors for K mean clustering python

I'm unable to plot the data for K mean clusering algo usingsklearn as it throws this error : TypeError: scatter() missing 1 required positional argument: 'y' Here is the function I have written to ...
-1
votes
0answers
8 views

Matching phrase using TF-IDF and cosine similarity

I have a dataframe that looks like this: ...
1
vote
1answer
63 views

Create Nodes/Edges From CSV (latitude and longitude) for Graphs

The Ultimate Goal: I want to find the shortest and coolest (in terms of temperature) path between two points (for a given pair of latitudes and longitudes on the map)! I am aware of algorithms like ...
2
votes
1answer
28 views

Different X, Y input shapes

I'm creating a CNN model in keras to categorise data. There's 150 features (represented as columns), each of which has a label of 1 to 9. The issue is I'm confused about how to use this in Keras since ...
0
votes
1answer
22 views

Finding cosine similarity score

I have a dataframe that looks like this: sentence intent hi greeting hello greeting buy this buy whats up conversation . . What I'd like ...
0
votes
1answer
26 views
0
votes
0answers
13 views

How to use countVectorizer and TfidfVectorizer?

I am new to data science and trying to figure things out. I have been asked to create a countVectorizer with binary counts of 1-grams and TfidfVecortizer with 1-gram, both avoiding English stop words. ...
1
vote
1answer
2k views

Distractor Generation for Multiple Choice Questions

I'm currently working on generating distractor for multiple choice questions. Training set consists of question, answer and 3 distractor and I need to predict 3 distractor for test set. I have gone ...
0
votes
1answer
22 views

Reward is converging but actions taken by trained agent are illogical in reinforcement learning

I am training a reinforcement learning agent using DQN. My state space has 6 variables and the agent can one action which is discretized into 500 actions My reward structure looks like ...
0
votes
0answers
11 views

Training object detection models from the scratch without using pre-trained models and weights

I have a data set of 25 images. I wish to run Faster RCNN or yolov3 object detection models on this images.I want to create my custom trained model and get weights after running say 10 epochs. Later I ...
1
vote
0answers
24 views

XGBoost speed issues

I'm trying to optimize the hyperparameters for XGBoost, thus needing to run it multiple times with different parameters. However the time needed to run single XGBoost with the parameters provided ...
-1
votes
1answer
28 views

Finding most selling item everyday from dataset [closed]

Given a dataset: ...
1
vote
1answer
37 views

Python First Project: Algorithm that find a book and its author from a quote

I hope this is the good site for my question. I am new with Python and I am neither a programmer nor a data scientist. I would like to code an algorithm that given a book quote can find the book's ...
1
vote
1answer
19 views

Dividing the weights obtained on an already standardized data set by the standard deviation of the features? (Ridge regression)

I'm trying to understand a code snippet from my lecture on Machine Learning (see the code below). It extracts the mean and standard deviation of the features and uses them to 'normalize' (...
1
vote
1answer
12 views

How to construct validation set for time series for NN?

I would like to train my model with a validation set. As the data is a time series I have to use timeseriessplit: ...
1
vote
2answers
35 views

Pandas: How can I update dataframe values? [closed]

I have two spreadsheets where one is updating the other. How can I update this data using the pandas library? Example, where 'b' updates 'a': ...
0
votes
1answer
27 views

What is seed in Keras?

I have seen 'seed' parameter in many codes of Keras. I have a code example here: ...