Seach the website
Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Courses
Feedback
Recent questions and answers in Python
0
0 votes
0
0 answers
1.4k
1.4k views
Which code has best runtime and why?(the one commented or the other one)
# for key, value in dict.items(): # if value >= long: # long = value # long_name = key # if value < sh...
someone_prog
120
points
1
1
3
asked
Sep 2, 2022
Python
python
+
–
0
0 votes
1
1 answer
1.8k
1.8k views
how to output f1-score instead of accuracy
I have the code below, outputting the accuracy. How can I output the F1-score instead? Thanks in advance,clf.fit(data_train,target_train) preds = clf.predict(data_test) #...
tofighi
116k
points
73
79
101
answered
Apr 2, 2022
Python
machine-learning
f1score
accuracy
+
–
0
0 votes
0
0 answers
990
990 views
I cannot get this code to work. please help.
from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from sklearn.model_selection import train_test_splitmodel = Sequential() ...
anonymous1200
120
points
1
1
3
asked
Mar 21, 2022
Python
machine-learning
data-science
neural-network
+
–
1
1 vote
0
0 answers
527
527 views
How to print confusion matrix if I am using stratifiedkfold method?
Ziva
230
points
5
5
9
asked
Aug 6, 2020
Python
python
machine-learning
+
–
0
0 votes
0
0 answers
531
531 views
I am facing the error after importing torch module in python. How can I solve it? The error link is given below
https://ibb.co/MgXvrkL
Ziva
230
points
5
5
9
asked
Jul 31, 2020
Python
python
+
–
0
0 votes
0
0 answers
583
583 views
How to split into train and test using PKL file?
Ziva
230
points
5
5
9
asked
Jul 30, 2020
Python
machine-learning
+
–
0
0 votes
0
0 answers
525
525 views
Suggestion For Model
Ziva
230
points
5
5
9
asked
Jul 19, 2020
Python
pytorch
+
–
0
0 votes
1
1 answer
707
707 views
What are some best features of Python3 in comparison to Python2?
Python3 and Python2 seems so similar, and the only changes which are obvious are some changes in functions such as print that now needs parentheses. Are there other impro...
tofighi
116k
points
73
79
101
answered
May 20, 2019
Python
python
syntax
python3
python2
comparison
+
–
1
1 vote
1
1 answer
1.2k
1.2k views
What are the best resources for studying Python?
What are the best resources for studying Python?
Moktart
240
points
1
1
4
answered
May 20, 2019
Python
books
resources
data-science
python
+
–
0
0 votes
2
answers
2 answers
1.1k
1.1k views
Who can write a recursive Python program for Fibonacci sequence 0,1,1,2,3,5,8,...?
Please also check if the fibo(7) = 8
tofighi
116k
points
73
79
101
answered
Mar 22, 2019
Python
math
python
recursive
+
–
0
0 votes
1
1 answer
631
631 views
How do I create comments in my code?
Neo
660
points
10
12
17
answered
Nov 2, 2018
Python
python
+
–
0
0 votes
1
1 answer
2.0k
2.0k views
If s='Sammy' what is the output of s[2:]?
wxeshetu
400
points
5
5
8
answered
Oct 29, 2018
Python
python
+
–
0
0 votes
1
1 answer
525
525 views
What are Decorators?
wxeshetu
400
points
5
5
8
answered
Oct 29, 2018
Python
python
+
–
0
0 votes
1
1 answer
614
614 views
What is a Magic class methods ?
wxeshetu
400
points
5
5
8
answered
Oct 29, 2018
Python
python
+
–
1
1 vote
1
answers
1 answer
6.5k
6.5k views
Hey, anyone knows how to save workspace in jupyter python? I would like to save the variables and functions, etc.
tofighi
116k
points
73
79
101
answered
Oct 24, 2018
Python
python
jupyter-notebook
pickle
dill
+
–
1
1 vote
1
1 answer
677
677 views
ploting the xticks to be datatime
I have a dataframe like belowMT_001 MT_002 hour 2012-01-01 00:15:00 3.807107 22.759602 00:15:00 2012-01-01 00:30:00 5.076142 22.759602 00:30:00 2012-01-01 00:45:00 3.8071...
tofighi
116k
points
73
79
101
answered
Oct 21, 2018
Python
programming
python
plots
+
–
0
0 votes
1
1 answer
585
585 views
How can you tell a Python library is a good one and useful?
If a big company such as Google behind it, with high probability it is a great library such as TensorFlow. But in general how can I found out?
tofighi
116k
points
73
79
101
answered
Oct 18, 2018
Python
library
python
programming
+
–
1
1 vote
1
1 answer
741
741 views
In a dataframe of a size (5,10) with random values, how to have exactly 5 NAN values in each row?
tofighi
116k
points
73
79
101
answered
Oct 17, 2018
Python
python
programming
jupyter-notebook
+
–
2
2 votes
2
2 answers
1.1k
1.1k views
plotting categorical radio
Hello,I am trying to gain insight of the data but having hard time plotting it.Suppose I have a data frame like belowIDFeature 1Class1agood2agood3bgood4bbad5abad6abad7bba...
Neo
660
points
10
12
17
answered
Oct 17, 2018
Python
python
programming
plots
matplotlib
+
–
1
1 vote
0
0 answers
400
400 views
My own transformation for dropping feature doesn't work
I made my own transformation to drop some of the features not required in the dataframe but I can't seem to get it working. Thoughts ?https://repl.it/@Neo_sauga/HarmfulNe...
Neo
660
points
10
12
17
asked
Oct 16, 2018
Python
python
programming
+
–
To see more, click for all the
questions in this category
.