Nueramic MathML
Nueramic-mathml is a library for visualizing and logging the steps of optimization algorithms in machine learning. The project uses torch for calculations and plotly for visualization.
pip install nueramic-mathml
Quick tour 
Optimization
You can minimize the functions and see a detailed description of each step. After minimizing, you have a history with complete logs. Also available multidimensional optimisation.
def f(x): return x ** 3 - x ** 2 - x # Minimum at x = 1
bounds = (0, 3)
one_optimize.golden_section_search(f, bounds, epsilon=0.01, verbose=True)[0]
Iteration: 0 | point = 1.500 | f(point) = -0.375
Iteration: 1 | point = 0.927 | f(point) = -0.990
Iteration: 2 | point = 1.281 | f(point) = -0.820
Iteration: 3 | point = 1.062 | f(point) = -0.992
Iteration: 4 | point = 0.927 | f(point) = -0.990
Iteration: 5 | point = 1.011 | f(point) = -1.000
Iteration: 6 | point = 0.959 | f(point) = -0.997
Iteration: 7 | point = 0.991 | f(point) = -1.000
Iteration: 8 | point = 1.011 | f(point) = -1.000
Iteration: 9 | point = 0.998 | f(point) = -1.000
Iteration: 10 | point = 1.006 | f(point) = -1.000
Searching finished. Successfully. code 0
1.0059846881033916
Models
You can use our models for classification and regression
from nueramic_mathml.ml import LogisticRegressionRBF
from sklearn.datasets import make_moons
x, y = make_moons(10_000, noise=.1, random_state=84)
x, y = torch.tensor(x), torch.tensor(y)
logistic_model_rbf = LogisticRegressionRBF(x[:1000]).fit(x, y, show_epoch=10)
Epoch: 1 | CrossEntropyLoss: 0.71496
Epoch: 12 | CrossEntropyLoss: 0.35328
Epoch: 23 | CrossEntropyLoss: 0.27769
Epoch: 34 | CrossEntropyLoss: 0.22395
Epoch: 45 | CrossEntropyLoss: 0.19266
Epoch: 56 | CrossEntropyLoss: 0.16695
Epoch: 67 | CrossEntropyLoss: 0.14686
Epoch: 78 | CrossEntropyLoss: 0.13051
Epoch: 89 | CrossEntropyLoss: 0.11724
Epoch: 100 | CrossEntropyLoss: 0.10629
logistic_model_rbf.metrics_tab(x, y)
{'auc_roc': 0.9974513817072977,
'f1': 0.9700730618209839,
'precision': 0.9709476828575134,
'recall': 0.9692000150680542}
Visualizations
You can create beautiful animations of optimization algorithms and regression/classification models.
gen_classification_plot(x, y, model, threshold=0.5, epsilon=0.001)
Metadata
Release files for nueramic-mathml 0.75.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nueramic_mathml-0.75.2-py3-none-any.whl | Python 3 | none | any | Details for nueramic_mathml-0.75.2-py3-none-any.whl |
Release files / nueramic_mathml-0.75.2-py3-none-any.whl
| Download URL | nueramic_mathml-0.75.2-py3-none-any.whl |
|---|---|
| Size | 45.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b9b7aee63a84296bc867090edbc193f7361fb1e121913fb6920dec49c308347
|
|
BLAKE2b-256 checksum How to use checksums |
68e85ec9a24af38a1e4b4230c905b08e67bcfae5c89f3ccab51b89a0f1ee86ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Darwin/21.5.0
|
Security for nueramic-mathml 0.75.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.