Skip to content

Commit

Permalink
Merge pull request #19 from rugbedbugg/issue_4_branch
Browse files Browse the repository at this point in the history
fixed issue #4
  • Loading branch information
aditisaxena259 authored Oct 1, 2024
2 parents eb494db + 1d88cea commit a15d82d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions neo.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import numpy as np

def sigmoid(z):
return 1 / (1 + np.exp(-z))

try:
return 1 / (1 + np.exp(-z))
except OverflowError as e:
print(f"OverflowError in sigmoid: {e}")
return 1.0 if z > 0 else 0.0

class LogisticRegression:
def __init__(self, learning_rate=0.01, epochs=50, batch_size=4, regularization_strength=0.01, use_regularization=True, learning_rate_deacy = 0.99):
self.learning_rate = learning_rate
Expand Down

0 comments on commit a15d82d

Please sign in to comment.