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
-1
votes
0answers
7 views

Synonymous word suggestion Model

I want create a machine Learning model which will suggest synonyms of the words of a sentence which can adapt to user usage. I am targeting Continuous Learning Model for this purpose. I have already ...
1
vote
0answers
9 views

Forecasting using Boosting methods on Non-stationary Time Series data

Theoretical Noob question - Can we use boosting methods to effectively forecast the future after being trained on a non-stationary time series? Or do you train/fit on the residual of the training set ...
0
votes
0answers
5 views

Why is the GAE usually caculated looping backwards over the rewards?

I've recently implemented a PPO-Agent in Python, which uses the GAE as Advantage estimator. Almost all Tutorials on this matter calculate the Advantage looping backwards over the rewards: ...
0
votes
0answers
9 views

Incremental learning for Gradient Boosting Classifier & Random Forest Clssifier

I have been trying to get a method to incrementally learn additional data which my model for both random forest and gbm to consume as and when we get it. I can of course retrain the model everytime I ...
0
votes
0answers
9 views

Close set and open set classification at the same time

Is it possible to use a neural network(or another approach) to classify image based on trained data and at the same time if new image classes are introduced in the test set it should classify those ...
1
vote
0answers
12 views

How to compare hyperparameter tuning in R and Python

I tried random forest in both R (Caret) and Python (Scikit-learn), but the results differ drastically. Pearson correlation between predicted value and actual value was 0.2 in python whereas 0.8 in R. ...
4
votes
1answer
61 views

Why removing rows with NA values from the majority class improves model performance

I have an imbalanced dataset like so: df['y'].value_counts(normalize=True) * 100 ...
2
votes
1answer
12 views

What to replace outliers with? (supermarket transaction data)

I have a transaction dataset from a supermarket. Let's say the average spend is $50. I want to get each customer's average spend and rank them based on where they fall based on this $50 average spend. ...
1
vote
2answers
15 views

TypeError: Expected sequence or array-like, got <class 'tensorflow.python.keras.callbacks.History'>

I am training a CNN, it runs well but I get an error when I try to get precision_score, recall_score and the ...
-1
votes
0answers
5 views

Any tips on making an auto reader? [closed]

So I am creating an auto reader in Python. I don’t necessarily need it to read it to you but I would, at least, make it highlight or italicize the letters. Is there any modules or command strings ...
2
votes
1answer
17 views

What does IBA mean in imblearn classification report?

imblearn is a python library for handling imbalanced data. A code for generating classification report is given below. ...
0
votes
0answers
10 views

Saving the Autoencoder predicted image to a new directory

I trained an autoencoder model in Keras to generate denoised images given noisy images. The predicted images are stored in the "result" directory, with the individual filenames appended with ...
0
votes
1answer
22 views

Get most likely topic per document in pandas dataframe using gensim

I am using gensim LDA to build a topic model for a bunch of documents that I have stored in a pandas data frame. Once the model is built, I can call ...
1
vote
0answers
15 views

Is “nb_steps_warmup” set for each episode or globally?

When I configure a DQN agent, nb_steps_warmup can be set. Is this parameter set for each episode or once globally? What I am trying to ask is, imaging I have a game ...
0
votes
0answers
14 views

Finding clusters of 3D points where not all the points belong to a cluster

In my research, I'm trying to find clusters of brain activity, like in the following image: Where the red dots represent the origin of the activity (where the green pole is the direction). So ...
0
votes
0answers
15 views

How to predict future prices with Keras LSTM time-series prediction model?

I have a trained and tested LSTM model which is meant to predict Ethereum close prices using all time csv data (24h steps). How do I now go about inputting an empty dataframe with future dates to ...
0
votes
1answer
21 views

ValueError: Shapes (None, 7, 7) and (None, 7) are incompatible

I am new to deep learning. I have been trying to train a VGG16 model to detect different emotional categories from a CSV Dataset. However, When I run the code for fitting the model below ...
0
votes
1answer
18 views

