Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Parallel processing of multiple elements in list not working?
Post: Parallel processing of multiple elements in list n...

Hi, I am trying to parallelise a function that will loop of over many millions of elements. It is a pearson correlation calculation of every column pair. as the dataframe is huge, I have created an ...
amjass12 Code Review 0 1,644 Dec-15-2021, 03:18 PM
    Thread: is it pythonic to add a name 'attribute' to an existing variable?
Post: RE: is it pythonic to add a name 'attribute' to an...

(Oct-04-2021, 09:27 PM)deanhystad Wrote: You obviously are working with classes, because this kind of thing only works for classes, oh, and everything in Python is an object and is associated with a...
amjass12 General Coding Help 6 2,183 Oct-04-2021, 09:33 PM
    Thread: is it pythonic to add a name 'attribute' to an existing variable?
Post: RE: is it pythonic to add a name 'attribute' to an...

Thank you, your explanation is very clear. I think it is my fault that I did not word my post correctly, apologies. Indeed the variable is attached to an object, I suppose the question should have bee...
amjass12 General Coding Help 6 2,183 Oct-04-2021, 09:16 PM
    Thread: is it pythonic to add a name 'attribute' to an existing variable?
Post: is it pythonic to add a name 'attribute' to an exi...

I have several variables in a list: - they are the result of ana analysis run using another library in python vars = [run1, run2, run3, run4]I now need to run one more analysis in a for loop and save...
amjass12 General Coding Help 6 2,183 Oct-04-2021, 08:26 AM
    Thread: comparing floating point arrays to arrays of integers in Numpy
Post: comparing floating point arrays to arrays of integ...

I am using sklearns OneHotEncoder and MultiLabelBinarizer to one-hot encode some target labels. I am working on a multi-label classification task and am one-hot encoding my targets. I have been usi...
amjass12 Data Science 0 1,626 Jul-26-2021, 11:58 AM
    Thread: What is the best approach to training a final model after cross validation?
Post: What is the best approach to training a final mode...

Hi, I am training a neural network for a classification task. I have used 10x cross validation and have a good indication of out of sample (test) performance for all folds. I now want to train the f...
amjass12 Data Science 0 1,864 Jul-21-2021, 10:15 AM
    Thread: *args implementation and clarification about tuple status
Post: RE: *args implementation and clarification about t...

(Jul-07-2021, 07:20 AM)buran Wrote: (Jul-06-2021, 11:34 AM)amjass12 Wrote: this is weird - this has been copied and pasted.. OK, I agree. It's really weird. I checked all three questions asked by ...
amjass12 General Coding Help 10 4,021 Jul-07-2021, 10:29 AM
    Thread: *args implementation and clarification about tuple status
Post: RE: *args implementation and clarification about t...

(Jul-06-2021, 06:29 PM)deanhystad Wrote: This means the same in all contexts: Quote:2. Reason for question, *args is specified as tuple - I know what tuples are, but not sure about what it means in ...
amjass12 General Coding Help 10 4,021 Jul-07-2021, 10:28 AM
    Thread: *args implementation and clarification about tuple status
Post: RE: *args implementation and clarification about t...

(Jul-06-2021, 10:58 AM)buran Wrote: cross posted at https://stackoverflow.com/q/68269203/4046632 Please, don't cross-post or if you do so - provide a link. this is weird - this has been copied and p...
amjass12 General Coding Help 10 4,021 Jul-06-2021, 11:34 AM
    Thread: *args implementation and clarification about tuple status
Post: RE: *args implementation and clarification about t...

(Jul-06-2021, 09:23 AM)Gribouillis Wrote: Iterating a tuple or a list are equaly safe unless you try to update the structure during the iterations. Doing so with a tuple raises an exception because ...
amjass12 General Coding Help 10 4,021 Jul-06-2021, 09:29 AM
    Thread: *args implementation and clarification about tuple status
Post: RE: *args implementaiton and clarificaton about tu...

(Jul-06-2021, 08:53 AM)Gribouillis Wrote: You can use args directly. It is indeed a tuple, which is created when the function is called >>> def func(*args): ... print(args) ... >>...
amjass12 General Coding Help 10 4,021 Jul-06-2021, 09:14 AM
    Thread: *args implementation and clarification about tuple status
Post: *args implementation and clarification about tuple...

Hi! I don't think this should go in the code checking section as I am also asking for clarification on implementation so hope this thread is ok here. I have a function that starts as follows: def ...
amjass12 General Coding Help 10 4,021 Jul-06-2021, 08:51 AM
    Thread: finding element of specific field in pandas adjacency matrix
Post: finding element of specific field in pandas adjace...

Hi! I have a pandas adjacency dataframe where I need to be able to identify any element on that dataframe by its physical numbered position, not index or column position, nor its coordinate. the da...
amjass12 General Coding Help 0 1,670 Oct-27-2020, 09:27 AM
    Thread: IS there a way to preserve some order in a tSNE/PCA plot?
Post: IS there a way to preserve some order in a tSNE/PC...

Hi, I was wondering if there is any way to preserve the order of a group of vectors in a tSNE or PCA plot. I have vectors of common words from different (temporal) word2vec models. I have aligned an...
amjass12 Data Science 0 1,503 Oct-01-2020, 04:43 PM
    Thread: for loop not plotting all element of 'i'
Post: for loop not plotting all element of 'i'

Hello all, I am having a really frustrating problem I cannot figure out. I have run a cross validation for a machine learning model I am working on. I am generating metrics for how well the model ...
amjass12 General Coding Help 0 1,169 Aug-18-2020, 09:53 AM
    Thread: Problem implementing .iloc slicing in a custom function
Post: RE: Problem implementing .iloc slicing in a custom...

(Mar-03-2020, 01:11 PM)scidam Wrote: Passing 0:12 as an argument value to a function definitely isn't valid Python syntax. Try categoricalIndex=slice(0, 12) instead. this works PERFECTLY!! thank you...
amjass12 Data Science 2 2,012 Mar-03-2020, 08:51 PM
    Thread: Problem implementing .iloc slicing in a custom function
Post: Problem implementing .iloc slicing in a custom fun...

Hello all, I am stuck with the implementation of slicing dataframes within a custom function. I have looked on the internet and cannot find anything that is helping me :( any help would be much appr...
amjass12 Data Science 2 2,012 Mar-01-2020, 12:51 PM
    Thread: y-axis on seaborn heatmap not aligned properly
Post: y-axis on seaborn heatmap not aligned properly

Hi all, I am having an issue with a heatmap on seaborn when using pycharm (not sure if this is the right forum so apologies if this is the case) I am not having this issue when i run this code in g...
amjass12 General Coding Help 0 2,824 Oct-01-2019, 10:37 AM
    Thread: Alternative ways of plotting confusion matrix
Post: Alternative ways of plotting confusion matrix

Hi all, I was wondering if you would be able to offer some advise on alternative ways of plotting confusions matrices. This is not strictly a question about code related to data science so i apologi...
amjass12 Data Science 0 2,398 Aug-14-2019, 07:21 PM
    Thread: Help with two lines in a function
Post: RE: Help with two lines in a function

(Jul-28-2019, 09:47 AM)ThomasL Wrote: (Jul-28-2019, 09:33 AM)amjass12 Wrote: thank you so much for all your assistance :) If you appreciate my help then please like my comments and/or give me a re...
amjass12 General Coding Help 6 2,747 Jul-28-2019, 12:41 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020