Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ When submitting code, please make every effort to follow existing conventions an

Where appropriate, please provide unit tests or integration tests. Unit tests should be pytest based tests and be added to <project>/tests.

Please make sure all tests pass before submitting a pull request. It is also good if you squash your commits and add the tags #major or #minor to the pull request title if need be, otherwise your pull request will be considered a patch bump. Please check [https://semver.org/](https://semver.org/) for more information about versioning.
Please make sure all tests pass before submitting a pull request. It is also good if you squash your commits and add the tags #major or #minor to the pull request title if need be; otherwise, your pull request will be considered a patch bump. Please check [https://semver.org/](https://semver.org/) for more information about versioning.

## Testing the code locally

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HiClass is an open-source Python library for hierarchical classification compati
- [Who is using HiClass?](#who-is-using-hiclass)
- [Install](#install)
- [Quick start](#quick-start)
- [Step-by-step walk-through](#step-by-step-walk-through)
- [Step-by-step walkthrough](#step-by-step-walkthrough)
- [API documentation](#api-documentation)
- [FAQ](#faq)
- [Support](#support)
Expand Down Expand Up @@ -197,17 +197,17 @@ pipeline.fit(X_train, Y_train)
predictions = pipeline.predict(X_test)
```

## Step-by-step walk-through
## Step-by-step walkthrough

A step-by-step walk-through is available on our documentation hosted on [Read the Docs](https://hiclass.readthedocs.io/en/latest/index.html).
A step-by-step walkthrough is available on our documentation hosted on [Read the Docs](https://hiclass.readthedocs.io/en/latest/index.html).

This will guide you through the process of installing hiclass within a virtual environment, training, predicting, persisting models and much more.

## API documentation

Here's our official API documentation, available on [Read the Docs](https://hiclass.readthedocs.io/en/latest/api/index.html).

If you notice any issues with the documentation or walk-through, please let us know by opening an issue here: [https://github.com/scikit-learn-contrib/hiclass/issues](https://github.com/scikit-learn-contrib/hiclass/issues).
If you notice any issues with the documentation or walkthrough, please let us know by opening an issue here: [https://github.com/scikit-learn-contrib/hiclass/issues](https://github.com/scikit-learn-contrib/hiclass/issues).

## FAQ

Expand All @@ -217,9 +217,9 @@ A detailed description on how the classifiers work is available at the [Algorith

## Support

If you run into any problems or issues, please create a [Github issue](https://github.com/scikit-learn-contrib/hiclass/issues) and we'll try our best to help.
If you run into any problems or issues, please create a [GitHub issue](https://github.com/scikit-learn-contrib/hiclass/issues) and we'll try our best to help.

We strive to provide good support through our issue tracker on Github. However, if you'd like to receive private support with:
We strive to provide good support through our issue tracker on GitHub. However, if you'd like to receive private support with:

- Phone / video calls to discuss your specific use case and get recommendations
- Private discussions over Slack or Mattermost
Expand All @@ -234,7 +234,7 @@ You can contribute in multiple ways, e.g., reporting bugs, writing or translatin

## Getting the latest updates

If you'd like to get updates when we release new versions, please click on the "Watch" button on the top and select "Releases only". Github will then send you notifications along with a changelog with each new release.
If you'd like to get updates when we release new versions, please click on the "Watch" button on the top and select "Releases only". GitHub will then send you notifications along with a changelog with each new release.

## Citation

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/consumer_complaints/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Regarding the parameters for Snakemake, they have the following meanings:
- `--reason` makes Snakemake print the reason for each executed rule;
- `--use-conda` is necessary to indicate that conda will be used to manage the software dependencies of the pipeline;
- `--cores` tells Snakemake how many cpus can be used overall (the more cpus you can spare, the faster the pipeline will finish). For a cluster execution, 12 cores is more than enough since individual jobs will have more CPUs allocated later;
- `--resources mem_gb` specifies the total ammount of RAM that should be allocated for all jobs (only used during tuning and training);
- `--resources mem_gb` specifies the total amount of RAM that should be allocated for all jobs (only used during tuning and training);
- `--restart-times` defines how many times the pipeline should restart a job if it fails. This could be useful if the reason for failing is out of memory, since each retry will allocate more memory for the failed job;
- `--jobs` the number of jobs that can be submitted simultaneously;
- `--cluster` the parameters for individual jobs can be set inside the quotation marks.
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/plot_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
=====================

HiClass can be adopted in scikit-learn pipelines, and fully supports sparse matrices as input.
This example desmonstrates the use of both of these features.
This example demonstrates the use of both of these features.
"""

from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer
Expand Down
2 changes: 1 addition & 1 deletion docs/source/introduction/what.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ It mirrors the popular API from scikit-learn to train and predict with the most
Implemented models include the local classifiers per node, per parent node and per level.
HiClass is released under the simplified `BSD 3-Clause license <https://opensource.org/licenses/BSD-3-Clause>`_.

For the source code, please take a look at the repository on `Github <https://github.com/scikit-learn-contrib/hiclass>`_.
For the source code, please take a look at the repository on `GitHub <https://github.com/scikit-learn-contrib/hiclass>`_.
4 changes: 2 additions & 2 deletions hiclass/HierarchicalClassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(
a single unique class.
n_jobs : int, default=1
The number of jobs to run in parallel. Only :code:`fit` is parallelized.
If :code:`Ray` is installed it is used, otherwise it defaults to :code:`Joblib`.
If :code:`Ray` is installed it is used; otherwise, it defaults to :code:`Joblib`.
classifier_abbreviation : str, default=""
The abbreviation of the local hierarchical classifier to be displayed during logging.
calibration_method : {"ivap", "cvap", "platt", "isotonic", "beta"}, str, default=None
Expand Down Expand Up @@ -359,7 +359,7 @@ def _create_digraph(self):
self._create_digraph_2d()

if self.y_.ndim > 2:
# Unsuported dimension
# Unsupported dimension
self.logger_.error(f"y with {self.y_.ndim} dimensions detected")
raise ValueError(
f"Creating graph from y with {self.y_.ndim} dimensions is not supported"
Expand Down
2 changes: 1 addition & 1 deletion hiclass/LocalClassifierPerLevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(
a single unique class.
n_jobs : int, default=1
The number of jobs to run in parallel. Only :code:`fit` is parallelized.
If :code:`Ray` is installed it is used, otherwise it defaults to :code:`Joblib`.
If :code:`Ray` is installed it is used; otherwise, it defaults to :code:`Joblib`.
calibration_method : {"ivap", "cvap", "platt", "isotonic", "beta"}, str, default=None
If set, use the desired method to calibrate probabilities returned by predict_proba().
return_all_probabilities : bool, default=False
Expand Down
2 changes: 1 addition & 1 deletion hiclass/LocalClassifierPerNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(
a single unique class.
n_jobs : int, default=1
The number of jobs to run in parallel. Only :code:`fit` is parallelized.
If :code:`Ray` is installed it is used, otherwise it defaults to :code:`Joblib`.
If :code:`Ray` is installed it is used; otherwise, it defaults to :code:`Joblib`.
calibration_method : {"ivap", "cvap", "platt", "isotonic", "beta"}, str, default=None
If set, use the desired method to calibrate probabilities returned by predict_proba().
return_all_probabilities : bool, default=False
Expand Down
2 changes: 1 addition & 1 deletion hiclass/LocalClassifierPerParentNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(
a single unique class.
n_jobs : int, default=1
The number of jobs to run in parallel. Only :code:`fit` is parallelized.
If :code:`Ray` is installed it is used, otherwise it defaults to :code:`Joblib`.
If :code:`Ray` is installed it is used; otherwise, it defaults to :code:`Joblib`.
calibration_method : {"ivap", "cvap", "platt", "isotonic", "beta"}, str, default=None
If set, use the desired method to calibrate probabilities returned by predict_proba().
return_all_probabilities : bool, default=False
Expand Down
6 changes: 3 additions & 3 deletions hiclass/_calibration/VennAbersCalibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def predict_proba(self, scores: np.ndarray, X: np.ndarray = None):

return p1 / (1 - p0 + p1)

def predict_intervall(self, scores: np.ndarray):
def predict_interval(self, scores: np.ndarray):
lower = np.searchsorted(self._unique_elements, scores, side="left")
upper = np.searchsorted(self._unique_elements[:-1], scores, side="right") + 1
p0 = self._F0[lower]
Expand Down Expand Up @@ -289,7 +289,7 @@ def predict_proba(self, scores: np.ndarray):
continue

for calibrator in self.ovr_ivaps[idx]:
res.append(calibrator.predict_intervall(scores))
res.append(calibrator.predict_interval(scores))

res = np.array(res)

Expand All @@ -310,7 +310,7 @@ def predict_proba(self, scores: np.ndarray):
else:
res = []
for calibrator in self.ivaps:
res.append(calibrator.predict_intervall(scores))
res.append(calibrator.predict_interval(scores))

res = np.array(res)
p0 = res[:, :, 0]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_inductive_venn_abers_calibrator(binary_calibration_data, binary_test_sc
calibrator = _InductiveVennAbersCalibrator()
calibrator.fit(scores=scores[:, 1], y=ground_truth_labels)

intervalls = calibrator.predict_intervall(test_scores[:, 1])
intervals = calibrator.predict_interval(test_scores[:, 1])
proba = calibrator.predict_proba(test_scores[:, 1])

assert_array_almost_equal(
Expand Down Expand Up @@ -188,7 +188,7 @@ def test_inductive_venn_abers_calibrator(binary_calibration_data, binary_test_sc
),
)
assert_array_almost_equal(
intervalls,
intervals,
np.array(
[
[0.66666666, 1.0],
Expand Down
6 changes: 3 additions & 3 deletions versioneer.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@
available.

* `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that
this is only accurate if run in a VCS checkout, otherwise it is likely to
this is only accurate if run in a VCS checkout; otherwise, it is likely to
be False or None

* `['error']`: if the version string could not be computed, this will be set
to a string describing the problem, otherwise it will be None. It may be
to a string describing the problem; otherwise, it will be None. It may be
useful to throw an exception in setup.py if this is set, to avoid e.g.
creating tarballs with a version string of "unknown".

Expand Down Expand Up @@ -161,7 +161,7 @@
## Known Limitations

Some situations are known to cause problems for Versioneer. This details the
most significant ones. More can be found on Github
most significant ones. More can be found on GitHub
[issues page](https://github.com/python-versioneer/python-versioneer/issues).

### Subprojects
Expand Down
Loading