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

SGD and Logistic Regression #5

Merged
merged 37 commits into from
Nov 10, 2021
Merged

SGD and Logistic Regression #5

merged 37 commits into from
Nov 10, 2021

Conversation

hasnainroopawalla
Copy link
Owner

  • Added an SGD optimizer
  • Added Binary Cross Entropy Loss function
  • Added a Logistic Regression Class
  • Updated Package structure and added a data loader utility
  • Added a Dataset class to initialize the input to the model

hasnainroopawalla and others added 30 commits October 28, 2021 12:20
…generic plot, added an argument to specify what evaluation metrics need to be displayed/plotted, ,tests WIP
…tch_size. Created a utils.model.py file where all model-specific utilities live
@hasnainroopawalla hasnainroopawalla self-assigned this Nov 10, 2021
@hasnainroopawalla hasnainroopawalla merged commit 8e393dd into master Nov 10, 2021
meghgala added a commit to meghgala/ShowML that referenced this pull request Nov 16, 2021
commit a6f019a
Author: hasnainroopawalla <hasnain.roopawalla@gmail.com>
Date:   Fri Nov 12 16:25:48 2021 +0100

    Added AdaGrad and RMSProp to the README

commit c861c2b
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Fri Nov 12 16:20:14 2021 +0100

    Update README.md

