Questions tagged [python-3.x]
The python-3.x tag has no usage guidance.
229
questions
0
votes
0
answers
3
views
SKLearn - Different Results B/w Default Linear Model and1st Order Polynomial Linear Model
SUMMARY
I'm building a linear regression model using Scikit and noticing that the model "performance" (RMSE and max error, namely) varies depending on whether I use the default LR or whether ...
0
votes
0
answers
13
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-...
0
votes
0
answers
10
views
0
votes
0
answers
11
views
How to access dataframe created or upadted inside if statement outside? [closed]
A dataframe is created/updated isnide an if loop which itself is within a for loop. The DF need to be accessed outside the if statement. But outside the scope it is not updating.
...
0
votes
0
answers
12
views
I need to plot only training curve in the fastai library using the learner.recorder.plot_losses() function . FASTAI devs pls help
I have a task where I need to only plot the training loss and not the validation loss of the plot_losses function in the fastai library with learner object having ...
0
votes
2
answers
22
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 ...
0
votes
0
answers
104
views
RuntimeError: min(): Expected reduction dim to be specified for input.numel() == 0. Specify the reduction dim with the 'dim' argument [migrated]
RuntimeError Traceback (most recent call last)
/tmp/ipykernel_33/2056227650.py in
----> 1 learn.fit_one_cycle(n, max_learning_rate)
2 learn.recorder.plot_losses()
/opt/...
-1
votes
0
answers
12
views
NameError: name 'Patch' is not defined (cant use fastai-1.0.61 object-detection-fastai-0.0.10)after (! [ -e /content ] && pip install -Uqq fastai)
The problem still persists even after kernel restart.
(cant use fastai-1.0.61 object-detection-fastai-0.0.10)after (! [ -e /content ] && pip install -Uqq fastai)
I have tried downgrading the ...
1
vote
0
answers
24
views
Encode each comma separated value in Pandas
I have a dataset
...
0
votes
1
answer
15
views
Categorical data preprocessing for training a algorithm
I have a training dataset where values of "Output" col is dependent on three columns (which are categorical [No ordering]).
...
0
votes
0
answers
17
views
Tensorflow 2 Semantic Segmentation - loss function for two classes
I am trying to implement a U-net for semantic segmentation with two classes (foreground=1 and background=0) in the segmentation mask images, following this tutorial.
They have used ...
0
votes
0
answers
7
views
Multi-level timeseries forecasting? How to do it?
So, I just finished a 48 hr datathon, and I did terribly, to be honest. It was my first datathon.
We were given a list of datasets:
5 months of taxi demand data (January to May)
Weather dataset
Zone ...
-1
votes
0
answers
11
views
Total number of columns (2446) exceeds max_columns . Falling back to pandas display in google colab
[![enter image description here][2]][2]
please provide a solution
0
votes
0
answers
10
views
Adding L2 regularization on top of pretrained EfficientNet model causes fluctuating validation accuracy and loss
I've built a model on top of pretrained EfficientNetB2 which would achive ~50% validation accuracy after 3-4 epochs and then would start to overfit. In order to counter that I added l2 regularization ...
0
votes
0
answers
5
views
Orange Hangs After Geo Widget Install
I removed the latest Orange on my system along with all traces of Python. Then successfully installed Orange 3.18 (I'm looking for the original Geo module that drew circular clusters). However, when I ...
1
vote
0
answers
13
views
Plot polar coordinates (2D) on a Poincáre Sphere surface as either heat map or scatter plot [closed]
I have a dataset with 4 values - amplitude, psi angle, chi angle and class (color).
The psi angle and chi angle represent unique points on a .
I want plot these psi and chi values on this sphere co-...
1
vote
0
answers
12
views
How to train a Task Specific Knowledge Distillation model using Hugging face model
I was referring to this code:
https://github.com/philschmid/knowledge-distillation-transformers-pytorch-sagemaker/blob/master/knowledge-distillation.ipynb
From @philschmid
I could follow most of the ...
0
votes
0
answers
24
views
How to create recommendation systems that are suitable for deployment in production environment for an ecommerce giant?
I am making a recommendation model for an ecommerce client that has huge number of products of various categories. Product data set can be considered similar to that of Amazon. For now, I am starting ...
1
vote
0
answers
40
views
How to save hugging face fine tuned model using pytorch and distributed training
I am fine tuning masked language model from XLM Roberta large on google machine specs.
When I copy the model using gsutil and subprocess from container to GCP ...
0
votes
0
answers
9
views
Write logs into excel sheet in sharepoint
I am trying to write data ("log" kind of data) onto an excel sheet in MS SharePoint.
I have previous experience in writing onto google spreadsheets using python. However, I don't know how to ...
0
votes
0
answers
12
views
How to use label smoothing for single label classification in hugging face models
I am training a binary class classification model using Roberta-xlm large model.
I am using training data with hard labels as either ...
0
votes
0
answers
9
views
How to do Image forecasting with set of images as timeseries?
I am working on a problem with a dataset of a disease that progress with time. I am given set of images that shows the disease progression equally spaced over 1 week time interval.I want to predict ...
0
votes
0
answers
23
views
Attribute Error seaborn pairplot ticklabel rotation
I'm trying to generate a seaborn pairplot with the ticklabels roatated. My code is here:
...
0
votes
1
answer
38
views
Predict continuous variable based on categorical columns mostly
I have a large dataset (40 mil rows, 50 columns) with mostly categorical columns (some of them are numerical) and I am using Python/Pandas. Categorical columns have up to 3000 unique labels.
I am ...
0
votes
0
answers
14
views
CodeReview: CycleGAN Implementation Using Keras FunctionalAPI
Okay So I Am Here Implementing the cyclegan architecture with using keras api
from scratch.
For Those who Wanna Know More About Cyclegan seehere
The CycleGan Compose of Two Phase Architecture Like ...
0
votes
0
answers
10
views
Reverse scaling Synthetic KDE data
For Python 3.9, sklearn version: 0.24.2 and numpy version: 1.20.3, I am using a Kernel Density Estimation (KDE) generative model. The goal is to generate new data using a given input data. The steps ...
0
votes
0
answers
101
views
pandas fill NA based on merge with another dataframe
I already posted this here but since there is no response, I thought I will also post this here
...
0
votes
1
answer
140
views
__init__() takes 1 positional argument but 4 were given sklearn standard scaler error
I defined a class like below:
...
0
votes
0
answers
5
views
Importing data from python notebook
How to import data from .ipynb to .py file in vscode editor?
I am not able to import array.
Can anyone suggest some method so that I can import the array from .ipynb to .py.
0
votes
0
answers
118
views
Variational Autoencoder - ValueError: No gradients provided for any variable (TensorFlow2.6)
I am implementing a toy Variational Autoencoder in TensorFlow 2.6, Python 3.9 for MNIST dataset. The code is:
...
0
votes
2
answers
148
views
Comparing distributions Python
I have a larger dataset (random variable) 'x' containing values approximating a Gaussian distribution. From 'x', a much smaller random variable 'y' is sampled without replacement. I want to compare ...
0
votes
0
answers
22
views
Can KAMA (Kaufman Adaptive Moving Average) be used for extracting the moving average of numpy arrays?
I'm reading about KAMA algorithm and everywhere I see it's just adopted for stocks and trading kind of things. Since the algorithm looks perfect so I was planning to use this for averaging out a 1D ...
0
votes
0
answers
317
views
Cannot test custom object detection model
I am using this tutorial: https://gilberttanner.com/blog/tensorflow-object-detection-with-tensorflow-2-creating-a-custom-model . I have trained the model but when I try to test it with this command:
<...
0
votes
0
answers
52
views
is there a way to compare two k-prototype models performance?
i try to understand which of my two k-prototype models to use
both models contains the same categorical features
one of the models contains a bit more numerical features
in other words is there a ...
1
vote
0
answers
13
views
Fail to decompose and make stationary time series
I am looking for some suggestions for my time series.
I am dealing with the column "Temperature (C)" from this dataset. I am trying to make it stationary in order to do some forecasting on ...
0
votes
1
answer
32
views
How can I change shape of the input image array as per my trained TensorFlow model input?
I have a Tensorflow model weight file that I am using to make the prediction on test images. These test images are in NumPy array format and the shapes of the images are (720, 1280, 3).
I am getting ...
1
vote
0
answers
29
views
How to integrate Zoho analytics with Jupyter notebook? [closed]
I am trying to connect Zoho Analytics and Python for importing data from Zoho Analytics.
I have already installed !pip install zoho-analytics-connector. What should ...
5
votes
2
answers
69
views
Beginning my data science journey [duplicate]
I am a Master's student in physics. Lately I have been intrigued by the field of data science. I have beginner level knowledge of python, undergraduate level knowledge of mathematics and master's ...
1
vote
1
answer
43
views
I want to do sub groups in pandas data frame [closed]
I have a dataframe as below I want to do first group by trip_number and then subgroup by mode.
...
0
votes
0
answers
96
views
Create rows filling the sequence of numbers in a 'period column' and the 'value column' with 0 in python/pandas
I need to fill a dataframe with rows completing the values that the system doesn't show on the report (e. g. a week that the product had no sales):
The report:
Product
Week
Total_Sales
0
A
1
82
1
A
...
0
votes
0
answers
27
views
Two-sided grubbs test KeyError: 355
I am trying to this two sided grubbs test by passing in a pandas.Series object and an appropriate alpha value. whenever I do the test on the whole dataset, I have ...
0
votes
0
answers
34
views
Scaling columns pandas DataFrame
For a dataset having different numeric columns, they usually have different range and distributions. As an example, I have used the Iris dataset. The distributions of it's 4 columns are shown:
My ...
1
vote
1
answer
24
views
Create Period column based on a date column where the first month is 1, second 2, etc
I have a dataset with many project's monthly expendituries (cost curve), like this one:
Project
Date
Expenditure(USD)
Project A
12-2020
500
Project A
01-2021
1257
Project A
02-2021
125889
Project ...
2
votes
1
answer
2k
views
ValueError: Input 0 of layer conv2d is incompatible with the layer: expected axis -1 of input shape to have value 1 but received input with shape
I'm trying to create an auto-encoder based model for segmentation, which looks something like this: https://i.stack.imgur.com/4F3Z0.png
I haven't added a single step, nor missed one as far as I ...
1
vote
1
answer
60
views
Updating a genism LDA model with new documents and topics
I have a conceptual problem that is related to a project I'm working on. I'm relatively new to the domain of NLP so this might be a poor question but I would really appreciate any help.
My dataset is ...
0
votes
0
answers
381
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
vote
1
answer
397
views
How can I get the dataframe after scikit pipeline?
I'm making many data transformations and fitting a model using scikit pipeline, but I need to extract X_train and X_test right after transformations (imputer, encoding, etc) in order to use it for ...
2
votes
0
answers
64
views
Does Anaconda does not yet support Python 3.9.x? [closed]
I have downloaded and installed Python 3.9.7 (the latest version to date) on my Windows. It is installed and working fine using command prompt or VS code. But Anaconda (I use Jupyter NB) still shows ...
0
votes
0
answers
12
views
Find business vertical of a website just by its URL or cluster similar website by its url
I have been exploring this problem a lot about just using the website url to tag or cluster them as per their business domain. For example:
...
1
vote
0
answers
109
views
Fuzzy Address Matching using Rapid Fuzz
I am using RapidFuzz for matching US Addresses from two separate datasets.
I was able to get the results that I was hoping for using the below code:
...