Skip to main content

Questions tagged [python-3.x]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Efficiently Implement a Data Transformation || Pytorch || coding advice

I have created the following class and function to create a 'custom' dataset. The use case was to sample every nth image from a data set to reduce the size of the data set while still maintaining ...
James's user avatar
  • 11
0 votes
0 answers
10 views

Are there any Python (sklearn or other) ML libraries that can handle missing data?

I am running a model using a sparse matrix for the X. It can not be imputed. So are there any libraries who modify the main ML models to deal with this?
J_Bake's user avatar
  • 1
0 votes
1 answer
11 views

How set binary random projection to features, num_samples for X-train, x_test, y_train to match knn distances L dimension

Binary Random Projection of Features, Samples Creating a binary random projection that will be used in a kNN Hanning function for hamming distances on nearest neighbors that will be processed by ...
Data Science Analytics Manager's user avatar
0 votes
0 answers
5 views

CNN to estimate a density map of an image, used to predict the object count

I'm trying to count the number of objects (larvae in this case), from a video. The constraint is, I cannot use any ML model, nor can I train my dataset as there are no annotations available. This ...
driver's user avatar
  • 101
0 votes
1 answer
135 views

How to create .exe using pyinstaller for a multipage streamlit application

I am trying to create an .exe file for my streamlit multipage app so that user can run this app on their desktop without worrying about python and other dependences. i am able to run single page ...
CodeMaster GoGo's user avatar
0 votes
1 answer
23 views

Getting rid of the warning "The following columns ... have been ignored" and "ValueError: batch_size should be a positive integer value ..."

I train a fine-tuning model with the PyTorch Trainer class: ...
questionto42's user avatar
0 votes
0 answers
21 views

How to find optimized combinations of values in input columns that produces the values in output column

I have multiple input columns that produce an output column. I want to find optimized combinations of the values in the input columns that produce the values in the output column. For eg: So, the ...
BitastaB's user avatar
0 votes
0 answers
20 views

how to dynamically load pyinstaller executable to my python code

how to dynamically load pyinstaller executable I am restructuring my application, I want to give more developers the ability to contribute to the application development by allowing them to inject ...
Bashar Haddad's user avatar
0 votes
1 answer
46 views

Writing python dictionary to a csv [closed]

I have a dictionary called dict_object dict_object=class_object.__dict__ print(type(dict_object)) print(dict_object) This code gave the following output: ...
Vasundhhara Singh Katoch's user avatar
0 votes
1 answer
90 views

Neural Network for binary classification not working

I have made a neural network that was working correctly as a multi-class classifier, but after changing the loss and the activation function, plus the output layer to just 1 neuron, it is not working ...
alex martinez's user avatar
0 votes
0 answers
111 views

ValueError: could not broadcast input array from shape (224,672,3) into shape (224,672)

...
g vijaya kiran's user avatar
0 votes
0 answers
79 views

2060 Illegal instruction (core dumped) when importing Tensorflow in Python 3.8.18

I am attempting to run the experiments found here: https://github.com/risingfbk/p4ddle/tree/main/p4-ddos/p4ddle However when I run the line: ./experiment_**.sh I ...
The Radiant's user avatar
1 vote
0 answers
10 views

NameError (solidity, brownie, python)

I'm writing a deploy script in Python (below) to deploy a smart contract using Brownie. When I compile I get an error that MockV3Aggregator is not defined. I have already created a file called ...
auditorchick's user avatar
0 votes
0 answers
31 views

problems trying to install PIP

