Skip to content

Commit 0825a90

Browse files
committed
fix trailing whitespace and end of files using pre-commit
1 parent 01327c2 commit 0825a90

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Version 0.1.2 of **LinearBoost Classifier** is released. Here are the changes:
2727
- Both SEFR and LinearBoostClassifier classes are refactored to fully adhere to Scikit-learn's conventions and API. Now, they are standard Scikit-learn estimators that can be used in Scikit-learn pipelines, grid search, etc.
2828
- Added unit tests (using pytest) to ensure the estimators adhere to Scikit-learn conventions.
2929
- Added fit_intercept parameter to SEFR similar to other linear estimators in Scikit-learn (e.g., LogisticRegression, LinearRegression, etc.).
30-
- Removed random_state parameter from LinearBoostClassifier as it doesn't affect the result, since SEFR doesn't expose a random_state argument. According to Scikit-learn documentation for this parameter in AdaBoostClassifier:
30+
- Removed random_state parameter from LinearBoostClassifier as it doesn't affect the result, since SEFR doesn't expose a random_state argument. According to Scikit-learn documentation for this parameter in AdaBoostClassifier:
3131
> it is only used when estimator exposes a random_state.
3232
- Added docstring to both SEFR and LinearBoostClassifier classes.
3333
- Used uv for project and package management.
@@ -45,20 +45,20 @@ The documentation is available at https://linearboost.readthedocs.io/.
4545

4646
The following parameters yielded optimal results during testing. All results are based on 10-fold Cross-Validation:
4747

48-
- **`n_estimators`**:
48+
- **`n_estimators`**:
4949
A range of 10 to 200 is suggested, with higher values potentially improving performance at the cost of longer training times.
5050

51-
- **`learning_rate`**:
51+
- **`learning_rate`**:
5252
Values between 0.01 and 1 typically perform well. Adjust based on the dataset's complexity and noise.
5353

54-
- **`algorithm`**:
54+
- **`algorithm`**:
5555
Use either `SAMME` or `SAMME.R`. The choice depends on the specific problem:
5656
- `SAMME`: May be better for datasets with clearer separations between classes.
5757
- `SAMME.R`: Can handle more nuanced class probabilities.
5858

5959
**Note:** As of scikit-learn v1.6, the `algorithm` parameter is deprecated and will be removed in v1.8. LinearBoostClassifier will only implement the 'SAMME' algorithm in newer versions.
6060

61-
- **`scaler`**:
61+
- **`scaler`**:
6262
The following scaling methods are recommended based on dataset characteristics:
6363
- `minmax`: Best for datasets where features are on different scales but bounded.
6464
- `robust`: Effective for datasets with outliers.
@@ -200,10 +200,10 @@ params = {
200200
LinearBoost's combination of **runtime efficiency** and **high accuracy** makes it a powerful choice for real-world machine learning tasks, particularly in resource-constrained or real-time applications.
201201

202202
### 📰 Featured in:
203-
- [LightGBM Alternatives: A Comprehensive Comparison](https://nightwatcherai.com/blog/lightgbm-alternatives)
204-
_by Jordan Cole, March 11, 2025_
203+
- [LightGBM Alternatives: A Comprehensive Comparison](https://nightwatcherai.com/blog/lightgbm-alternatives)
204+
_by Jordan Cole, March 11, 2025_
205205
*Discusses how LinearBoost outperforms traditional boosting frameworks in terms of speed while maintaining accuracy.*
206-
206+
207207

208208
Future Developments
209209
-----------------------------
@@ -224,7 +224,7 @@ This project is licensed under the terms of the MIT license. See [LICENSE](https
224224

225225
Some portions of this code are adapted from the scikit-learn project
226226
(https://scikit-learn.org), which is licensed under the BSD 3-Clause License.
227-
See the `licenses/` folder for details. The modifications and additions made to the original code are licensed under the MIT License © 2025 Hamidreza Keshavarz, Reza Rawassizadeh.
227+
See the `licenses/` folder for details. The modifications and additions made to the original code are licensed under the MIT License © 2025 Hamidreza Keshavarz, Reza Rawassizadeh.
228228
The original code from scikit-learn is available at [scikit-learn GitHub repository](https://github.com/scikit-learn/scikit-learn)
229229

230230
Special Thanks to:

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ It's better to discuss privately and try to find a solution first, to limit the
1616

1717
---
1818

19-
Thanks for your help!
19+
Thanks for your help!

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
scikit-learn>=1.2.2
2-
typing-extensions>=4.1.0; python_version < "3.11"
2+
typing-extensions>=4.1.0; python_version < "3.11"

src/linearboost/linear_boost.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class LinearBoostClassifier(AdaBoostClassifier):
6767
"""A LinearBoost classifier.
6868
6969
A LinearBoost classifier is a meta-estimator based on AdaBoost and SEFR.
70-
It is a fast and accurate classification algorithm built to enhance the
70+
It is a fast and accurate classification algorithm built to enhance the
7171
performance of the linear classifier SEFR.
7272
7373
Parameters
@@ -107,7 +107,7 @@ class LinearBoostClassifier(AdaBoostClassifier):
107107
class_weight : {"balanced", "balanced_subsample"}, dict or list of dicts, \
108108
default=None
109109
Weights associated with classes in the form ``{class_label: weight}``.
110-
If not given, all classes are supposed to have weight one.
110+
If not given, all classes are supposed to have weight one.
111111
112112
The "balanced" mode uses the values of y to automatically adjust
113113
weights inversely proportional to class frequencies in the input data
@@ -122,9 +122,9 @@ class LinearBoostClassifier(AdaBoostClassifier):
122122
123123
loss_function : callable, default=None
124124
Custom loss function for optimization. Must follow the signature:
125-
125+
126126
``loss_function(y_true, y_pred, sample_weight) -> float``
127-
127+
128128
where:
129129
- y_true: Ground truth (correct) target values.
130130
- y_pred: Estimated target values.
@@ -160,7 +160,7 @@ class LinearBoostClassifier(AdaBoostClassifier):
160160
estimator_errors_ : ndarray of floats
161161
Classification error for each estimator in the boosted
162162
ensemble.
163-
163+
164164
n_features_in_ : int
165165
Number of features seen during :term:`fit`.
166166

0 commit comments

Comments
 (0)