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

Free dataset to train a neural network in order to extract text from image

I'm building a custom OCR to recognize and get text from png image. In order to dealing this task, i'm using python with tensorflow library (1.14.0) to develop a Convolutional Neural Network that ...
1
vote
1answer
25 views

average of 2 classification reports

is there a way to take the average of two classification report? so if I have this two reports ...
0
votes
1answer
12 views

Question about balancing training data for sentiment analysis (machine learning)

My question is about when to balance training data for sentiment analysis. Upon evaluating my training dataset, which has 3 labels (good, bad, neutral), I noticed there were twice as many neutral ...
0
votes
0answers
6 views

upload model to S3

Hello I'm using AWS Sage Maker to build my model. I want to store the model in S3 for later use. How do you save your model in S3 with Amazon Sage Maker? I know this seem trivial but I didn't ...
0
votes
1answer
11 views

What is the best way to match street addresses in a dataset in Python?

I have a dataset of land parcels owned by the government and I am attempting to match street addresses to an existing list of government agencies. I've used fuzzy matching and used a regex that ...
0
votes
0answers
5 views

NEAT keeps telling me “Exception: No such config file:”

I am trying to make the code from this tutorial run on my computer: https://github.com/Vedant-Gupta523/sonicNEAT I have an exact copy of the config-feedforward file in a .txt document on my desktop. ...
-2
votes
0answers
8 views

Create Pandas data frame using dictionary and list [closed]

index = {'California': 2000, 'California': 2010, 'New York': 2000, 'New York': 2010, 'Texas': 2000, 'Texas': 2010} ...
2
votes
1answer
25 views

Custom functions and pipelines

I'm not really used to working with pipelines, so I'm wondering how can I use custom functions and pipelines. Situation: I want to fill some missing values with the mean but using groups based on ...
0
votes
0answers
6 views

value of fit_generator parameters

I am doing simple CNN based binary image classification on classifying types of waste as organic and recyclable using image augmentation. How ever I have a doubt. In the third figure i have set the ...
0
votes
0answers
16 views

Imblanced-data: Need assistance with SMOTE technique for a CNN input

I am trying to apply the SMOTE sampling technique to over-sample the minority class of a multiclass (5-class) problem using the convolutional neural network. As far CNN requirement, the input shape ...
1
vote
0answers
7 views

Good database/plug-in to scrape for academic paper info?

I am trying to scrape the web to find information about a set of academic papers. Unfortunately, for many of the papers, I only have the author's name, a year and part of a title. (For example, [...
0
votes
1answer
10 views

How to Get Live Data Updates & Graphing with Tableau Public

I'm a big fan of Tableau's easy-to-use data visualization tools. I tried building dashboards with Python's dash package, but it was too complex for me and Tableau ...
0
votes
1answer
12 views
0
votes
2answers
14 views

How to add jpg images information as a column in a data frame [closed]

I have jpg images stored in a folder. For ex: 11_lion_king.jpg,22_avengers.jpg etc. I have a data frame as below: ...
0
votes
0answers
26 views

ValueError: shape mismatch: objects cannot be broadcast to a single shape

I want to plot a plt.bar but my code won't do it? My code is as follows. It's getting triggered at line: plt.bar(t[1:], gr, label='Quarterly growth rate') ...
0
votes
0answers
14 views

Pandas Key Error: Fine Above/Below Error [closed]

I have a pandas series such that: ...
-2
votes
2answers
15 views

Replacing column values starting with [closed]

Hi the following is my data frame. I would like to replace all the values in in item_id colum to just FOODS.
0
votes
1answer
16 views

How can I tokenize a text file with BERT or something similar?

I want to use the twitter datasets in a project and the tweet contents look something like this: ...
0
votes
0answers
8 views

Dask error when reading data from a large zip file

I have a .zip folder with a lot of .csv files which I read into a Dask DataFrame like this: ...
0
votes
1answer
16 views

Storing and collecting data

I wanted to ask you which coding language I should use. I am pretty new in coding and could really use some help. As I mentioned above I want to create a survey and afterward store my results in a ...
0
votes
2answers
17 views

Strange out of memory while loading lots of pictures before input CNN for deep learning

I’m using the TFlearn, and want to classify pictures to two category. But the strange out of memory while loading lots of pictures before input CNN for deep learning. The RAM is 64 G in my deep ...
3
votes
5answers
340 views

Applying a keras model working with greyscale images to RGB images

