Skip to content

Commit 5d9e26a

Browse files
authored
Merge pull request #25 from szepeviktor/typos
Fix typos
2 parents f1b59c2 + 58ab355 commit 5d9e26a

File tree

19 files changed

+37
-37
lines changed

19 files changed

+37
-37
lines changed

docs/source/bench/03_code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ a list of the most important hyperparameters.
1414

1515
## Datasets
1616

17-
We represent our datasets using the `DictDatset` class from `tab_models`.
17+
We represent our datasets using the `DictDataset` class from `tab_models`.
1818
These datasets can be loaded as follows:
1919

2020
```python

docs/source/models/01_sklearn_interfaces.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ but fails to run predict() due to pytorch-lightning device issues.
112112

113113
.. code-block:: language
114114
import torch
115-
import dill # might also work with pickle instad
115+
import dill # might also work with pickle instead
116116
torch.save(model, 'model.pkl', pickle_module=dill, _use_new_zipfile_serialization=False)
117117
model = torch.load('model.pkl', map_location='cpu', pickle_module=dill)
118118

docs/source/models/nn_classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ for continuous and categorical variables.
3535
Moreover, during training, we also pass the labels 'y' through the Layer,
3636
which allows to implement mixup, label smoothing,
3737
and output standardization as Layer objects.
38-
- `Fitter` classes initialize the NN based on a single foward pass
38+
- `Fitter` classes initialize the NN based on a single forward pass
3939
on the (subsampled) training (and possibly validation) set.
4040
This is done using the `fit()` or `fit_transform()` functions
4141
similar to scikit-learn preprocessing classes,

pytabkit/bench/data/get_uci.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ def get_metro_interstate_traffic_volume():
621621
replace_chars_in_file('metro_interstate_traffic_volume.data', ' ', ' ')
622622

623623

624-
# Now we are in the position ot read the data, convert the time and date, and movel the labels
624+
# Now we are in the position to read the data, convert the time and date, and movel the labels
625625

626626

627627
data = load_raw_data('metro_interstate_traffic_volume_short.data', ',', description_columns = 0, date_column = 16, date_sep = '-', date_order = 'Ymd', time_column = 17, time_sep = ':')
@@ -736,7 +736,7 @@ def get_tarvel_review_ratings():
736736
prepare_new_data_set_group_id()
737737

738738

739-
# Download the data and correct the mispelling of its name
739+
# Download the data and correct the misspelling of its name
740740

741741
download_and_save('http://archive.ics.uci.edu/ml/machine-learning-databases/00485/google_review_ratings.csv', 'travel_review_ratings.data')
742742

@@ -1332,8 +1332,8 @@ def get_smartphone_human_activity():
13321332
def get_artificial_characters():
13331333

13341334
prepare_new_data_set_group_id()
1335-
#download_and_save('https://archive.ics.uci.edu/ml/machine-learning-databases/artificial-characters/character.tar.Z', 'artficial_characters.tar.Z')
1336-
#download_and_save('https://archive.ics.uci.edu/ml/machine-learning-databases/artificial-characters/character.names', 'artficial_characters.description')
1335+
#download_and_save('https://archive.ics.uci.edu/ml/machine-learning-databases/artificial-characters/character.tar.Z', 'artificial_characters.tar.Z')
1336+
#download_and_save('https://archive.ics.uci.edu/ml/machine-learning-databases/artificial-characters/character.names', 'artificial_characters.description')
13371337

13381338
print("Artificial Characters is currently not processed since:")
13391339
print(" - the data comes in a rather convoluted form")
@@ -1534,7 +1534,7 @@ def get_thyroids():
15341534
download_and_save('https://archive.ics.uci.edu/ml/machine-learning-databases/thyroid-disease/dis.test', 'thyroid_dis.test.data')
15351535
download_and_save('https://archive.ics.uci.edu/ml/machine-learning-databases/thyroid-disease/dis.names', 'thyroid_dis.description')
15361536

1537-
# new-thyroid.data only contains 215 samples and is thus ommitted
1537+
# new-thyroid.data only contains 215 samples and is thus omitted
15381538

15391539
download_and_save('http://archive.ics.uci.edu/ml/machine-learning-databases/thyroid-disease/hypothyroid.data', 'thyroid_hypo.data')
15401540
download_and_save('http://archive.ics.uci.edu/ml/machine-learning-databases/thyroid-disease/hypothyroid.names', 'thyroid_hypo.description')
@@ -2819,7 +2819,7 @@ def get_wave_energy():
28192819

28202820
# For each of the 4 data sets, the last column contains the sum of columns 32 to 47.
28212821
# I assume the last column is the label and columns 32 to 47 are intermediate results
2822-
# and that only the first 32 colums should be used as features.
2822+
# and that only the first 32 columns should be used as features.
28232823
indices = range(32, 48)
28242824

28252825
data_adelaide = load_raw_data('WECs_DataSet/Adelaide_Data.csv', sep=',')

pytabkit/bench/scheduling/jobs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ def __init__(self, job_id: int, time_s: float,
1717
"""
1818
:param job_id: Job id.
1919
:param time_s: Time in seconds that the job ran for.
20-
:param oom_cpu: Whether an out-of-memory error occured on the CPU.
21-
:param oom_gpu: Whether an out-of-memory error occured on the GPU.
20+
:param oom_cpu: Whether an out-of-memory error occurred on the CPU.
21+
:param oom_gpu: Whether an out-of-memory error occurred on the GPU.
2222
:param finished_normally: Whether the job ran normally,
2323
such that its time and RAM values are representative of how it would normally run.
2424
For example, if the job ran faster because the results were already partially precomputed,
25-
it should not count towards the time estimation. Of course, if an exception occured,
25+
it should not count towards the time estimation. Of course, if an exception occurred,
2626
we should have finished_normally=False.
2727
:param exception_msg: Exception message (if there was any).
2828
"""

pytabkit/models/alg_interfaces/catboost_interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def _fit(self, train_ds: DictDataset, val_ds: Optional[DictDataset], params: Dic
252252
# with these parameters, catboost will reload from the model automatically if it is there
253253
bst = catboost.CatBoost(params)
254254
with warnings.catch_warnings():
255-
warnings.filterwarnings('ignore', message='Can\'t optimze method "evaluate" because self argument is used')
255+
warnings.filterwarnings('ignore', message='Can\'t optimize method "evaluate" because self argument is used')
256256
bst.fit(self._convert_ds(train_ds), eval_set=None if val_ds is None else self._convert_ds(val_ds))
257257

258258
if val_ds is not None:

pytabkit/models/alg_interfaces/nn_interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def __init__(self, space: Optional[Union[str, Dict[str, Any]]] = None, n_hyperop
307307
}
308308
utils.update_dict(default_config, remove_keys=list(space.keys()))
309309
elif not isinstance(space, dict):
310-
print(f'Unkown hyperparameter space: {space}')
310+
print(f'Unknown hyperparameter space: {space}')
311311

312312
config = utils.update_dict(default_config, config)
313313
opt_class = SMACOptimizer if opt_method == 'smac' else HyperoptOptimizer

pytabkit/models/alg_interfaces/other_interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ def fit(self, X, y, X_val, y_val, cat_features: Optional[List[str]] = None):
10531053
'learning_rate_weights': 0.005, # learning rate for leaf weights
10541054
'learning_rate_index': 0.01, # learning rate for split indices
10551055
'learning_rate_values': 0.01, # learning rate for split values
1056-
'learning_rate_leaf': 0.01, # learning rate for leafs (logits)
1056+
'learning_rate_leaf': 0.01, # learning rate for leaves (logits)
10571057

10581058
'optimizer': 'adam', # optimizer
10591059
'cosine_decay_steps': 0, # decay steps for lr schedule (CosineDecayRestarts)

pytabkit/models/alg_interfaces/tabm_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def evaluate(part: str) -> float:
334334
}
335335
best_params = [p.clone() for p in model.parameters()]
336336
# Early stopping: the training stops when
337-
# there are more than `patience` consequtive bad updates.
337+
# there are more than `patience` consecutive bad updates.
338338
remaining_patience = patience
339339

340340
try:

pytabkit/models/alg_interfaces/xgboost_interfaces.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def _sample_params(self, is_classification: bool, seed: int, n_train: int):
498498
# 'max_bin' # also makes things slower
499499
}
500500
elif hpo_space_name == 'large-v3':
501-
# shrunk verion of large-v2: removed gamma, colsample_bytree
501+
# shrunk version of large-v2: removed gamma, colsample_bytree
502502
params = {
503503
'n_estimators': 1000,
504504
'early_stopping_rounds': 50,
@@ -513,7 +513,7 @@ def _sample_params(self, is_classification: bool, seed: int, n_train: int):
513513
'grow_policy': rng.choice(['depthwise', 'lossguide']),
514514
}
515515
elif hpo_space_name == 'large-v4':
516-
# modified verion of large-v3
516+
# modified version of large-v3
517517
params = {
518518
'n_estimators': 1000,
519519
'early_stopping_rounds': 50,
@@ -529,7 +529,7 @@ def _sample_params(self, is_classification: bool, seed: int, n_train: int):
529529
'max_leaves': round(np.exp(rng.uniform(np.log(2.0), np.log(2048.0)))) # added
530530
}
531531
elif hpo_space_name == 'large-v5':
532-
# shrunk verion of large-v3 but without the extra stuff from large-v4
532+
# shrunk version of large-v3 but without the extra stuff from large-v4
533533
params = {
534534
'n_estimators': 1000,
535535
'early_stopping_rounds': 50,
@@ -543,7 +543,7 @@ def _sample_params(self, is_classification: bool, seed: int, n_train: int):
543543
'reg_lambda': np.exp(rng.uniform(np.log(1e-3), np.log(20.0))), # modified
544544
}
545545
elif hpo_space_name == 'large-v6':
546-
# shrunk verion of large-v4
546+
# shrunk version of large-v4
547547
params = {
548548
'n_estimators': 1000,
549549
'early_stopping_rounds': 50,

0 commit comments

Comments
 (0)