commit 66e943c
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Fri Nov 12 16:10:53 2021 +0100

    Added the AdaGrad and RMSProp Optimizer (hasnainroopawalla#7)

    * Added the AdaGrad and RMSProp Optimzer

    * Fixed linting

    * Fixed edge case in SGD

commit 8e393dd
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Wed Nov 10 16:30:32 2021 +0100

    SGD and Logistic Regression (hasnainroopawalla#5)

    * Added logistic regression and refactored loss function arguments

    * Working logistic regression with BCEP loss, converted all plots to a generic plot, added an argument to specify what evaluation metrics need to be displayed/plotted, ,tests WIP

    * Updated evaluation metric input, added a metric_map to map the string to a callable metric (accuracy, mse, etc.)

    * Better log loss method and added assertions for X_train and y_train data types

    * Added random weight initialization and handling of zero division in BCE objective

    * Removed dependency of metric_map for string-to-method conversion

    * Converted model.history to defaultdict

    * Moved plot_metrics to plots.py

    * Updated version number

    * Updated release.sh

    * Added all optimizers and loss function classes to their respective __init__.py files

    * Removed plot flag from model.fit - WIP

    * Updated README.md

    * Fixed linting for __init__.py

    * Added a generate_minibatch method to generate batches based on the batch_size. Created a utils.model.py file where all model-specific utilities live

    * Reorganized tests

    * Test CI mypy

    * Updated requirements.txt and the CI

    * Replaced np.float64 with float and fixed mypy errors, added a mypy.ini config file

    * Update README.md

    * Update README.md

    * Update requirements.txt

    * Update README.md

    * Update README.md

    * Update README.md

    * Update README.md

    * Update README.md

    * Added momentum to SGD

    * Added a Dataset class which includes validation of X and y. Refactored regression examples to reflect these changes

    * Moved examples/ to ShowML/

    * Added a model.compile method

    * Reorganized files and created a data_loader.py file

    * Version number update

    * Added mypy installation to CI

    * Added pytest installation to CI
meghgala added a commit to meghgala/ShowML that referenced this pull request Nov 16, 2021
commit a6f019a
Author: hasnainroopawalla <hasnain.roopawalla@gmail.com>
Date:   Fri Nov 12 16:25:48 2021 +0100

    Added AdaGrad and RMSProp to the README

commit c861c2b
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Fri Nov 12 16:20:14 2021 +0100

    Update README.md

commit 66e943c
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Fri Nov 12 16:10:53 2021 +0100

    Added the AdaGrad and RMSProp Optimizer (hasnainroopawalla#7)

    * Added the AdaGrad and RMSProp Optimzer

    * Fixed linting

    * Fixed edge case in SGD

commit 8e393dd
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Wed Nov 10 16:30:32 2021 +0100

    SGD and Logistic Regression (hasnainroopawalla#5)

    * Added logistic regression and refactored loss function arguments

    * Working logistic regression with BCEP loss, converted all plots to a generic plot, added an argument to specify what evaluation metrics need to be displayed/plotted, ,tests WIP

    * Updated evaluation metric input, added a metric_map to map the string to a callable metric (accuracy, mse, etc.)

    * Better log loss method and added assertions for X_train and y_train data types

    * Added random weight initialization and handling of zero division in BCE objective

    * Removed dependency of metric_map for string-to-method conversion

    * Converted model.history to defaultdict

    * Moved plot_metrics to plots.py

    * Updated version number

    * Updated release.sh

    * Added all optimizers and loss function classes to their respective __init__.py files

    * Removed plot flag from model.fit - WIP

    * Updated README.md

    * Fixed linting for __init__.py

    * Added a generate_minibatch method to generate batches based on the batch_size. Created a utils.model.py file where all model-specific utilities live

    * Reorganized tests

    * Test CI mypy

    * Updated requirements.txt and the CI

    * Replaced np.float64 with float and fixed mypy errors, added a mypy.ini config file

    * Update README.md

    * Update README.md

    * Update requirements.txt

    * Update README.md

    * Update README.md

    * Update README.md

    * Update README.md

    * Update README.md

    * Added momentum to SGD

    * Added a Dataset class which includes validation of X and y. Refactored regression examples to reflect these changes

    * Moved examples/ to ShowML/

    * Added a model.compile method

    * Reorganized files and created a data_loader.py file

    * Version number update

    * Added mypy installation to CI

    * Added pytest installation to CI
hasnainroopawalla added a commit that referenced this pull request Nov 16, 2021
* Added logistic regression and refactored loss function arguments

* Working logistic regression with BCEP loss, converted all plots to a generic plot, added an argument to specify what evaluation metrics need to be displayed/plotted, ,tests WIP

* Updated evaluation metric input, added a metric_map to map the string to a callable metric (accuracy, mse, etc.)

* Better log loss method and added assertions for X_train and y_train data types

* Added random weight initialization and handling of zero division in BCE objective

* Removed dependency of metric_map for string-to-method conversion

* Converted model.history to defaultdict

* Moved plot_metrics to plots.py

* Updated version number

* Updated release.sh

* Added all optimizers and loss function classes to their respective __init__.py files

* Removed plot flag from model.fit - WIP

* Updated README.md

* Fixed linting for __init__.py

* Added a generate_minibatch method to generate batches based on the batch_size. Created a utils.model.py file where all model-specific utilities live

* Reorganized tests

* Added pytest to requirements.txt and removed unused import in test_metrics.py

* Test CI mypy

* Updated requirements.txt and the CI

* Replaced np.float64 with float and fixed mypy errors, added a mypy.ini config file

* Update README.md

* Update README.md

* Update requirements.txt

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Added momentum to SGD

* Added a Dataset class which includes validation of X and y. Refactored regression examples to reflect these changes

* Moved examples/ to ShowML/

* Create test_dataset.py

* Squashed commit of the following:

commit a6f019a
Author: hasnainroopawalla <hasnain.roopawalla@gmail.com>
Date:   Fri Nov 12 16:25:48 2021 +0100

    Added AdaGrad and RMSProp to the README

commit c861c2b
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Fri Nov 12 16:20:14 2021 +0100

    Update README.md

commit 66e943c
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Fri Nov 12 16:10:53 2021 +0100

    Added the AdaGrad and RMSProp Optimizer (#7)

    * Added the AdaGrad and RMSProp Optimzer

    * Fixed linting

    * Fixed edge case in SGD

commit 8e393dd
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Wed Nov 10 16:30:32 2021 +0100

    SGD and Logistic Regression (#5)

    * Added logistic regression and refactored loss function arguments

    * Working logistic regression with BCEP loss, converted all plots to a generic plot, added an argument to specify what evaluation metrics need to be displayed/plotted, ,tests WIP

    * Updated evaluation metric input, added a metric_map to map the string to a callable metric (accuracy, mse, etc.)

    * Better log loss method and added assertions for X_train and y_train data types

    * Added random weight initialization and handling of zero division in BCE objective

    * Removed dependency of metric_map for string-to-method conversion

    * Converted model.history to defaultdict

    * Moved plot_metrics to plots.py

    * Updated version number

    * Updated release.sh

    * Added all optimizers and loss function classes to their respective __init__.py files

    * Removed plot flag from model.fit - WIP

    * Updated README.md

    * Fixed linting for __init__.py

    * Added a generate_minibatch method to generate batches based on the batch_size. Created a utils.model.py file where all model-specific utilities live

    * Reorganized tests

    * Test CI mypy

    * Updated requirements.txt and the CI

    * Replaced np.float64 with float and fixed mypy errors, added a mypy.ini config file

    * Update README.md

    * Update README.md

    * Update requirements.txt

    * Update README.md

    * Update README.md

    * Update README.md

    * Update README.md

    * Update README.md

    * Added momentum to SGD

    * Added a Dataset class which includes validation of X and y. Refactored regression examples to reflect these changes

    * Moved examples/ to ShowML/

    * Added a model.compile method

    * Reorganized files and created a data_loader.py file

    * Version number update

    * Added mypy installation to CI

    * Added pytest installation to CI

* dataset tests completed

* Squashed commit of the following:

commit a6f019a
Author: hasnainroopawalla <hasnain.roopawalla@gmail.com>
Date:   Fri Nov 12 16:25:48 2021 +0100

    Added AdaGrad and RMSProp to the README

commit c861c2b
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Fri Nov 12 16:20:14 2021 +0100

    Update README.md

commit 66e943c
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Fri Nov 12 16:10:53 2021 +0100

    Added the AdaGrad and RMSProp Optimizer (#7)

    * Added the AdaGrad and RMSProp Optimzer

    * Fixed linting

    * Fixed edge case in SGD

commit 8e393dd
Author: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Date:   Wed Nov 10 16:30:32 2021 +0100

    SGD and Logistic Regression (#5)

    * Added logistic regression and refactored loss function arguments

    * Working logistic regression with BCEP loss, converted all plots to a generic plot, added an argument to specify what evaluation metrics need to be displayed/plotted, ,tests WIP

    * Updated evaluation metric input, added a metric_map to map the string to a callable metric (accuracy, mse, etc.)

    * Better log loss method and added assertions for X_train and y_train data types

    * Added random weight initialization and handling of zero division in BCE objective

    * Removed dependency of metric_map for string-to-method conversion

    * Converted model.history to defaultdict

    * Moved plot_metrics to plots.py

    * Updated version number

    * Updated release.sh

    * Added all optimizers and loss function classes to their respective __init__.py files

    * Removed plot flag from model.fit - WIP

    * Updated README.md

    * Fixed linting for __init__.py

    * Added a generate_minibatch method to generate batches based on the batch_size. Created a utils.model.py file where all model-specific utilities live

    * Reorganized tests

    * Test CI mypy

    * Updated requirements.txt and the CI

    * Replaced np.float64 with float and fixed mypy errors, added a mypy.ini config file

    * Update README.md

    * Update README.md

    * Update requirements.txt

    * Update README.md

    * Update README.md

    * Update README.md

    * Update README.md

    * Update README.md

    * Added momentum to SGD

    * Added a Dataset class which includes validation of X and y. Refactored regression examples to reflect these changes

    * Moved examples/ to ShowML/

    * Added a model.compile method

    * Reorganized files and created a data_loader.py file

    * Version number update

    * Added mypy installation to CI

    * Added pytest installation to CI

* Delete model.py

* Update python_packaging.yml

Co-authored-by: hasnainroopawalla <hasnain.roopawalla@gmail.com>
Co-authored-by: Hasnain Roopawalla <37022937+hasnainroopawalla@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant