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

Getting NN weights for every batch / epoch from Keras model

I am trying to get weights for every batch / epoch from Keras model after it is trained. To do so I use callback to make model save weights during training. Yet after model is trained it looks like I ...
0
votes
1answer
15 views

Object detection stops predicting well according to how I collect the images

On my problem I have to use 4k resolution (3840x2160) to record images and detect qrcodes at the same time. The images I end resizing it to 1920x1080 to save it on disk. The problem is that if I train ...
0
votes
1answer
16 views

How is the Fully Connected Layer of a cnn network trained?

When training a cnn network, only the filters are updated, but how are the Fully Connected Layer weights updated?
1
vote
1answer
34 views

How to normalize technical skills of IT using machine learning?

I have a huge collection of skills collected/scraped from various online sources. It was huge effort done by our team. Now, the biggest challenge we are facing is trying to normalize the skills back ...
0
votes
0answers
20 views

how to set gridsearchCV to ignore the errors

I want to use GridSearchCV in Python for my Logistic Regression model, and i want it to check combinations for every possible setting, but i get an error when there is time for penalty: l1 and solver ...
0
votes
0answers
5 views

How to do a “Model.deploy” inside a “PythonScriptStep” in Azure?

I have an AutoML Pipeline em a need to do an deploy models ...
0
votes
0answers
15 views

NLP - Found input variables with inconsistent numbers samples

I'm trying to train a model to read the greetings from the sample dataset collected from Tripadvisor and I've been getting the following error when I am trying to ...
0
votes
1answer
21 views

multi regression for energy data

I'm trying to develop a multi regression model to predict energy consumption during one day period. X-set dimension is (10178, 52) and consist of 52-feature and Y-set dimension is (10178, 48) as ...
0
votes
1answer
18 views

Looping 2 DataFrame Pandas [closed]

I am learning about pandas and find an interesting case i try to find total sales for every genre that exist in the data frame,I try looping a few time and get a dead end,maybe you can give me a few ...
1
vote
2answers
44 views

Coloring clusters so that nearby clusters have different colors

I have clustered a large number of points (~3000) into (~400) clusters. I want to plot the data and visualize the clusters. I want to make sure that nearby clusters have different colors. Can ...
1
vote
0answers
24 views

The association of the L2 regularization and the He normal weights initialization leads to NaN losses for ResNet3D during the training process

I am encountering a problem with the ResNet 3D architecture when I train it from scratch for a classification task on a dataset of videos. The problem happens when I enable the L2 regularization on ...
0
votes
1answer
13 views

Extracting patterns from the spatiotemporal movement of objects

Say I have a database with x and y coordinates (30 times per second) for some objects in a 2d plane. Is there a way to extract patterns from these coordinates? If so, is there a way to visualize these ...
1
vote
1answer
21 views

How to understand Learning Curves

I've developed two models and wanted to test them. However, I don't know how to intepret the results of the learning curves properly. For Model 1: ...
0
votes
0answers
20 views

How should I encode 'dynamic' features (with multiple instances) along with 'static' features (single instances)?

Suppose I have to predict if a certain product from an assembly line in a factory will be a scrap. This product has let's say 'static' data like a certain shape. A certain vendor, etc. And, it can ...
0
votes
0answers
12 views

Interpolate function isn't returning values

My input DataFrame is structured like this: I have a list of unique IDs (UIDs) which I would like to compare with each other, year on year (based on the "Age" column). The challenge is, the ...
0
votes
1answer
21 views

K-means clustering to separate temperature vertical profiles

I have temperature measurements from weather stations in a mountainous region and I want to obtain a vertical profile from these data at any given time. In a simple case one can just plot all values ...
1
vote
1answer
32 views

adding a feature as “generic”

I am using sklearn and python, to build a "malicious" login identifier. Reading some documents and examples, I chose the RandomForest classifier, then I decided to use the following features:...
0
votes
1answer
18 views

how Lasso regression helps to shrinks the coefficient to zero and why ridge regression dose not shrink the coefficient to zero?

How Lasso regression helps feature selection of model by making the coefficient to zero? , I could see few below with below diagram ,can any please explain in simple terms how to corelate below ...
1
vote
1answer
25 views

Seeking for advice on near real time object detection for mobile (detect garbage within images)

I am trying to build a near-real time object detection model which should run on a mobile device. As I am new to this specific area of computer vision I would appreciate every advice on my current ...
0
votes
0answers
27 views

Understanding and applying LSTM Autoencoder correctly?

Use Case: Anomaly Detection for times series data coming from machine sensors. Data: Logging sensor data every 100 milliseconds or with sampling rate of 10 Hz, for ...
-1
votes
0answers
26 views

Calculating the cross entropy loss [closed]

I am working with sklearn library and I want to calculate the cross entropy loss which in sklearn is called as "log_loss". I have a variable A (prediction) with shape (10,10,5) which ...
0
votes
1answer
19 views

Why multi-class SVM can't detect some classes?

I use PCA and multi-class SVM for classifying 4-class problem in the Python environment. But in results, I see some differences in detection rate (Unweighted Accuracy in this problem). For example: ...
1
vote
1answer
15 views

Is there a way to increase the validation accuracy for this model of image recognition?

I'm really new to machine learning, and this model is supposed to differentiate between rock, paper, and scissors. ...
0
votes
0answers
7 views

RBF Network for classification

I want to implement RBF Network from scratch (in python) for classification problems. I get the main idea (compute centroids, RBF activation function, etc) but i don't understand how to build the ...
0
votes
1answer
18 views

Choropleth Map with plotly.express doesn't show map, just legend

