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
3
votes
1answer
22 views

How do I minimizie cost for EV charging?

I want to find a charging schedule that minimize cost of charging an EV. The main objective is to have a fully charged car for the next morning, but the sub objective is to minimize cost based these ...
3
votes
1answer
242 views

Character-level embeddings in python

I'm working on an NLP task that requires the use of character level embeddings, and I've been trying to use Spacy. However, it seems that spacy uses word-level embeddings for the word vectors, and I ...
0
votes
1answer
13 views

Error during the compilation of a neural network in Vitis AI, "Not found op in super_const_dict: name: Decoder_Section_1_UpConv_1/kernel"

I'm following a Xilinx Tutorial about the implementation of a Neural Network in a System on Chip (ARM Processor + Xilinx FPGA) and I have come up with an error during the compilation step. I've ...
0
votes
1answer
72 views

Syntax error but nothing appears to be wrong?

I'm trying to create a decision tree, and everything appeared to be going smoothly until I encountered this syntax error. I don't see what the issue is? ...
0
votes
1answer
729 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 ...
0
votes
0answers
9 views

How to predict a certain time span into the future with recurrent neural networks in Keras

I have the following code for time series predictions with RNNs and I would like to know whether for the testing I predict one day in advance: ...
0
votes
1answer
17 views

Test data missing values

I've been given a test and train data set, and I have null values in my test data set. What do I do with it?
1
vote
0answers
23 views

How to implement kfold and cv into Hybrid feature selection and evaluate the classification model performance?

I have been working on a Hybrid feature selection combined with hyperopt package for hyperparameter tuning and I am thinking about evaluating the performance of several model classifiers. I looked ...
2
votes
4answers
83 views

Are there ML Libs in Python robust to missing data?

So I was searching on how to handle missing data and came across this post from Machine Learning Mastery. This article states that some algorithms can be made robust to missing data, such as Naive ...
4
votes
3answers
514 views

Best platform to work with when having millions of rows in dataframe

I have table with around 20 features and millions of observations (rows). I need to create model base on this table, however, as it is huge, training models like random forest or XGB takes forever. I'...
0
votes
1answer
18 views

Working of Dense Layer

What kind of operation does Dense Layer perform to reduce dimemsion. So basically I have used Dense layer to compress the dimension all the time like from 10000 neurons to direct 2000 neurons or even ...
0
votes
1answer
152 views

Text classification analysis based on similarity

I have been reading a lot of literature regarding text classification and different approaches/models, especially using Python language, but probably I am still missing something on how to build the ...
1
vote
0answers
16 views

How do I use number of hours as index in timeseries forecasting?

I have a dataset that has number of hours (consecutive value) and total sales in that 1 hour in my dataset. See below for head of the dataset: ...
0
votes
0answers
9 views

Convert a simple NN model to LSTM model (made using Tensorflow.compat.v1)

I have a simple neural net which I would like to convert to an LSTM model. Can someone please help me with the code? The following code contains the neural net part: ...
2
votes
1answer
35 views

Do we need to pre process both the test and train data set?

I've been given 2 datasets , and there are missing values in both the test and training data set. Do I need to pre process test.csv also or is it only train.csv?
0
votes
1answer
217 views

CVNN and Tensorflow

How the algorithm use Complex Value Neural Network ( all complex value, like: input, weight,bias and output) in python
0
votes
1answer
99 views

LSTM model prediction is almost constant

I am new to RNN and LSTM and currently experimenting with different settings. When trying to model time series data in absolute terms (predicted close price), I am faced with the following problems: ...
0
votes
0answers
9 views

Architecture for ConvLSTM

I have an input data with 2000 samples each having shape of (5, 3, 178, 178) where 5 is time dimension, 3 is a color channel, and the rest are x and y-axis. Now I want to use ConvLSTM layer to predict ...
1
vote
2answers
115 views

Similarity between two time series with different sampling frequency, different amplitude, and different lengths but taken from the same source?

I have two files with accelerator readings and I want to get some metric/ measurement to get the similarity between these two files. I have tried Pearson’s R coefficient, dtw distance, dtw score. ...
0
votes
0answers
3 views

Which tool do you use for creating continuous training pipelines for MLOPS?

One key component of MLOPS is continuous training. Which means the end to end training is put in a pipeline which can be triggered, versioned and metadata of the pipeline can be tracked. Thus enabling ...
0
votes
0answers
43 views

Python xgboost predicting future events

This is related to this article: https://towardsdatascience.com/forecasting-of-periodic-events-with-ml-5081db493c46 I found it interesting and tried to replicate it, having as a result a xgboost ...
1
vote
2answers
51 views

How to combine two time dependent datasets?

I'm very new to data science so please be gentle. I have a dataset that contains record of occurrence of fire for the past 35 years (+-700.000 rows). Each date and time can have more than one ...
0
votes
1answer
43 views

Grouping similar rows to detect duplicates

I have a dataset containing all the real estate ads for sale in the process of publishing a city: ...
2
votes
1answer
281 views

Create new column in Orange using Python Scripting Widget

This is a fairly basic question. How do you create a new column in Orange - based upon an existing column? For example: NewCol = 2 * ExistingColumn or ...
1
vote
2answers
1k views

Feature scaling for MLP neural network sklearn

