boladjivinny / olpy Goto Github PK
View Code? Open in Web Editor NEWA Python Library for Online Machine Learning Algorithms
Home Page: https://olpy.readthedocs.io/en/latest/
License: MIT License
A Python Library for Online Machine Learning Algorithms
Home Page: https://olpy.readthedocs.io/en/latest/
License: MIT License
While using the partial_fit
method in the CW, the _update
method raises an error while computing the covariance matrix.
Steps to reproduce
partial_fit
using one data pointTraceback (most recent call last):
File "script.py", line 88, in
model = model.partial_fit(x, y, classes=[1, -1])
File "/home/boladji/project/pyenv/lib/python3.8/site-packages/olpy_boladjivinny-1.0.0-py3.8.egg/olpy/classifiers/__base.py", line 124, in partial_fit
self._update(x, y)
File "/home/boladji/project/pyenv/lib/python3.8/site-packages/olpy_boladjivinny-1.0.0-py3.8.egg/olpy/classifiers/cw.py", line 79, in _update
v_t = x @ np.diag(np.diag(self._sigma)) @ x.T
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 1 is different from 123)
Vinny, this is really really awesome! I love your compliance with PEP-8 standards, use of poetry, code elegance, and neat documentation. I'll make some time this week to try it out to train some models for online learning!
Looking through the code, I realized that this package could take advantage of type hints just to make readability, understanding of the expected outputs, code linting and IDE integration even more easier.
As an example, the class olpy.preprocessing.labels.LabelEncoder has a fit(self, y) method. Adding type hints will yield:
import numpy as np
class LabelEncoder
def fit(self, y:np.ndarray) -> LabelEncoder:
# method code goes here
return self
Hope this helps! Would probably submit a few PRs to help with this after trying out the package. Cheers!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.