Can a logistic regression model predict more than two classes?
What was the purpose of us trying to predict iPhone vs Android?
What is the difference between a linear regression model and a logistic regression model?
Prompt:
def square(x):
"""Return the square of x."""
Probabilities for next word:
return
: 98.55%#
: 0.57%squared
: 0.16%y
: 0.14%print
: 0.11%Problem: not everything on the Internet is helpful.
Example: when I generated from the prompt above, the model generated the return
statement, and kept going:
f = square
print(square)
print(f)
§ Output
> stdout : ['<function square at 0x7fcb879b52f0>\n', '<function square at 0x7fcb879b52f0>\n']
§ Code
def fahrenheit(T):
return (9.0/5)*T + 32
def celsius(T):
return (5.0/9)*(T-32)
temp = [0, 22.5, 40, 100]
F_temps = list(map(fahrenheit, temp))
C_temps = list(map(celsius, F_temps))
print(F_temps)
print(C_temps)
Shortcuts human thinking and empathy.