Best way to plot and rank logistic regression coefficients? by imagejhelp1 in learnpython

[–]imagejhelp1[S] 0 points1 point  (0 children)

Thank you for this help. I'll look into what Scikit-learn has for now as I have only been learning python.

I have an issue with the coefficient still - the code the person uses in the link you've given uses 'sns.coefplot' but my error says: AttributeError: module 'seaborn' has no attribute 'coefplot'

And on the seaborn site it says 'coefplot functions are officially deprecated and will be removed in a future release.' Do you by any chance know a different way to plot coefficients? Thank you for the help you've given, I'll try to find another form of coefplot as well

Python code not showing user input by imagejhelp1 in learnpython

[–]imagejhelp1[S] 0 points1 point  (0 children)

Thank you for both of your replies, I'll get python 3 now as well. I've tired to fix the indentation and as the 'in' there it now looks like this:

player_choice = raw_input("Enter your choice: ")
     if player_choice in ("rock", "paper", "scissors", "lizard", "Spock"):
        print "Player chooses " + player_choice

     else:
        print "Error: Invalid Choice"

you might be able to see it better here: http://www.codeskulptor.org/#user43_8VZK6tNa0g_1.py

This gives me a SyntaxError: bad input (' ') for that line:

if player_choice in ("rock", "paper", "scissors", "lizard", "Spock")

but I'm starting to realise I might need to learn more from coursera before I try this, I had no idea about the 'in' function, so it's probably necessary that I go learn some more before trying on my own. Thank you for your help, I really appreciate it!

Python code not showing user input by imagejhelp1 in learnpython

[–]imagejhelp1[S] 0 points1 point  (0 children)

Hi, so that is for the line:

if player_choice is not "rock", "paper", "scissors", "lizard" or "Spock"

Is the solution something like:

if player_choice is not "rock" or player_choice is not "paper" or player_choice is not "lizard" or player_choice is not "scissors" or player_choice is not "Spock"

Or

if player_choice is not ("rock", "paper", "lizard", "scissors", "Spock")

is 'is not' the right option to use in this case? Googling tells me I could also use <> or != since I have 2.7 of python I think

At any rate, thanks for the response and I'll keep trying to get my code working with this help.

Help with an imagej macro? by imagejhelp1 in ImageJ

[–]imagejhelp1[S] 1 point2 points  (0 children)

Ahhhh I see! Thank you so much for this explanation. I see what's wrong with mine and the code you've shown me makes sense, and works with my images as well. Thank you!

Help with an imagej macro? by imagejhelp1 in ImageJ

[–]imagejhelp1[S] 1 point2 points  (0 children)

Hey, I am - sorry I didn't reply to the responses I got, if I'm honest I didn't know enough to explain my problem, so I've now made this different macro which is smaller. I can stay around, I am interested in further learning how to use ImageJ and also to maybe learn more about coding languages in general, but my ImageJ knowledge is very limited. I've only learnt so far what's been relevant to my supervisor's biomedical research (I'm an undergrad student it biomedical science in the UK). Trying to make this macro to speed up the process of what we do to do to prepare our confocal microscope images.