Skip to content

Commit 6384239

Browse files
jsorefmirand863
andauthored
Spelling (#158)
* spelling: ; otherwise, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: amount Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: demonstrates Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: interval Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: intervals Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: unsupported Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: walkthrough Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: mirand863 <miranda.fmm@gmail.com>
1 parent eb73493 commit 6384239

12 files changed

Lines changed: 24 additions & 24 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ When submitting code, please make every effort to follow existing conventions an
66

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

9-
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.
9+
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.
1010

1111
## Testing the code locally
1212

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ HiClass is an open-source Python library for hierarchical classification compati
1616
- [Who is using HiClass?](#who-is-using-hiclass)
1717
- [Install](#install)
1818
- [Quick start](#quick-start)
19-
- [Step-by-step walk-through](#step-by-step-walk-through)
19+
- [Step-by-step walkthrough](#step-by-step-walkthrough)
2020
- [API documentation](#api-documentation)
2121
- [FAQ](#faq)
2222
- [Support](#support)
@@ -197,17 +197,17 @@ pipeline.fit(X_train, Y_train)
197197
predictions = pipeline.predict(X_test)
198198
```
199199

200-
## Step-by-step walk-through
200+
## Step-by-step walkthrough
201201

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

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

206206
## API documentation
207207

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

210-
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).
210+
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).
211211

212212
## FAQ
213213

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

218218
## Support
219219

220-
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.
220+
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.
221221

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

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

235235
## Getting the latest updates
236236

237-
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.
237+
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.
238238

239239
## Citation
240240

benchmarks/consumer_complaints/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Regarding the parameters for Snakemake, they have the following meanings:
107107
- `--reason` makes Snakemake print the reason for each executed rule;
108108
- `--use-conda` is necessary to indicate that conda will be used to manage the software dependencies of the pipeline;
109109
- `--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;
110-
- `--resources mem_gb` specifies the total ammount of RAM that should be allocated for all jobs (only used during tuning and training);
110+
- `--resources mem_gb` specifies the total amount of RAM that should be allocated for all jobs (only used during tuning and training);
111111
- `--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;
112112
- `--jobs` the number of jobs that can be submitted simultaneously;
113113
- `--cluster` the parameters for individual jobs can be set inside the quotation marks.

docs/examples/plot_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
=====================
66
77
HiClass can be adopted in scikit-learn pipelines, and fully supports sparse matrices as input.
8-
This example desmonstrates the use of both of these features.
8+
This example demonstrates the use of both of these features.
99
"""
1010

1111
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer

docs/source/introduction/what.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ It mirrors the popular API from scikit-learn to train and predict with the most
66
Implemented models include the local classifiers per node, per parent node and per level.
77
HiClass is released under the simplified `BSD 3-Clause license <https://opensource.org/licenses/BSD-3-Clause>`_.
88

9-
For the source code, please take a look at the repository on `Github <https://github.com/scikit-learn-contrib/hiclass>`_.
9+
For the source code, please take a look at the repository on `GitHub <https://github.com/scikit-learn-contrib/hiclass>`_.

hiclass/HierarchicalClassifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def __init__(
107107
a single unique class.
108108
n_jobs : int, default=1
109109
The number of jobs to run in parallel. Only :code:`fit` is parallelized.
110-
If :code:`Ray` is installed it is used, otherwise it defaults to :code:`Joblib`.
110+
If :code:`Ray` is installed it is used; otherwise, it defaults to :code:`Joblib`.
111111
classifier_abbreviation : str, default=""
112112
The abbreviation of the local hierarchical classifier to be displayed during logging.
113113
calibration_method : {"ivap", "cvap", "platt", "isotonic", "beta"}, str, default=None
@@ -359,7 +359,7 @@ def _create_digraph(self):
359359
self._create_digraph_2d()
360360

361361
if self.y_.ndim > 2:
362-
# Unsuported dimension
362+
# Unsupported dimension
363363
self.logger_.error(f"y with {self.y_.ndim} dimensions detected")
364364
raise ValueError(
365365
f"Creating graph from y with {self.y_.ndim} dimensions is not supported"

hiclass/LocalClassifierPerLevel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(
7777
a single unique class.
7878
n_jobs : int, default=1
7979
The number of jobs to run in parallel. Only :code:`fit` is parallelized.
80-
If :code:`Ray` is installed it is used, otherwise it defaults to :code:`Joblib`.
80+
If :code:`Ray` is installed it is used; otherwise, it defaults to :code:`Joblib`.
8181
calibration_method : {"ivap", "cvap", "platt", "isotonic", "beta"}, str, default=None
8282
If set, use the desired method to calibrate probabilities returned by predict_proba().
8383
return_all_probabilities : bool, default=False

hiclass/LocalClassifierPerNode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(
8484
a single unique class.
8585
n_jobs : int, default=1
8686
The number of jobs to run in parallel. Only :code:`fit` is parallelized.
87-
If :code:`Ray` is installed it is used, otherwise it defaults to :code:`Joblib`.
87+
If :code:`Ray` is installed it is used; otherwise, it defaults to :code:`Joblib`.
8888
calibration_method : {"ivap", "cvap", "platt", "isotonic", "beta"}, str, default=None
8989
If set, use the desired method to calibrate probabilities returned by predict_proba().
9090
return_all_probabilities : bool, default=False

hiclass/LocalClassifierPerParentNode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(
7171
a single unique class.
7272
n_jobs : int, default=1
7373
The number of jobs to run in parallel. Only :code:`fit` is parallelized.
74-
If :code:`Ray` is installed it is used, otherwise it defaults to :code:`Joblib`.
74+
If :code:`Ray` is installed it is used; otherwise, it defaults to :code:`Joblib`.
7575
calibration_method : {"ivap", "cvap", "platt", "isotonic", "beta"}, str, default=None
7676
If set, use the desired method to calibrate probabilities returned by predict_proba().
7777
return_all_probabilities : bool, default=False

hiclass/_calibration/VennAbersCalibrator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def predict_proba(self, scores: np.ndarray, X: np.ndarray = None):
167167

168168
return p1 / (1 - p0 + p1)
169169

170-
def predict_intervall(self, scores: np.ndarray):
170+
def predict_interval(self, scores: np.ndarray):
171171
lower = np.searchsorted(self._unique_elements, scores, side="left")
172172
upper = np.searchsorted(self._unique_elements[:-1], scores, side="right") + 1
173173
p0 = self._F0[lower]
@@ -289,7 +289,7 @@ def predict_proba(self, scores: np.ndarray):
289289
continue
290290

291291
for calibrator in self.ovr_ivaps[idx]:
292-
res.append(calibrator.predict_intervall(scores))
292+
res.append(calibrator.predict_interval(scores))
293293

294294
res = np.array(res)
295295

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

315315
res = np.array(res)
316316
p0 = res[:, :, 0]

0 commit comments

Comments
 (0)