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
2answers
30 views

Tensorflow / Keras Python CNN

I'm doing a project where a python script used a convolutional neural network to determine if a plant is healthy, and then water it based on that. While training the CNN, it seems to get up to 100% ...
-1
votes
0answers
11 views

can we mix 100 or more audio files with noise file in python?

I have a dataset of 100s. small audio files, I want to add noise in that dataset to make a noisy dataset. Please help me if there is any method to add noise at a time in all audio files
0
votes
0answers
8 views

How to get the accuracy from merged models?

I am implementing hybrid RS using collaborative RS and content based RS. Collaborative RS with Artificial NN with MLP and content based RS with Skip-gram model. I have merged these to into a ...
0
votes
0answers
10 views

Alternative means of clustering streams of incoming facial recognition data

I have a time-series dataset of incoming face data. Each data point is a facial-feature-vector of length 256 that represents the facial features of a person (it is generated by a modified RESNET). ...
0
votes
1answer
14 views

Can we do multivariate time series analysis using holt-winter ( Exponential smoothing) method?

Just like we have a method like ARIMAX and SARIMAX where we can provide exog and endog variable for perfroming multivariate analysis. I was hoping is there a way, we can achieve same using ETS as well....
1
vote
0answers
18 views

Is there an existing way to find out if there is an association between two words in a sentence using NLP

So, I was working on word2vec , playing with it and although it's a great tool for finding similarities between two words,But when we come to finding a semantic association between two words it cannot ...
0
votes
0answers
8 views

Neural network - calibration strategy & cross-validation

I have a hard time articulating the different parts of a calibration process of a relatively vanilla neural network. I am mostly concerned with : Grid search for the regularisation hyperparameter ...
1
vote
0answers
18 views

Possible?: Split pdf file on pages where object detection algorithm finds custom object

I have scanned documents in large pdf files consisting of many individual documents. Each document begins with a exhibit number sticker, much like this one: example. The files are scanned in greyscale....
0
votes
0answers
20 views

Possible?: Split pdf file on where object detection algorithm finds custom object

I have scanned documents in large pdf files consisting of many individual documents. Each document begins with a exhibit number sticker, much like this one: example. The files are scanned in greyscale....
1
vote
1answer
12 views

how to read emotion label of MSP-IMPROV dataset samples?

I need to read MSP-IMPROV dataset audio file's to conduct research. I read the help file that says 15th character of the file name, shows the emotion label of each utterance. For example: MSP-IMPROV-...
1
vote
0answers
26 views

What is the difference between sklearn's transform() and predict() methods?

What I have understood thus far is that transform() gives you values that are qualitatively similar to X (your features) and predict() gives you values that are qualitatively similar to y (your labels)...
0
votes
1answer
22 views

Find matches between columns and manipulate data based on match

