Skip to content

bhlarson/pymlutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pymlutil

Python Machine Learning utilities:

functions

GaussianBasis

Computes a unit height gaussian bell curve function
$ GaussianBasis(x, zero, sigma) = e^{-\frac{(x-zero)^2}{2*sigma^2}} $ \

  • x : function input
  • zero : location of the peak center
  • sigma: curve with or standard deviation
def GaussianBasis(x, zero=0.0, sigma=0.33)

Example:

x = np.arange(-2.0, 2.0, 0.01) 
y = GaussianBasis(torch.tensor(x))
plt.plot(x, y)
plt.show()

gaussian_bias

imutial

jsonutil

  • cmd(command, check=True, timeout=None): execute subprocess.call prining the execution time and results

metrics

s3

python3 -clone 

### torch_util

### version

### workflow


[Packaging Python Projects](https://www.freecodecamp.org/news/build-your-first-python-package/)
[How to Publish an Open-Source Python Package to PyPI](https://realpython.com/pypi-publish-python-package/)

- Install twine:
    ```cmd
    pip3 install twine
    ```

- Build whl:
    ```cmd
    py setup.py sdist bdist_wheel
    ```

- Upload package to pipy
    ```cmd
    twine upload dist/*
    ```

[pymlutil](https://pypi.org/project/pymlutil)

- Load package into project
    ```cmd
    pip3 install --upgrade pymlutil
    ```

- Include pymlutil into project
```cmd
from pymlutil import *

Notes

Packaging and Distributing Python Projects Package Discovery