Using Palmer Penguins Dataset Instead of Iris Flower Dataset

I have been trying to replace the Iris Flower dataset with the Palmer Penguin dataset for a neural network tutorial. I am using the tutorial at https://www.kaggle.com/antmarakis/another-neural-network-...
1
vote
0answers
14 views

How much memory will be required to train EfficientDet D7 for object detection?

I am planning on doing some object detection once I collect my image database and annotate the images. I'm going to use the TensorFlow 2 detection Model Zoo, as it offers a great selection of pre-...
0
votes
0answers
17 views

Mask RCNN 1 class only

I am looking to use only one class, person (along with BG, background), for the Mask RCNN object detection. I am using this link: https://github.com/matterport/Mask_RCNN to run the mask rcnn. Is ...
0
votes
0answers
8 views

Fetching Google Analytics data

I've looked in to the Kaggle datasets to find what kind of web traffic data exists in general. I found the dataset https://www.kaggle.com/mkechinov/ecommerce-behavior-data-from-multi-category-store ...
2
votes
2answers
40 views

Why does my random forest classifier predicts one class more often?

I have a random forest classifier that predicts 0 class about twice as often as class 1. It also predicts class 0 with higher probabilities than class 1. It is not a imbalanced dataset. I tried ...
-1
votes
1answer
32 views

What’s the most suitable programming language for AI development? [closed]

For the past couple of years I’ve been learning how to use Python to script. But I would like to start getting into scripting more things like computers and AI. So, with that said, and please no ...
1
vote
0answers
24 views

Tensorflow: How to load/restore a FULL model (.pb, .pbtxt, .graph, .ckpt, variables, events)?

I recently switched from PyTorch to TF (1 and 2) and I am trying to acquire a good workflow with it. The simple things I want to do are the following: Load a full pretrained object detection model ...
1
vote
4answers
32 views

Visualising feature selection results for multiple classifiers and feature subset sizes

I am using information gain feature selection technique to get different features subset sizes for my dataset, like so: ...
0
votes
1answer
13 views

What layer to consider for embeddings when building a encoder-encoder model?

I am currently building a encoder-encoder based model with cosine loss function. The dataset is supervised learning. Here's a basic encoder, ...
1
vote
0answers
16 views

Machine translator giving only on character as output for all the words

I had trained a machine translation model using 1.4 million examples.( hindi to english ). strangely the loss plateaus at the same point 0.8301 and while trying the inference the output is always the ...
0
votes
0answers
9 views

ValueError: array length 13996092 does not match index length 214200 for Kaggle submission

My model is based on the model linked here on Kaggle. Specifically, the following lines of code to generate an uploadable table to make my submission: ...
1
vote
0answers
42 views

Region Proposal Network - How to subsampling 256 fg/bg anchors

I am trying to understand training process of RPN. I have problem with creating mini batches of 256 anchors. If features map has shape 18x25=450 and every position has 9 anchors it is 4050 potential ...
1
vote
1answer
23 views

One-Class classification

I am currently using an one class classification svm and I am trying to boost the classification results by employing more than one svm-occ with varying gamma parameters and combine these decisions ...
1
vote
1answer
18 views

Spacy - Ignored (essential) entities during labeling - how important is this aspect?

I'm training a custom Spacy model. Does it affect the results whether I leave entities unlabeled? For example, Germany is LOC. In one example (1) I label this. In the other example (2) I ignore it and ...
1
vote
1answer
32 views

How to impute missing value in Test Set using a custom Imputer created on training dataset

I am working on a toy project to predict claims. One of the input features has null values on which I have applied a custom imputation technique. Under this technique, I replaced missing values with ...
0
votes
0answers
26 views

Impute missing values in feature column on the basis of Target column

I am working on a toy project for insurance claim prediction. In the input data for one of the feature (numeric data type) half of the values are missing. My target variable is binary which indicates ...
0
votes
1answer
28 views

