(value: float)
| 243 | |
| 244 | |
| 245 | def sigmoid(value: float) -> float: |
| 246 | if value >= 40: |
| 247 | return 1.0 |
| 248 | if value <= -40: |
| 249 | return 0.0 |
| 250 | return 1.0 / (1.0 + math.exp(-value)) |
| 251 | |
| 252 | |
| 253 | def sparse_dot(weights: Dict[str, float], vector: Dict[str, float]) -> float: |
no outgoing calls
no test coverage detected