Kim 2 ML

Applied AI notes for data scientists, analysts, and builders

Quiz

Remain original value if x > 0, else replace with 0.

1. Using Max

x = -10
x = max(0, x)
x

2. Using logical

x = -10
x = x * ( x > 0 )
x

3. Using absolute

x = -10
x = ( abs(x) + x ) / 2
x 

Any other suggestion?

Leave a comment