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
5 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
7 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
10 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
6 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
15 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
7 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 ...
0
votes
1answer
28 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
19 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 ...
0
votes
4answers
27 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
13 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
8 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
21 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
0answers
12 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
17 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
23 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
24 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
25 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 ...
0
votes
0answers
40 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
21 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
14 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
12 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
-2
votes
0answers
17 views

LSE linear regression [closed]

I have the following: Training set - X values mapped to 4 different y values [400x5] Test set - X values mapped to 1 y value [400x2] The objective is to get the best function which minimizes the LSE....
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
16 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
5 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
18 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
22 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
14 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
20 views

Top-K vs AUC - communicating results and next steps

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 ...
-2
votes
0answers
14 views

KeyError: 'tweets' [closed]

i am having issues with sentiment-analysis with flask api , it giving me error,kindle share some knowledge thanks in advance ...
0
votes
0answers
9 views

Preprocessing of images [closed]

Except for edge detection, what other techniques in opencv do you recommend for pre-processing of x ray images to be used in detecting soft tissues and joints? Thank you in advance for your help.
0
votes
0answers
9 views

Correcting for seasonality on multiple timelines

I have many time-series of economic data, broken down quarterly. There is always an element of seasonality in each timeline, but it can very wildly. See the below charts: I'd like to correct for ...
0
votes
2answers
12 views

How to retrieve column names from applying a wrapper method in feature selection?

This question probably has a simple answer to it, so I will get to the point... How do I retrieve the names of the columns from applying a wrapper method in feature selection? Code I have used: ...
-1
votes
2answers
34 views

Machine Learning for medical researchers [closed]

My friend is a medical researcher and he want to use machine learning for prediction. Is there any one who is not a computer science person and he learnt programming and machine learning in a very ...
0
votes
1answer
13 views

Trying to run a kaggle notebook

I'm found an interesting problem on kaggle and more or less solved it with my limited knowledge of machine learning. I was curious how other people solved and checked the solution with the highest ...
1
vote
0answers
14 views

Interpreting in higher dimensions with maximal spacing

I have data that I would like to interpret in higher dimension (sort of the opposite of an auto-encoder). What I intent to achieve is, an m dimension data being ...
1
vote
1answer
19 views

How to determine whether a semantic concept is present in a string

I need to find a way to detect if a large string contains a specific substring. Imagine that I have a full contract page converted to string in my Python program. What I want to do is to say if a ...
0
votes
1answer
26 views

Problem reading python code

Can someone explain the following python code. value_geojson["features"][0]["properties"]["title"] value_geojson is a geojson ...
0
votes
2answers
37 views

Error when trying .transform for OrdinalEncoder from Scikit Learn

I'm having a lot of issues using scikit learn recently and was hoping someone could help me with my problem. I can use other methods to ordinal encode but i want to figure this one out. ...
2
votes
1answer
65 views

ML/NN as Function Evaluator for further Optimization (maximization) - Practical Example

I am working on a production optimization problem; a very similar idea to what is described by Vegard Flovik How to use machine learning for production optimization. The following image, taken from ...
1
vote
2answers
26 views

How do I calculate distance of test data point from centroids in KMeans scikit-learn?

I am using Kmeans clustering on my data After training the model, I want to calculate the distance between Test Data points and CLuster centers. How do I do it? ...
0
votes
0answers
22 views

different results than in tutorial about matplotlib and heatmaps [closed]

According to a tutorial/blogpost I should get the value '20.00 ' when running the following code: ...
0
votes
0answers
27 views

Confusion Matrix after XGBoost is showing positive as negative class

Please can you help me with confusion matrix. I've implemented the XGBoostClassifier. After fitting the model when I looked to the confusion matrix to view the performance on Test data. The confusion ...
0
votes
2answers
21 views

1
2 3 4 5
100