semvec/pypi-packages huggingface dataset:
neural-network-implementation 1.0.1
A neural network implementation.
License: MIT
Keywords: nn neural-network

# How To Use

```python
from neural_network_implementation.neural_network import NeuralNetwork
from neural_network_implementation.layers import Layer
import numpy as np

x = np.array([[0, 0], [0, 1], [1, 0], [1, 1]])
y = np.array([[0], [1], [1], [0]])

nn = NeuralNetwork()
nn.add_layer(Layer(2, 10, 'sigmoid'))
nn.add_layer(Layer(10, 1, 'sigmoid'))
errors = nn.train(x, y, 0.75, 500, 'MSE')

```
frechetlib 0.1.1
A package to compute distances between curves.
License: MIT
Requires Python: >=3.10

# FrechetLib
A library for computing Frechet distances between curves, and other associated quantities. This is
a Python version of the [FrechetDist](https://github.com/sarielhp/FrechetDist.jl) julia package.


## Development Status
This library is in an _alpha_ state. Most functions have some degree of testing, but
not extensively.

## Examples
```python
import time

from frechetlib.continuous_frechet import frechet_c_approx
from frechetlib.data import FrechetDownloader

downloader = FrechetDownloader()
big_curve_1 = downloader.get_curve("11/poly_a.txt")
big_curve_2 = downloader.get_curve("11/poly_b.txt")

print(big_curve_1.shape)
print(big_curve_2.shape)
# NOTE Run twice to factor out the compilation time from the timing.
frechet_c_approx(big_curve_1, big_curve_2, 1.01)
print("Starting")

start = time.perf_counter()
res, morphing = frechet_c_approx(big_curve_1, big_curve_2, 1.01)
end = time.perf_counter()

print("Approximated Frechet distance: ", morphing.dist)
print("Time taken (s): ", end - start)
```

## API

The package API is currently minimal and undocumented for now. See the test cases for usage
examples. This will be filled out more later.
nn-error-metrics 1.0.1
A collection of neural network machine learning error metrics.
License: MIT
Keywords: nn neural-network metrics nn-error_metrics

# Example Usage
```
import numpy as np
from nn_error_metrics import (
    mean_absolute_percentage_error,
    mean_absolute_error,
    mean_squared_error,
    root_mean_squared_error,
    binary_cross_entropy,
    categorical_correntropy,
    sparse_categorical_crossentropy
)

actual = np.array([10, 20, 30, 40, 50])
predicted = np.array([12, 18, 28, 41, 48])

print("Mean Absolute Percentage Error (MAPE):", mean_absolute_percentage_error(actual, predicted))
print("Mean Absolute Error (MAE):", mean_absolute_error(actual, predicted))
print("Mean Squared Error (MSE):", mean_squared_error(actual, predicted))
print("Root Mean Squared Error (RMSE):", root_mean_squared_error(actual, predicted))

actual = np.array([1, 0, 1, 1, 0])
predicted = np.array([0.9, 0.2, 0.8, 0.6, 0.3])
print("Binary Cross Entropy (BCE):", binary_cross_entropy(actual, predicted))

actual = np.array([[0, 1], [1, 0], [0, 1], [0, 1], [1, 0]])
predicted = np.array([[0.1, 0.9], [0.8, 0.2], [0.3, 0.7], [0.6, 0.4], [0.9, 0.1]])
print("Categorical Correntropy (CC):", categorical_correntropy(actual, predicted))

actual = np.array([1, 0, 1, 1, 0])
predicted = np.array([[0.1, 0.9], [0.8, 0.2], [0.3, 0.7], [0.6, 0.4], [0.9, 0.1]])
print("Sparse Categorical Correntropy (SCC):", sparse_categorical_crossentropy(actual, predicted))

```