Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

Python is a general-purpose, dynamic, strongly typed language with many 3rd-party libraries for data science applications.

0
votes
0answers
4 views

Keras regression adding model depth

I am experimenting in keras (without really knowing what I am doing) with adding in model depth, and when I attempt this I get an error: ...
0
votes
0answers
8 views

Execution time of the same algorithm for different runs

There is this ongoing discussion with me and my advisor. We have a Deep Learning algorithm (does not matter which one it is, I believe, such as CNN, LSTM etc..). We are using 4 GPU Nvidia machine ...
0
votes
0answers
8 views
0
votes
0answers
2 views

Visulazing a specific value of a column with the corresponding values

I have recently started using data studio to make visualizations before diving into analysis and data prep! I have a column named "NAME OF STORE" that good different names and other columns like: ...
0
votes
0answers
4 views

Anomaly detection on text data using one Class SVM

I am working on an Anomaly detection problem that is first of its kind for me. I am able to do data cleansing and train the model however I have no idea on predicting results, as it is new for me and ...
0
votes
1answer
15 views

how to plot three graph line in one graph with datetime (with time_interval = 4h)using panda python

I want to plot the graph with datetime . I saw so many questions similiar to my questions. But that answers didn't work for me. Here is the code that I used: ...
0
votes
0answers
12 views

is there any package in python similar to tidyrin R? Except Pandas

is there any package in python similar to tidyr in R? Except Pandas
0
votes
0answers
9 views

How to measure correlation between several categorical features and a numerical label in Python?

I have for a few weeks measured the time it takes for a product to be released through a automated release pipeline. I have several different categorical features such as "Product Category", "Product ...
3
votes
0answers
24 views

Scaling does not speed up the SVM model

I tried to standardize the training data with samples of 629,145 rows and 24 features: ...
1
vote
0answers
22 views

ImportError: DLL load failed: The specified module could not be found

Getting a error when trying to import tensorflow library for tensorflow gpu help ...
2
votes
0answers
9 views

Should one normalize the frequency values when feeding it as an input to machine learning model?

Consider an unsupervised data. The data is in the form of a csv file( I am using pandas dataframe for this). Its a web page data at different time steps and the way I am converting data to be fed to ...
2
votes
1answer
25 views

Pytorch: How to create an update rule the doesn't come from derivatives?

I want to implement the following algorithm, taken from this book, section 13.6: Here, the neural networks' outputs are $V(S, w)$ and $\pi(A|S,\theta)$, parameterized by $w$ and $\theta$ respectively....
2
votes
1answer
23 views

Find best machine learning for predicting category of products

I have a dataframe that contains product and in this dataframe I have some features like: brand, cat1, cat2, ...
4
votes
1answer
33 views

How can I plot/display a dataset or an image distribution?

I want to view a specific image or a dataset's distribution, and see if they are different. Does simply writing something like : ...
1
vote
1answer
13 views

Arguments in python fast.ai that are not in the function definition?

Blockquote I have been coming across function calls that use arguments that are not in the function definition. I would like to know how that works (i.e. how the compiler interprets this). For ...
2
votes
1answer
22 views

Multivariate Time Series Binary Classification

I have continuous (time series) data. This data is multivariate. Each feature can be represented as time series (they are all calculated on daily basis). Here is an example. ...
1
vote
1answer
18 views

Change priority of cell execution in jupyter notebook?

I am sometimes in the following situation: I want to execute two cells: Cell 1 takes on the order of 10 minutes or hours. Cell 2 will take 1 second. I'd rather execute cell 2 first and see the result,...
1
vote
0answers
12 views

How to shape one-hot data for keras lstm

I am trying to learn how to make an LSTM in keras and I was having difficulty working out what input dimensions the data needs to be for the cudnnlstm layer. Each time I try to alter the input_shape I ...
1
vote
0answers
31 views

Two-sample K–S test Kolmogorov–Smirnov test in Python

For my evaluation, I have three different time-series data of the following format with different characterstics where the first column is timestamp and the second column is the value. ...
3
votes
1answer
29 views

Is shuffling training data beneficial for machine learning?

I was curious to know if shuffling ML training data is beneficial to better results? Sorry not a lot of wisdom here, but I have been reading a post from pythonprogramming.net for this topic. I ...
1
vote
1answer
16 views

gpu pytorch code way slower than cpu code?

I have the following pytorch code in a jupyter notebook: import torch t_cpu = torch.rand(500,500,500) %timeit t_cpu @ t_cpu Which outputs: ...
0
votes
0answers
7 views

Different testing and training accuracy values within a NN TensorFlow structure

In order to select the optimum number of my gradient descent algorithm, I had used a for loop of 1500 iterations and each 100 iterations training and testing accuracies are printed. Here everything is ...
0
votes
1answer
6 views

Sequence to sequence RNN model, maximum number of training size

