Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in AMFClassifier and finish AMFRegressor (#1166) #1281

Merged
merged 15 commits into from
Jul 11, 2023
Merged

Commits on Jul 6, 2023

  1. AMFRegressor (#1166)

    * AMF Classifier & Mondrian Tree Classifier implementation
    
    * [Pull request Update]
    - Adding a "mondrian" folder in the "tree" folder for better file structure
    - Using "random.choices" instead of the "sample_discrete" functions in "utils.py", and removing "sample_discrete" from the "utils.py"
    
    * [Pull Request]
    - Removing the "__repr__" method of AMF
    - Removing the @Setter and @getter
    - Removing the "loss" parameter of the classifiers since only the "log-loss" is being used in the end
    
    * Updating docstring
    
    * [Pull request]
    - Making `learn_one` and `predict_proba_one` accepting all kinds of supported labels for `y` as input
    - `predict_proba_one` outputs a dictionary of scores with matching labels
    
    * [Fix] Reability
    
    Co-authored-by: Saulo Martiello Mastelini <mastelini@usp.br>
    
    * [Fix] Language
    
    Co-authored-by: Saulo Martiello Mastelini <mastelini@usp.br>
    
    * [Fix] Language
    
    Co-authored-by: Saulo Martiello Mastelini <mastelini@usp.br>
    
    * [Fix] math package implementation usage
    
    Co-authored-by: Saulo Martiello Mastelini <mastelini@usp.br>
    
    * [Pull request]
    - Leaving `__all__` in alphabetical order for the classifiers
    - Removing type parameters in the description of `log_2_sum` of math utils
    - Replacing java-like getters and setters by python-like properties and setter
    
    * - Adding support for random state (seed)
    - Replacing Overflow from infinity to maximum possible float (so it makes computations still possible)
    
    * [Ignoring testing environment]
    
    * Fixing style & typos
    
    Co-authored-by: Saulo Martiello Mastelini <mastelini@usp.br>
    
    * [Pull request]
    - Fixing import order in __init__ file of ensemble
    - Using LaTeX formulation in AMFClassifier description
    - Making all nodes related methods private (it shouldn't be used outside)
    - Docstring syntax update and fixes
    - Importing river.base instead of typing module for better readability
    - Adding a short description to the MondrianTreeClassifier
    - Renaming MondrianTreeLeaf into MondrianLeaf
    - Reordering functions in MondrianTreeClassifier for better readability
    
    * Pre-commit clean up
    
    * Pre-commit clean up
    
    * [MyPy issue]
    - Trying to fix the left-right issue uppercast (that shouldn't be a problem normally, but mypy keeps being unhappy)
    - Fixing assignment issue to the parent during upward procedure
    - Fixing type assignment to the root branch of the tree
    - Fixing arg-type for list of intensities
    - Fixing arg-type issue with current samples proceeding
    - Fixing dirichlet arg-type issue
    - Fixing some typing issues
    - Removing call-overload as int in the memories features range list
    - Correcting output of predict function
    
    * Fixing MyPy issues (detyping)
    
    * suggestions and style issues fix
    
    * addingnecessary files, classes and methods for regressor
    
    * minor import modifications
    
    * minor list to typing.List and dict to typing.Dict modifs
    
    * minor modifs to pass tests
    
    * minor changes
    
    * changing names
    
    * Fixing predict function to support the "model not trained" situation instead of raising an exception
    
    * more style suggestions
    
    * testing
    
    * regressor fix
    
    * fixing docstring
    
    * [Pull request Update]
    - Fixing some TODOs from Mastelini suggestions
    - Factorizing a bit of code from nodes that should be shared with regressor
    - Removing branch structure as of now for future changes
    
    * Removing all "array-like" structure for full dict support
    
    * Pre-commit hookups fixes
    
    * regressor fix
    
    * Delete tests.py
    
    * [Pull request]
    - Adding suggestions from Mastelini on keys usage
    - Removing useless initialization of scores in the MondrianTreeClassifier
    
    * bug fix
    
    * fix conflicts
    
    * refactored, but has bugs
    
    * remove mypy skip
    
    * tests
    
    * tests
    
    * cleanup
    
    * better, but not fixed
    
    * minor fix
    
    * [Fixes]
    - Fixing scoring bug (no propagation of counts)
    - Removing unused parameters in docs
    - Replacing type union of Python 3.10 in 3.9 annotations
    - Adding little description for MondrianBranch
    
    * Pre-commit hookups fixes
    
    * fix some tests
    
    * Reworking intensities
    
    * fix remaining tests and remove duplicated method call
    
    * [Pull request]
    - Adding examples for AMF & Mondrian Tree Classifiers
    - Reordering __init__ in alphabetical order
    - Cleaning the comments
    - Adding string representation for nodes
    
    * Hiding MondrianTree from users visibility
    
    * Fixing import on Mondrian Tree example
    
    Co-authored-by: Saulo Martiello Mastelini <mastelini@usp.br>
    
    * tests
    
    * merge fix
    
    * merge fix
    
    * docstring fixes
    
    ---------
    
    Co-authored-by: AlexandreChaussard <alexandre.chaussard@telecom-sudparis.eu>
    Co-authored-by: Alexandre Chaussard <78101027+AlexandreChaussard@users.noreply.github.com>
    Co-authored-by: Saulo Martiello Mastelini <mastelini@usp.br>
    Co-authored-by: Kenza Ben jelloun <kenza.ben_jelloun@telecom-sudparis.eu>
    Co-authored-by: Saulo Martiello Mastelini <saulomastelini@gmail.com>
    6 people committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    0386737 View commit details
    Browse the repository at this point in the history
  2. fix exponential sampling

    Saulo Martiello Mastelini committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    2fcc7a9 View commit details
    Browse the repository at this point in the history
  3. lint

    Saulo Martiello Mastelini committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    4f00597 View commit details
    Browse the repository at this point in the history
  4. mypy

    Saulo Martiello Mastelini committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    913195e View commit details
    Browse the repository at this point in the history
  5. AMF Reg

    Saulo Martiello Mastelini committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    30f587b View commit details
    Browse the repository at this point in the history
  6. documentation

    Saulo Martiello Mastelini committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    2cc44e0 View commit details
    Browse the repository at this point in the history
  7. expose exponential sampling

    Saulo Martiello Mastelini committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    8d973ab View commit details
    Browse the repository at this point in the history
  8. fix mypy

    Saulo Martiello Mastelini committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    b64e71f View commit details
    Browse the repository at this point in the history
  9. release notes

    Saulo Martiello Mastelini committed Jul 6, 2023
    Configuration menu
    Copy the full SHA
    a3d0a96 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. Update docs/releases/unreleased.md

    Co-authored-by: Max Halford <maxhalford25@gmail.com>
    smastelini and MaxHalford authored Jul 10, 2023
    Configuration menu
    Copy the full SHA
    1a59bd0 View commit details
    Browse the repository at this point in the history
  2. Update river/forest/aggregated_mondrian_forest.py

    Co-authored-by: Max Halford <maxhalford25@gmail.com>
    smastelini and MaxHalford authored Jul 10, 2023
    Configuration menu
    Copy the full SHA
    22a9223 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2023

  1. Update river/utils/random.py

    Co-authored-by: Max Halford <maxhalford25@gmail.com>
    smastelini and MaxHalford authored Jul 11, 2023
    Configuration menu
    Copy the full SHA
    e0f5f02 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1147a14 View commit details
    Browse the repository at this point in the history
  3. fix docstrings

    Saulo Martiello Mastelini committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    e7a4cd7 View commit details
    Browse the repository at this point in the history
  4. add missing import

    Saulo Martiello Mastelini committed Jul 11, 2023
    Configuration menu
    Copy the full SHA
    2b623cf View commit details
    Browse the repository at this point in the history