Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
64 additions
and
20 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
lib/src/model_selection/exception/empty_ratio_collection_exception.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class EmptyRatioCollectionException implements Exception { | ||
@override | ||
String toString() => 'Ratio collection must contain at least one element'; | ||
} |
4 changes: 4 additions & 0 deletions
4
lib/src/model_selection/exception/invalid_ratio_sum_exception.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class InvalidRatioSumException implements Exception { | ||
@override | ||
String toString() => 'Ratios sum is equal to or more than 1'; | ||
} |
10 changes: 10 additions & 0 deletions
10
lib/src/model_selection/exception/outranged_ratio_exception.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class OutRangedRatioException implements Exception { | ||
OutRangedRatioException(double ratio) | ||
: message = 'Ratio value must be within the range 0..1 (both exclusive), ' | ||
'$ratio given'; | ||
|
||
final String message; | ||
|
||
@override | ||
String toString() => message; | ||
} |
10 changes: 10 additions & 0 deletions
10
lib/src/model_selection/exception/too_small_ratio_exception.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class TooSmallRatioException implements Exception { | ||
TooSmallRatioException(double ratio, int dataSize) : | ||
message = 'Ratio is too small comparing to the input data size: ratio ' | ||
'$ratio, min ratio value ${(1 / dataSize).toStringAsFixed(2)}'; | ||
|
||
final String message; | ||
|
||
@override | ||
String toString() => message; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters