-
Notifications
You must be signed in to change notification settings - Fork 299
[doc] Add module descriptions and ToDos #289
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Changes from all commits
d5bdfd9
13899df
f895745
f3282d9
8f864e6
f5765ba
151055e
65bb672
aeedc2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
"""Base class for tasks to solve | ||
* The shared components among all the tasks | ||
* This module provides the optimization given a pipeline | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this line is a bit confusing. We can mention that it initiates HPO for the pipeline search space. |
||
* This module plays a role of communicating with | ||
distributed clients | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can also mention that its the main API to interact with the user and fits the ensemble. |
||
TODO: | ||
* Separate the training procedure by another class and encapsulate it | ||
* Separate _do_dummy_prediction and refactor it | ||
* Separate _do_traditional_prediction and refactor it | ||
* Refactor _search | ||
* Reduce unimportant instance variables | ||
* Use private variables and public variables by _<var name> | ||
""" | ||
|
||
import copy | ||
import json | ||
import logging.handlers | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,15 @@ | ||||||
"""Base class for the feature validator given a task | ||||||
* A wrapper class of the sklearn.base.BaseEstimator | ||||||
* The feature validator for each task inherits this class | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think its again redundant. |
||||||
* Check if the provided feature can be processed in AutoPytorch | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
TODO: | ||||||
* SUPPORTED_FEAT_TYPES --> Enumerator | ||||||
* Describe the shape of X | ||||||
* typing.<type> --> <type> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not done. |
||||||
* logging.Logger --> Logger | ||||||
""" | ||||||
|
||||||
import logging | ||||||
import typing | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
"""Base class for the target (or label) validator given a task | ||
* A wrapper class of the sklearn.base.BaseEstimator | ||
* The target validator for each task inherits this class | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again redundant. |
||
* Check if the provided targets (or labels) are compatible in both | ||
training and test | ||
|
||
TODO: | ||
* SUPPORTED_FEAT_TYPES --> Enumerator | ||
* Describe the shape of y | ||
* typing.<type> --> <type> | ||
* logging.Logger --> Logger | ||
* Rename classes_ --> get_classes | ||
* Check the return of classes_ | ||
* is_single_column_target --> is_target_scalar | ||
""" | ||
|
||
import logging | ||
import typing | ||
|
||
|
@@ -31,12 +47,13 @@ class BaseTargetValidator(BaseEstimator): | |
""" | ||
A class to pre-process targets. It validates the data provided during fit (to make sure | ||
it matches AutoPyTorch expectation) as well as encoding the targets in case of classification | ||
|
||
Attributes: | ||
is_classification (bool): | ||
A bool that indicates if the validator should operate in classification mode. | ||
During classification, the targets are encoded. | ||
encoder (typing.Optional[BaseEstimator]): | ||
Host a encoder object if the data requires transformation (for example, | ||
Host an encoder object if the data requires transformation (for example, | ||
if provided a categorical column in a pandas DataFrame) | ||
enc_columns (typing.List[str]) | ||
List of columns that where encoded | ||
|
@@ -175,7 +192,7 @@ def classes_(self) -> np.ndarray: | |
Complies with scikit learn classes_ attribute, | ||
which consist of a ndarray of shape (n_classes,) | ||
where n_classes are the number of classes seen while fitting | ||
a encoder to the targets. | ||
an encoder to the targets. | ||
Returns: | ||
classes_: np.ndarray | ||
The unique classes seen during encoding of a classifier | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
"""Base class for the input validator given a task | ||
* A wrapper class of the sklearn.base.BaseEstimator | ||
* The input validator for each task inherits this class | ||
* Check if the provided data are compatible with AutoPytorch implementation | ||
* Manage both target_ and feature_validator in this class | ||
|
||
TODO: | ||
* typing.<type> --> <type> | ||
* logging.Logger --> Logger | ||
* Inherit feature_validator and target_validator from a child class | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you mean here? |
||
via super().__init__() | ||
""" | ||
|
||
# -*- encoding: utf-8 -*- | ||
import logging.handlers | ||
import typing | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,19 @@ | ||||||
"""Base class of the provided dataset | ||||||
* Provide data validation splits based on types of data | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* Provide API to return training and validation splits | ||||||
* Storage the properties of the dataset which are required | ||||||
in AutoPytorch implementation | ||||||
|
||||||
TODO: | ||||||
* Address: https://github.com/automl/Auto-PyTorch/pull/108/ | ||||||
* Make BaseDatasetPropertiesType more informative | ||||||
* Use private variables and public variables properly | ||||||
* Consider more memory-efficient way to store splits | ||||||
==> It will be so much memory consumption for huge datasets | ||||||
* Check the usage of validation and test because cross validation | ||||||
only uses the training dataset | ||||||
""" | ||||||
|
||||||
import os | ||||||
import uuid | ||||||
from abc import ABCMeta | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
"""The title of the module description # noqa | ||
* Describe at the beginning of the source code. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is template text. Maybe you have to update this? |
||
* Describe before the package imports | ||
|
||
TODO: | ||
* Add the following | ||
References: | ||
Title: Ensemble Selection from Libraries of Models | ||
Authors: Rich Caruana et. al. | ||
URL: https://www.cs.cornell.edu/~alexn/papers/shotgun.icml04.revised.rev2.pdf | ||
|
||
* `A copy of self` --> check if it is really true | ||
* Change `<variable>_` to `_<variable>` | ||
* get_models_with_weights --> looks sort by descending of weights | ||
* soft voting ==> explanation | ||
References: | ||
Title: Consensus Based Ensembles of Soft Clusterings | ||
Authors: Kunal Punera and Joydeep Ghosh | ||
URL: https://www.researchgate.net/profile/Joydeep-Ghosh-8/publication/221188694_Consensus_Based_Ensembles_of_Soft_Clusterings/links/02e7e521fe367e06c3000000/Consensus-Based-Ensembles-of-Soft-Clusterings.pdf | ||
* _calculate_weights ==> what about np.sum(weights) > 1?? | ||
* Refactor _fit() and add the shape of predictions | ||
""" | ||
|
||
from collections import Counter | ||
from typing import Any, Dict, List, Tuple, Union | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is quite obvious, we don't need to mention it