So when running this example script from Keras repo (https://github.com/keras-team/keras/blob/master/examples/lstm_seq2seq.py), I found that we can easily run into out of memory for the input or ...
1
vote
0answers
12 views

Training anomaly detection on text string [on hold]

I have text string stored in a column, resulting after pre-processing of web traffic data. Now I want to apply anomaly detection on it and for that purpose I applied ...
3
votes
0answers
30 views

Why I am getting prediction score 1 i.e. 100%

I am reading few parameters and trying to predict target value using Linear regression and GB. Surpicingly I am getting score = 1 on test data. How come? Can anyone tell me whats wrong with this code? ...
1
vote
0answers
13 views

R NbClust for Python?

Is somebody know a Python equivalent to R NbClust? I'm searching for a way to determine the optimal clusters number for many 'similar datasets' and NbClust sounds good but it's for R and i'm a Python ...
1
vote
0answers
7 views

Get Decision Tree Prediction With Random Forest

If I give random forest parameters as RandomForestClassifier(n_estimators=10,bootstrap=False,max_features=None,random_state=2019) Should it be creating 10 same ...
1
vote
1answer
11 views
1
vote
1answer
9 views
1
vote
0answers
12 views

How to add three csv file into one LSTM using python

I have three csv files with same inputs but values are different. I want to add these three csv file into one LSTM model to predict value. Hare I upload the three different csv file and my LSTM code....
1
vote
0answers
14 views

Lidar Data augmentation

I am working on Object Segmentation using Lidar 3D point clouds, basically using Kitti dataset. However, the dataset is imbalanced for classes cyclists and pedestrians. So, I am looking for ways to <...
1
vote
0answers
7 views

Pandas DataFrame Rollup Error

I am trying to compute Percentage Contributions on a pandas dataframe. I have a data frame which has three columns (Buyer, Product, CountofProductBought). I create a new dataframe using groupby at ...
0
votes
1answer
21 views

How is this tensorflow command interpreted?

I am reading an introductory tutorial on tensorflow here, and I'm confused about the code that defines an input layer for a word2vec embedding: ...
1
vote
0answers
22 views

Selecting on multiple criteria [migrated]

I made this dataframe, which contains dates as datetime64 values. What I want to do is a bit of a stupid example, but it illustrates my point of selecting on multiple criteria. I want to: For the ...
-1
votes
1answer
12 views

How can I perform clustering on a list of words and ratings as columns?

I want to perform clustering to give words meaning like good, neutral and bad. My dataset is in the format : ...
2
votes
1answer
51 views

ML regression poor performance

I am experimenting with 3 years time series electrical demand data (kW) for a building and attempting to create regression supervised ML models from sci kit learn regressor algorithms but I have very ...
1
vote
1answer
15 views

Autoencoder doesn't learn to reduce dimesions

I coded a neural network from scratch in Python. I tried it with the XOR problem and it learned correctly. So I tried to encode an Autoencoder with 3 inputs (and therefore with also 3 outputs) to ...
1
vote
0answers
26 views

Installing NLTK using WHL file -

I have previously used WHL (wheel) files to install various Python packages. But, it seems there's no such file for NLTK. Any workaround for this please? https://pypi.org/project/nltk/ The problem ...
1
vote
0answers
11 views

How to develop custom metric with one class priority Keras

I tried like this. I get InvalidArgumentError, but I assume I am doing this completely wrong, I just don't know how to implement in in Tensorflow. ...
2
votes
1answer
19 views

Normally distribute occurence or counts

I am creating a mock of sales data. One of the columns is salesperson_id where each id can occur more than once (a salesperson can have multiple sales). I want to ...
1
vote
0answers
9 views

How to find out the subject of an email (in the form of a sentence) or a pdf document in NLP using Python

How to find out the subject of an email (in the form of a sentence) or a pdf document in NLP using Python. If I do topic modelling and get different groups of topic, how do I pick out the only topic ...
0
votes
0answers
18 views

How to convert a time series data which can be fed to a Machine Leanring model for unsupervised learning?

I am very new to time series data. I am working with server data and want to classify if the bunch of server times are healthy or not. My data looks like this in pandas ...
0
votes
0answers
8 views

How to use TF-IDF with tensorflow in Python 3.5? [on hold]

TF-IDF could be implemented with Tensorflow-transform. However, Tensorflow-Transform is not supported in Python 3.5. I know about sklearn's TfidfVectorizer() but I want to utlize GPU for it, hence, ...
1
vote
0answers
17 views

How to shift output of predict values into the x (input) column 0 values using Neural network in python

The inputs here are the 3. The output here (LSTM) is the probabilities that the next x1 input ought to be. Means here I have x,x1,x2 input values. 1st three inputs LSTM output1 and then next if x ...
1
vote
1answer
15 views

Online vs Batch Learning in Latent Dirichlet Allocation using Scikit Learn

Reference: https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.LatentDirichletAllocation.html I'm looking at the LDA algorithm from Scikit Learn for topic modeling. Can someone ...
2
votes
1answer
40 views

How to extract the sample split (values) of decision tree leaves ( terminal nodes) applying h2o library

Sorry for a long story, but it is a long story. :) I am using h2o library for python to build a decision tree and to extract a decision rules out of it. I use some data for training where labels get ...
3
votes
1answer
18 views

Group datetime64 values per week in dataframe

I want to plot a bar of my data grouped per week. I made the following dataframe, with nonsense data, but it should do the trick. What I want to do is plot per week a bar chart (%) Does anyone know ...
1
vote
1answer
31 views

Is it possible to plot decision boundaries for only a subset of features?

I have a sklearn Random Forest classifier with 59 features as input. I'd like to plot the decision boundaries of only two features at indices i1 i2. If I use the average/median values for the ...
2
votes
0answers
17 views

Time Series Forecasting RNN: Masking Values

Suppose you have missing values in a time series E.g. : t1 x1 y1 t2 ? ? t3 x3 y3 t4 ? ? t5 x5 y5 You are trying to forecast this time series using a recurrent ...