I have a pandas dataframe that contains two columns, components, and sub-components (first table below). I would like to add a product column as shown below (second table). The problem is, some (not ...
1
vote
0answers
16 views

Split-Half Reliability Python

I have a pandas dataframe of baseball stats that I have transposed that looks as follows: Each column represents a separate plate appearance for a player. Each player can (and usually is) represented ...
0
votes
1answer
37 views

How to fix the index value that I use for X_test and y_test?

I am writing code for SVR. Therefore, I have generated my code as the requirements. But I am stuck on writing codes for the ...
0
votes
0answers
14 views

multi-label prediction with pySpark

I am new to Spark I am using pyspark to predict a multi label results. I have converted multi labels to binary So my labels will look like this ...
0
votes
1answer
14 views

Adding and multiplying higher values based on different columns of a dataframe

I am trying to calculate scores based on different values in the dataframe. Since these scores are based on different conditions, I am having problems where in the final calculation, which I need in a ...
0
votes
0answers
26 views

how to install darknet in windows?

I was following the instructions given on https://pjreddie.com/darknet/install/ But when I go to the directory darknet and try to make, I get the following error: ...
0
votes
0answers
17 views

How may I may fit the cluster number while it is going to the outside of the X-axis and when visualizing clusters in two dimensions?

I am writing code for DBSCAN clustering. I find the eps value which is 0.12 with the help of ...
0
votes
1answer
25 views

CSVs: how to output missing data to make processing easier?

If supplying data (that can be either string or numeric) via CSVs, what's a good strategy for marking that a value is missing? Some non-empty sentinel, like NA ...
0
votes
4answers
49 views

Clusters: how to improve results for text classification

I am trying to classify texts using kmeans, TfidfVectorizer, PCA. However, it seems that many texts are not correctly classified as you can see: I have texts in cluster2 that should be in Cluster 0 or ...
1
vote
1answer
27 views

Update a pandas data frame column using Apply,Lambda and Group by Functions

I have a data frame in the format mentioned in the screenshot below. Column 'Candidate Won' has only 'loss' as the column value for all the rows. I want to update the Column 'Candidate Won' to a value ...
0
votes
0answers
11 views

Logistic loss increasing while training with minibatches using the adam algorithm

I am trying to write my own code to use the adam algorithm for logistic regression. I am pretty sure It is training correctly as when I run it I am able to accurately classify a bunch of toy data that ...
0
votes
1answer
8 views

What's the best graphic in R to study air pollution?

I have a Python dataframe (in addition to an excel file) with data on air pollution for countries, (one line every day between 2014 and 2020). I would like to see what's the polluant the most related ...
0
votes
1answer
20 views

.split() function doubt

Here is a line of code str(x).split(' ')[-1][1:] The split function within its parenthesis has ...
0
votes
0answers
16 views

Bar-chart naming issue in Python code

I have a problem with labelling this bar graph. The 'blue' bar that indicates ML has 5 ml models and I'm trying to rename each of the 5 blue bars given into 5 ml model names obtained from the 'index' ...
0
votes
1answer
18 views

Are there any tools/ python packages for Fuzzy Grouping?

I'm trying to get to a tool for Fuzzy Grouping as I do not have a reference column for matching the string. Is there any package on Python or R? I looked at a package called textpack but the results ...
1
vote
1answer
21 views

How to add a new column with labels in a dataframe?

I have thousands of sentences that I would need to label based on their sentiment. An example is ...
0
votes
0answers
10 views

Machine learning. Input: set of distributions, Output: distribution

I have a set of features where typical machine learning techniques do not work very good. All features have very different distributions, some heteroscedasticity is also present. The distribution ...
0
votes
1answer
16 views

Using Random Forest Regression correctly

I have run Random forest regression with python and I have the fear that I haven't done it correct. I have original image that has 3 different bands (each pixels has 3 values) and I want to try to ...
1
vote
1answer
26 views

Text comparison: spot the differences

I would like to know what would be the best approach to compare two texts and see the differences between them. For example: ...
0
votes
1answer
14 views

Generate dataframe series from current series which is a list of objects

I currently have a JSON object that looks like this ...
0
votes
0answers
8 views

Send one row at a time from one data table to another data table using the Orange Data Mining python script

I would like to know if there is a possibility to make a loop somehow work on orange, where this loop consists of the script (1) pulling one line at a time from the database and throwing it to the ...
0
votes
0answers
6 views

Fetch Intermediate “Keras Model -> ResNet50” output in a Keras model “Source Model”

I want to create a feature extractor model that has the same input as my Source_Model but the output from the intermediate model- "ResNet50". Fetching intermediate layer output is possible but I want ...
0
votes
1answer
23 views

How to detect medicine name from the medicine wrapper

I have got medicine wrapper ( Packaging ) of different medicines. I want to detect medicine name out of it. I'm using Google Cloud Vision to extract all the text from the medicine wrapper. Text ...
0
votes
1answer
66 views

pandas TypeError: 'range' object cannot be interpreted as an integer

I'm following this link for time-series forecasting. While splitting data set to create the data for the uni-variate model this ...
1
vote
1answer
21 views

Handling a Pandas Data Frame containing multiple non-ordinal categorical features

I'm currently trying to analyse a dataset containing multiple non-ordinal categorical features and a binary target variable. The table looks something like this: ...
0
votes
0answers
11 views

Build networks to study users’ behaviour

I have a dataset containing a list of users that published tweets through time. I would like to build the network through time. Would it something that I could do with this data? Sample of Dataset’s ...
0
votes
0answers
21 views

Factor Analysis of Mixed Data : Correlation of categorical variables togeather

I have a dataset containing mixed-type data (categorical & numerical) and want to explore the dataset further. Following this post (https://nextjournal.com/pc-methods/calculate-pc-mixed-data) I ...
0
votes
2answers
25 views

Error when trying to run RandomForestClassifer with Pipieline and GridSearch

I am trying to run a RandomForest Classifier using Pipeline, GridSerach and CV I am getting an error when I fit the data. I am not sure how to fix it. Will appreciate any help on this. My code is: ...
0
votes
0answers
9 views

how can I show how my categorical variable is spread between different age group

I have a dataset which has two numerical attributes(Age, EstimatedSalary) and one categorical variable(Gender). I have visualised how age is distributed in different age groups using ...
0
votes
0answers
10 views

Clustering products across different countries

I have a requirement wherein I have to identify the products to which a new product will be similar upon it's launch. I am thinking about clustering the products together. The problem is that the ...
0
votes
0answers
15 views

Python- forecast for time series using continuous hidden Markov models

I have a dataset with a time series containing the revenue that my company does every day. I want to forecast the revenue that we will have for the next day. I have tried different models(ARIMA, LSTM,...
1
vote
1answer
24 views

How to get two boxplots on same axis?

I have two dataframes (both of different lengths, etc) but they have exact same columns and I would like to explore the distribution of one of these columns by plotting a boxplot. However, how do I ...
0
votes
0answers
17 views

Sentiment analysis classifier

I would like to build a sentiment classifier from scratch. To do it, I would like to consider to manually assign scores using ngrams. However, I do not know how to assign a score to these ngrams. Do ...
1
vote
1answer
35 views

Google OR-Tools - Routing - Penalties - Adding Different Penalty to Different Location (Python)

I am using Google's OR-Tools for route optimisation. References can be found here. I am performing an optimisation where certain pick-up locations are dropped based on a penalty at each location. The ...
0
votes
0answers
16 views

Correct way to use k-means cluster- python-scikit-learn

I am working with Python, pandas and scikit-learn. I have a dataset where I have the number of sales per shop. I have the date and the hour of this sales and I want to forecast the sales for the next ...
0
votes
0answers
7 views

Visualize multiple causes

Goal: Visualize why loans are rejected which can be due to multiple reasons. A loan is either rejected or accepted. Any rejection is caused by one or more rejection reasons. There is a list of ...
3
votes
2answers
192 views

Is it acceptable not to transform() test data after train data is being fit_transform()-ed

We know that the best practice in data preprocessing (such as standardization, Normalization, ... etc) is that while we perform fit_trasform() on the training data, ...
1
vote
0answers
54 views

Iterative Reweighted Least Squares in python

I am trying to manually implement the irls logistic regression (Chapter 4.3.3 in Bishop - Pattern Recognition And Machine Learning) in python. For updating the weights, I am using $w' = w-(\Phi^TR\...
0
votes
1answer
17 views

How to preprocess data for image classification from a .txt file?

Basically my issue is that im building an image classification model using AlexNet. I have this pre-split dataset thats already split into training, test, validation. However the issue is that these ...

1 2 3
4
5
93