Ugh I'm so frustrated. I'm trying to install pip for vscode so I can get py-solc-x. I downloaded python (it shows that I'm on python 3.10.12 when i run python --version). But when I run install ...
auditorchick's user avatar
0 votes
1 answer
31 views

Very basic python question [closed]

I am doing the free interactive learn python tutorial, and I am on the first conditions lesson. The task was to make it so that every statement in the following code resolved true. The code below was ...
auditorchick's user avatar
0 votes
0 answers
16 views

Visualizing three parameters dataset, in which parameters are sub-group of one another

I am trying to represent air quality for zones within a city. Initially, based on various factors zones were classified into four exposure categories (1,2,3,4).Those four categories were further sub-...
joseph_k's user avatar
  • 101
0 votes
0 answers
26 views

How to generate synthetic data samples of Raman Spectroscopy by using GAN?

I am working on the Raman Spectroscopy dataset. The wavenumber/frequency range used by Raman spectra starts from 151.25 and ends at 1999.17. These values are used on the x-axis. While amplitude/...
Sagheer Ahmed's user avatar
1 vote
2 answers
858 views

Why am I getting this TypeError: quantile() got an unexpected keyword argument 'numeric_only' for pandas quantile()?

I ran into a weird error with pandas quantile() (pandas.DataFrame.quantile()) method. I have a dataframe with both numeric and non-numeric columns. I wanted to ...
user62198's user avatar
  • 1,091
0 votes
0 answers
66 views

Tensorflow loss: 0.0000e+00 - accuracy: 0.0000e+00

I was making changes to improve myself in a chatbot code using LSTM. But Loss and truth values are getting ridiculous values. Code: ...
willy.js's user avatar
0 votes
0 answers
27 views

Using images with 5 or more channel in a tf.data pipeline

I have a data generator used to train FCNs (eg Unets) that uses tf.data. The image parser followed by the creation of the tf.data dataset for the training images looks like: ...
Patrice Carbonneau's user avatar
0 votes
1 answer
64 views

Plot Clustered Data by kmeans with colors for clusters and shapes for external labels

I wrote some Python code that uses the output from a principal component analysis to perform k-means on. The output to my script below is Cluster 1: Data Points: [[ 1.87192346 -1.12568277] [ 1....
Squirtle's user avatar
  • 103
1 vote
0 answers
67 views

Highlight specific paragraphs from documents

I have a bunch of documents in which I want to highlight certain paragraphs/keyphrases. I have a list of the most frequently appearing sentences and I want to search for these paragraphs/keyphrases in ...
spectre's user avatar
  • 2,105
1 vote
0 answers
39 views

ML with Python - extract information from user text

I'm a web developer, got a little experience with Python but none on ML. Tour operator customer want to introduce AI/ML on his website, the goal is to have a single text input where user can prompt ...
fudo's user avatar
  • 111
0 votes
1 answer
50 views

What are the approaches for extracting an injury and its description from a paragraph?

Suppose I have a paragraph which explains the injuries and its descriptions. I want to extract the injuries and its corresponding descriptions from the text. How can I do that? For example, the ...
SRJ577's user avatar
  • 197
3 votes
1 answer
773 views

Sentence tokenization for sentence without punctuation

I wish to perform sentence tokenization for sentence without punctuation, below is the code: ...
william007's user avatar
0 votes
0 answers
7 views

input shape in ASR training

Sorry for stupid question but can someone say what is the shape of input batch in ASR training? Because as I understood, if we work with spectrogram we got something like ...
EZpeezy's user avatar
0 votes
0 answers
32 views

get market cap from nseindia.com for given symbol list python way

get market cap from nseindia.com for given symbol list python way https://www.nseindia.com/get-quotes/equity?symbol=RELIANCE**strong text** Trade Information| Total Market Cap (₹ Lakhs): 15,77,02,517....
rpagrawal's user avatar
0 votes
0 answers
805 views

lightgbm issue ValueError: Input numpy.ndarray or list must be 2 dimensional

Problem Build prediction accuracy model using lightgbm on New York Taxi Duration dataset. Problem is "ValueError: Input numpy.ndarray or list must be 2 dimensional" with lightgbm.predict() ...
Data Science Analytics Manager's user avatar
0 votes
2 answers
97 views

Group rows partially [Python] [Pandas]

Good morning everyone. I have the following data: ...
Federica F.'s user avatar
0 votes
1 answer
67 views

Change the shape of numpy array

My numpy array has the shape of (99,2) basically it has 2 columns one is the word and the other is a hot encoding vector size of 300 I want to delete the column of words and want to have only encoding ...
Abdul Basit Niazi's user avatar
0 votes
0 answers
43 views

Memory Error when loading a txt file for an ML model

I am trying to run the Python code below: ...
lynx's user avatar
  • 113
0 votes
0 answers
880 views

how to define a multidiscrete action space

I want to define a Multi Discrete action space for Reinforcement Learning, gym style and Stable Baselines compatible (A2C, PPO) with the following structure : ...
user9085964's user avatar
1 vote
1 answer
358 views

How to find correlation between features and labels when features are unordered words?

I have a data set with ~ 85 labels and a target (house price) I wish to explore the correlation between the labels and the effect it has on the target. I have some features that number and others that ...
Noah's user avatar
  • 11
0 votes
1 answer
4k views

select rows containing max value basing on another duplicated rows of a group

I want to select rows by the maximum values of another column which would be the duplicated rows containing duplicated maximum values of a group. This should contain three steps: (1) group dataframe ...
Jiao's user avatar
  • 103
1 vote
0 answers
47 views

Deep learning through backpropagation: not learning

I am starting with deep learning and decided to code a backpropagation algorithm on Python 3. I have followed many tutorials and have taken as example many programs that work. Yet, for some reason, my ...
Clement Genninasca's user avatar
0 votes
0 answers
108 views

identify data type of column from table using NER models

I have structure data with csv or parquet format, I would like to extract the data type of the column by analyzing the data. when I looked at the NER from Hugging phase transformers, it actually ...
Anantha's user avatar
0 votes
0 answers
26 views

Good network for binomial classification of continuous and categorical dataset

I have a continuous variable from which I want to predict 1 simple event, to increase my odds, I created more 2 continuous variables that combined make the main variable and a lot of dummy vars. ...
user9085964's user avatar
0 votes
0 answers
303 views

How to build stock portfolio using deep reinforcement learning in Python by taking care of indicators for each given stock?

I have this Python code from this tutorial which is trading a stock (e.g. GME but it can be any) by taking care of its indicators ('SMA', 'RSI', 'OBV'). ...
YoYoYo's user avatar
  • 101
0 votes
3 answers
731 views

Tweak machine learning algorithm in SciKit to optimize for recall

I am given a dataset to detect fraud. Something similar like this: https://www.kaggle.com/code/imgremlin/4th-place-in-fraud-detection-from-zindi The issue with SciKit machine learning algorithm is ...
Tequil's user avatar
  • 1
0 votes
1 answer
345 views

Cumsum starting value not 0 in Pandas

I have the following dataframe df of athletes (indexed by Athlete_ID) and their Rank (indexed by ...
borcherds's user avatar
0 votes
1 answer
588 views

OpenCV isn't processing all the images in a directory

I'm really trying to apply CLAHE to a directory of about 700 images. However, once I manage to get it running, for some reason the code stops before all the images are processed. When I run it on ...
brosefzai's user avatar
1 vote
2 answers
960 views

Average number of records by ID

I have a dataframe with IDs and booking refs, looking like the simplified example below. ID BookingRef 001 2019/32323 002 2011/23232 002 2017/7u4922 In the above example, 001 has one booking and ...
neo2049's user avatar
  • 113
-1 votes
1 answer
146 views

Removing rows with total number of ID occurred not equal to a specific number in Pandas Python [closed]

I have the following data frame in Pandas: ...
Ishigami's user avatar
  • 101
0 votes
1 answer
3k views

How to fine tune n_components parameter in UMAP?

I am using UMAP for clustering. However I can't find any information about methods to fine tune n_components parameter (which is very important). As good as I understand I can't use explained variance ...
Ir8_mind's user avatar
  • 183
2 votes
1 answer
740 views

PCA followed by UMAP then go into Random Forest

Is it a valid procedure to apply PCA to your dataset and then apply UMAP clustering on the PCA data, before sending the embedded cluster data to a Random Forest classifier? Summary of process: ...
Joe's user avatar
  • 147
1 vote
1 answer
27 views

How to stop deep learning speech model to not recognize stranger voice?

I am trying to figure it out. But I can't find any solution. My model accuracy is 99% and my testing accuracy is 98% I am using softmax for multiclass classification and adam optimizer to reach its ...
Hiba Tur Rehman's user avatar
0 votes
1 answer
91 views

All Categorical data

I need some feedback on a problem I have been working on. I am working with a fairly balanced dataset with all categorical features, and a categorical outcome (classification problem). The data has no ...
xboxuser's user avatar
0 votes
0 answers
40 views

How to Approach Linear Machine-Learning Model When Input Variables are Inconsistent

Disclaimer: I'm relatively new to the data science and ML world -- still trying to get a firm grasp on the fundamentals. I'm trying to overcome a regression challenge involving a large, multi-...
Austin Prater's user avatar
0 votes
0 answers
1k views

How solved "ValueError: y should be a 1d array, got an array of shape () instead."?

...
Asma Tolihan's user avatar
0 votes
2 answers
2k views

Create new rows based on a value in a column

My dateset is generated like the example df = {'event':['A','B','C','D'], 'budget':['123','433','1000','1299'], 'duration_days':['6','3','4','2']} I need ...
conradoov's user avatar

1
2 3 4 5