I am working with a dataset where the features have multiple scales. Before running scikit-learns's MLP neural network I was reading around and found a variety of different opinions for feature ...
0
votes
1answer
3k views

GridSearchCV() to fine tune outputs ValueError and FitFailedWarning

I want to fine tune some parameters for my linear SVM. This is the code: ...
2
votes
1answer
375 views

How to do time series regression without scikit and numpy in Python?

On a recent Hackerrank interview I was faced with the following problem: Given a set of timestamps (format 2019-11-26 11:00) and their corresponding stock prices (single float value), approximate ...
0
votes
1answer
14 views

Keras ImageDataGenerator unable to find images

I'm trying to add image data to a Kaggle notebook so I can run a convolutional neural network but I'm having trouble doing this via ImageDataGenerator. This is the ...
1
vote
1answer
3k views

hyperparameter tuning with validation set

For what I know, and correct me if I am wrong, the use of cross-validation for hyperparameter tuning is not advisable when I have a huge dataset. So, in this case it is better to split the data in ...
2
votes
1answer
39 views

Reading the classification report of evaluation metric?

I am using the "classification_report" from: from sklearn.metrics import classification_report in order to evaluate a classification model. How can I ...
1
vote
1answer
35 views
0
votes
1answer
19 views

How do I feed my keras model in batches?

I am trying to feed a Sequential model in batches. To be reproducible my example, suppose my data is: X=np.random.rand(24,432) Y=np.random.rand(24,432) My goal is ...
0
votes
1answer
182 views

Vertical lines of overlapping points in Seaborn Swarmplot

When I plot my data to see its distribution via Swarmplot, these two vertical lines that seems to even overlap occur in the figure. It seems to occur even around values that are not that dense, such ...
0
votes
0answers
7 views

Training fasttext on your own corpus

I want to train fasttext on my own corpus. However, I have a small question before continuing. Do I need each sentences as a different item in corpus or can I have many sentences as one item? For ...
2
votes
1answer
539 views
1
vote
1answer
34 views

Minimum number of features for Naïve Bayes model

I keep on reading that Naive Bayes needs fewer features than many other ML algorithms. But what's the minimum number of features you actually need to get good results (90% accuracy) with a Naive Bayes ...
2
votes
2answers
539 views

Is One Hot Encoding Vectorized?

Sorry for such a weird question - I do not even know if this makes sense, however I thought of this during my intro to Python course at uni and have wondered about it since. So I have some ...
0
votes
1answer
29 views

Wrong loss function outperforming correct loss function?

Dataset I have a dataset which is in the following format: 834 inputs: 2 floats between 0-1, and 832 integers created from one-hot-encoding 64 values (13 classes per value). 4096 outputs: Each is a ...
1
vote
0answers
19 views

AI algorithm model that outputs a list of unknown length [closed]

I have a dataset with the following x columns: date time is_weekend is_holiday start_intersection end_intersection The output is a list of intersections, that connect start_intersection with ...
1
vote
1answer
26 views

Multioutput prediction using LSTM encoder decoder with Attention

(I am working on Jupter notebook with python version 3.6.12, running Tensorflow 2.4.0 version.) I have a dataset that consists of 5 input features and 3 output features (that requires to be predicted)....
2
votes
2answers
73 views

Fraud risk propagation in large scale network

What's the best approach to do some graph analytics and risk propagation in a network using python where multiple accounts are connected through a relationship and few of the accounts in the network ...
0
votes
0answers
13 views

How to decide number of hidden layers and number of neurons for Autoencoder for dimensionality reduction function?

I have been looking into deep learning and what caught my attention is the implementation of Autoencoder as a dimensionality reduction function for anomaly detection. I found out about it through the ...
0
votes
0answers
5 views

Preprocessing for Transfer Learning Model with an Inception Network

I am trying to build an image classification model using an Inception Network as the base. This is a simple binary classification model. My images are available in many smaller directories within one ...
1
vote
1answer
110 views

Face Recognition with Video File

I have built a face recognition model based on Pyimagesearch Tutorial It works great on images but the issue I am facing is with videos. I am recognizing the faces frame by frame(5fps). It gives me ...
0
votes
1answer
35 views

How to identify/recognize that a sentence about talks about future?

Brief Introduction: I have a report/paragraph in which there are sentences with reference to future plans/outlooks/expectations for a particular entity. I want to extract all such sentences for now. ...
1
vote
0answers
103 views

spatio-temporal event prediction

I have data that has some features such as latitude, longitude, timestamp, and category of an event. So the data set only has the events that actually took place. The thing is, I am wondering if there ...
1
vote
2answers
134 views

Is there any clustering algorithm to find longest continuous subsequences?

I have data which contains access duration of some items. Example: t0~t5 is the access time duration, 1 means the items was accessed in the time duration, 0 means it wasn't. ...
1
vote
2answers
3k views

How to run AgglomerativeClustering on a big data in python?

I run AgglomerativeClustering on a sample of data and fit a model. then I decide to predict this fit for all of my data but I got MemoryError. How can I run ...
0
votes
0answers
10 views

Shap after scikit pipeline - feature name

I'm using pipeline to transform data and predict model and I want to apply SHAP after that. However, when I apply it, it returns SHAP chart just fine, but the name of the feature are like feature 1, ...

1
2 3 4 5
115