How to interpret my logistic regression result with statsmodels

so I'am doing a logistic regression with statsmodels and sklearn. My result confuses me a bit. I used a ...
1
vote
0answers
45 views

How to interpret my logistic regression result?

I'm having a hard time to interpret my result of the logistic regression. I have a few question. Firstly, how can I check if a feature is more important to the others, like that there is a real ...
0
votes
1answer
24 views

Finding cause and effect correlation in a dataset

What methods might one use in order to find and analyze cause-and-effect in a dataset? An example might be something like plotting this: ...
0
votes
1answer
20 views

How do I get Multiple CSV files (csv file names will be column names) from a folder to a pandas dataframe?

I think the title is enough for what is my problem here. I have 100 tickers in a folder. I got all csv files to one list. but I wanna see the tickers name which these are csv file names. what should ...
1
vote
0answers
13 views

Is it possible to perform Semantic Textual Similarity without using NLTK and Genism?

College restricted us to make projects in object oriented programming languages but without using any other libraries except standard ones. We can not use APIs also
3
votes
1answer
17 views

Extract date/duration from text

The text and output to be extracted are similar to the following : "Check it every two weeks" - two weeks "Check it on day 1 and day 14" - day 1 and day 14 "day 19 and day ...
0
votes
1answer
17 views

How to Connect Convolutional layer to Fully Connected layer in Pytorch while Implementing SRGAN

I was implementing the SRGAN in PyTorch but while implementing the discriminator I was confused about how to add a fully connected layer of 1024 units after the final convolutional layer My input ...
0
votes
0answers
6 views

Unidentified Image error while loading images on Google Colab

I'm writing a code to make movie genre classification with movie posters. I opened a github repository where I put all the posters and cloned it on Colab. Until here, eveything works fine. When I'm ...
0
votes
0answers
19 views

object detection algorithm for video

Is there any way to convert the detected object from an object detection algorithm (Mask RCNN in my case) to a white silhouette (while the background has been set to black)? I have commented on the ...
0
votes
0answers
19 views

ValueError: Could not guess the value column! Please hand it to the function as an argument

I'm using the tsfresh library to extract features on my data but I keep getting an error: ...
0
votes
0answers
7 views

Why Spyder Python throwing error in I/O operation despite it?

Why Spyder Python stated that my code has error valued I/O operation & [SpyderKernelApp] ERROR | Error in message handler while when I run in PyCharm or copy it in Jupyter the code seems fine? ...
3
votes
1answer
23 views

how to programmatically introduce grammatical errors in sentences

I've a set of sentences in English language. I'm exploring ways to create a dataset of sentences with grammatical errors programmatically. The following options has been tried out randomly - identify ...
0
votes
0answers
27 views

Custom Machine translation not giving correct output even when using the training data for prediction

Python : 3.7 Tensorflow : 2.3 model : ...
0
votes
0answers
13 views

Feature Engineering and prediction with R and python

I have a sequential dataset, and have 2000 rows for 300 ID. I have 20 variables (i.e in my real dataset) ...
0
votes
0answers
13 views

How to use pivot_table on a dataframe? How to handle exceptions.UFuncTypeError?

I tried to use the pivot_table function on a dataframe. This was working at the beginning now I get all the time errors, and don't really get why. ...
0
votes
1answer
15 views

Is it ok to fill a pandas dataframe with NaN values?

Is it correct to fill a pandas dataframe with NaN values? In specific: if I have a dataframe with a user name and his age is it ok to fill the age column with int and NaN values. ...
1
vote
0answers
21 views

Top-K vs AUC - communicating results and next steps [closed]

I have a bi-LSTM multi-label text classification model which when training on a highly imbalanced dataset with 1000 possible labels gives a top-k (k=5) categorical accuracy of 86% and a focal loss of ...

1
2 3 4 5
100