I followed this basic classification TensorFlow tutorial using the Fashion MNIST dataset. The training set contains 60,000 28x28 pixels greyscale images, split into 10 classes (trouser, pullover, shoe,...
1
vote
0answers
9 views

Applying a keras model working with greyscale images to RGB images [duplicate]

I followed this basic classification TensorFlow tutorial using the Fashion MNIST dataset. The training set contains 60,000 28x28 pixels greyscale images, split into 10 classes (trouser, pullover, shoe,...
-1
votes
0answers
12 views

Confused how to apply KMeans Clustering algorithm on my dataset to predict the difficulty level of a course

How can I apply clustering on this dataset to predict the difficulty level of a particular course in this dataset there are many student and each student has opted every course.
6
votes
2answers
114 views

Understanding XG Boost Training (Multi class classification)

I have been working with XG boost for classification (multi class classification : 6 classes) I use 5 fold CV to train and validate my model. Please refer to the ...
0
votes
0answers
12 views

Recommender System Web Application

First of all I apologize if posting such thing is against the rules here, but I did a Google research, and actually did lots of it, however couldn't get the answer I wanted and wouldn't know where to ...
0
votes
1answer
18 views

Finding TN,FN, TP, and FN for arrays using confusion matrix

My prediction results look like this TestArray ...
-1
votes
0answers
4 views

Can I add an RL layer to improve my LSTM sequence predictor?

I have a sequence predictor which generates the next number in a series based on the training data and input sequence provided.
0
votes
1answer
19 views

switch case python TypeError: unhashable type: 'numpy.ndarray' [closed]

I run switch case on python, but i keep getting error following: ...
0
votes
0answers
14 views

numpy elementwise multiply vector and matrix that have the same number of rows [migrated]

I have a matrix and a vector that both have n rows. I would like to have the kth row of the matrix be elementwise multiplied by the kth element in my vector, without a for loop! I have already tried ...
0
votes
0answers
13 views

Coding backpropagation in python

I understand maths better than Python but I would like to progress in Python. It would be amazing if someone would like to talk about it with me. I have a feedforward neuron network with only one ...
1
vote
1answer
27 views

Find the Weight Values using Linear Regression Analysis in Python

I have the equation below, which is a noise quality metric of an image: If the BIQS is 1, it means the image is clean. Else, if ...
0
votes
0answers
14 views

Transformers and BERT: dealing with possessives and apostrophes when encode

Let's consider two sentences: "why isn't Alex's text tokenizing? The house on the left is the Smiths' house" Now let's tokenize and decode: ...
0
votes
1answer
16 views

Standardizing features by one specific feature

I am working on a project with a dataset that looks something like the following: ...
0
votes
0answers
14 views

Implementing Scikit Learn's FeatureHasher for High Cardinality Categorical Data

Background: I am working on a binary classification of health insurance claims. The data I am working with has approximately 1 million rows and a mix of numeric features and categorical features (all ...
0
votes
3answers
14 views

How to order a python dataframe by adding the row values?

I have the following dataframe: M1 M2 M4 M5 N1 45 46 54 57 N2 32 36 29 56 N3 56 44 40 55 N4 57 43 42 54 How is it possible to order ...
0
votes
0answers
6 views

what is problem ? row[i] = int(row[i]) TypeError: 'str' object does not support item assignment [closed]

a = [] for i in range(3): row = input() for i in range(len(row)): row[i] = int(row[i]) a.append(row) print(a)strong text
0
votes
2answers
19 views

How can I replace some words in my text file by keywords provided in another file using python? [closed]

I'm new to Python. I have two files. one file contains text, the second contain keywords.Here is a sample of the keywords file : ...
1
vote
0answers
14 views

Preparing text for modeling in dialogue structure

I'm working on implementing the DialogueGCN code from this paper. Its a model that classifies the 'emotion' from utterances of text within a conversation. As this model takes into account speaker ...
0
votes
0answers
15 views

Mean encoding With KFold regularization

I just learned that regularizing the mean encoding reduce the leakage hence generalize better than mean encoding without it but I made 2 submissions with XGB in <...
-1
votes
0answers
8 views

What models are good for pattern creation of tracking codes?

I am new to machine learning, so I have a beginner question. I have a business case for determining if the tracking code received from a carrier is valid or not. I would like to generate patterns ...
0
votes
0answers
5 views

Viewing single band images with Tkinter

Has anyone found a Tkinter compatible image viewer for single band images (i.e. view red band only in a GUI)? In the past I have used PIL.ImageTK.PhotoImage to view RGB images in Tkinter, but when ...
6
votes
3answers
2k views

Are there any projects to work on the Internet to fight against COVID?

Are there any open source projects that a novice data analyst and mathematician can do, to fight against covid-19 epidemic? I mean, I know that the best I can do is to stay away from people and now I ...
0
votes
1answer
27 views

Val Accuracy not increasing at all even through training loss is decreasing

I am training a model for image classification, my training accuracy is increasing and training loss is also decreasing but validation accuracy remains constant. Here is my code: ...
1
vote
0answers
18 views

How to find the position of a company given other companies in a Pandas DataFrame with Python

So I have a Pandas DataFrame. I am doing some data analysis with Python with some sets of ...
0
votes
1answer
14 views

Is it cheating to stratified sample the whole dataset based on a previous evaluation result?

I trained a model using a small mri dataset(57 patients). The model's performance was so low(Train set 0.7, Val set 0.7, Test set 0.45). I found the model segment tumor in upper part of brain well, ...
0
votes
0answers
9 views

Performance Metric Over Expected Value Functions that are Changing

I am trying to find a way to calculate a profitability metric for a model of mine. I currently have data labels corresponding to the value earned during each certain move made in my training set. My ...
2
votes
0answers
22 views

Seaborn Histogram: Unexpected gap at center of data

I'm going through this YouTube series on simulation by The Coding Train. I'm trying to graph some filtered random numbers, but seaborn is leaving an odd gap in the very middle of the histogram. My ...
0
votes
0answers
8 views

How to properly structure a train/validation input generator in Tensorflow 2.1

I'm struggling to understand why my generator does not work. I am working in Tensorflow 2.1 with Tensorflow Transform(tfx) created TFRecord shards. The below example works for my tf.estimator pipeline....
0
votes
0answers
13 views

Tensorflow data API: Building continuous streams of data from a Dataset of Datasets

I'm trying to build a language model with LSTMs (like ELMO). I've got a lot of documents and want to split them into words as input, but keep their order. So it should get all words of the first ...

1
2 3 4 5
85