Skip to content

Commit

Permalink
Fix target encoding Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianstando committed Mar 23, 2023
1 parent edb79d6 commit fe75f3e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.1.1] - 2023-01-26

### Fixed

- Target encoding class Exception

## [1.0.1] - 2023-01-26

### The first release of the package

This is the first official release of the package.

It allows to perform all required computations for comparing and benchmarking balancing methods.


## [1.0.0] - 2023-01-26

### The first release of the package
Expand Down
2 changes: 1 addition & 1 deletion edgaro/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def fit(self, y: pd.Series) -> _TargetEncode:
names[ind]: 0
}
return self
elif (ind == 1 and counts[0] < counts[1]) or (ind == 0 and counts[1] < counts[0]):
elif (ind == 1 and counts[0] > counts[1]) or (ind == 0 and counts[1] > counts[0]):
raise Exception('Wrong majority class label!')

if counts[0] < counts[1]:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="edgaro",
version="1.0.1",
version="1.0.1.1",
description="Explainable imbalanceD learninG compARatOr",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit fe75f3e

Please sign in to comment.