I copied the "Indexing by GeoJSON Properties" example as seen on the Choropleth Maps in Python page. The code was executed with no error but there was no map showing, only the legend. In ...
0
votes
0answers
13 views

Which is the best way to select categorical features with Autoencoders in Python?

I have a dataset containing both categorical and numerical features. I am trying to work with Autoencoders for feature selection, so the first thing I do is to normalise the numerical features. For ...
1
vote
1answer
29 views

how to prevent machine crash while searching for hyper parameters of XGBoost with GridSearchCV

I am searching for best hyper parameters of XGBRegressor using GridSearchCV. Here is the code: ...
0
votes
1answer
22 views

What type of correlation analysis would be appropriate in case of many variables (binary, numerical and text)?

I am approaching the field of machine learning for fake news detection. I built a dataset including features like information on punctuation, number of sentences, capital letters, urls, age of the ...
1
vote
1answer
18 views

Fitting probabilities in scikit-learn RandomForestClassifier

This is a newbie questions, so please bear with me. Given this random forest model: ...
0
votes
0answers
11 views

SKLEARN SGDClassifier prediction accuracy hint?

There is a function predict but is it possible to also hint how much is the predicted category probable? Like prediction of category 1 with 90% confidence, or 2 with 30% confidence etc. Without this I ...
1
vote
1answer
26 views

Where is the rotated angle actually located in fitEllipse method?

Main task: I fit the ellipse using the fitEllipse() method and then I'd like to count the rotation angle between the horizontal axis and the major axis of the ...
0
votes
1answer
26 views

How to create a model to suggest similar words in realtime?

I have a huge database of job titles, I want to build a system where if you enter something like "jav " then it should suggest next some similar job titles like (java developer, java ...
0
votes
1answer
14 views

making conclusions after sentiment analysis

After performing some sentiment analysis, I have a dataset that looks like this: For different products, using online reviews, I have obtained some values for positive/negative sentiments. However, ...
0
votes
1answer
19 views

the models in deep-learning on a little corpus

I have a little corpus (around 450 observations with approximately 50 words) with domain specific words. I have to classify each observation with a target variable with 5 classes. I tokenized and did ...
0
votes
0answers
18 views

How to use helper files in PyCharm

I am trying to follow along with a project written by Mike Smales - "Sound Classification using Deep Learning". In there, the author wrote a helper file called wavfilehelper.py: wavehelper....
2
votes
1answer
24 views

How to decode encoded labels in Decision tree classifier

I have some dataset with procurements of organization where actually i'm working. The aim is to find most important features that describe why some processes of purchases is succesful, and why not ...
3
votes
2answers
25 views

no decrease loss and val_loss

I try to train a neural network for time series. I use some data from Covid, mainly the goal is knowing 14 days of number of people at hospital to predict the number at J+1. I have use some early ...
0
votes
1answer
33 views

Compare cross validation and test set results

I am having a hard time understanding the results of a cross validation test and a test run on a test set. First I made the following pipeline: ...
-1
votes
1answer
23 views

how do I know if my model is overfitting from a learning gragh?

this is the learning graph of the loss metric vesus epoch number o my model is My model overfitting ?
1
vote
0answers
63 views

ValueError: Dimensions must be equal, but are two different values [closed]

I am trying to train an autoencoder with images. But at the time of training, I get an error, what am I doing wrong? I am using Colab. ...
1
vote
0answers
46 views

keras InvalidArgumentError: Incompatible shapes: [10,1] vs. [10,60,60,3600]

I am trying to train an anime face dataset on an autoencoder. but at the time of training it gives me this error. ...
1
vote
1answer
39 views

Negative R2_score Bad predictions for my Sales prediction problem using LightGBM

My project involves trying to predict the sales quantity for a specific item across a whole year. I've used the LightGBM package for making the predictions. The params I've set for it are as follows: <...
1
vote
1answer
35 views

How to find the best fitting parametric distribution for an empirical dataset (stock returns)?

Given some real-valued empirical data (time series), I could convert it to a histogram to have an (non-parametric) empirical distribution of the data, but histograms are blocky and jagged. Instead, I ...
0
votes
0answers
11 views

Filtering redundant Association rules

After performing association rule mining, (using mlxtend library), I have gotten a pandas dataframe containing all the association rules. This contains too many rules, therefore we must reduce the ...
0
votes
1answer
37 views

pytorch __init__() got an unexpected keyword argument 'train'

I'm using this code in colab. the function below gives me an error when intanciar. ...
0
votes
1answer
21 views

Does autoencoder with few images not work?

I am trying to load 2 images to an autoencoder but for some reason, it does not rebuild the input image. An autoencoder is supposed to compress and decompress an image. However, when passing two ...
0
votes
0answers
11 views

TFRecord handling

This is my first time encountering the TFRecord format and the documentation on it seems a little sparse. I was able to find the official walkthrough from TF but it's not getting me all the way there. ...
0
votes
1answer
17 views

Running scikit-learn with large volume

I need to run a Random Forest process with scikit-learn. To train the model, I have a database table with 10 million rows of features. The question is: what is the ...
0
votes
1answer
9 views

Unable to make CNN model with same output and input dimensions

I'm trying to develop a simple CNN model that takes in a RGB images and returns the same 3 channel as output. Eg: 3 x 128 x 128 ...
0
votes
0answers
16 views

Time series forecasting - Multiple Parallel Input and Multi-step Output

I have a time series with 5 variables, and I want to predict the behavior of these 5 variables 112 periods ahead. For this, I use a dataset with information on the 21504 periods before (18278 periods ...

1
2
3 4 5
97