-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
148 changed files
with
2,053 additions
and
1,014 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
language: dart | ||
dart: | ||
- "2.4.1" | ||
- "2.7.2" | ||
script: pub run grinder start | ||
after_success: pub run grinder finish |
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,14 @@ | ||
targets: | ||
$default: | ||
builders: | ||
json_serializable: | ||
options: | ||
any_map: false | ||
checked: true | ||
create_to_json: true | ||
disallow_unrecognized_keys: true | ||
explicit_to_json: false | ||
field_rename: none | ||
ignore_unannotated: false | ||
include_if_null: true | ||
nullable: true |
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
15 changes: 15 additions & 0 deletions
15
...lassifier/decision_tree_classifier/_helper/create_decision_tree_classifier_from_json.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,15 @@ | ||
import 'dart:convert'; | ||
|
||
import 'package:ml_algo/src/classifier/decision_tree_classifier/decision_tree_classifier.dart'; | ||
import 'package:ml_algo/src/classifier/decision_tree_classifier/decision_tree_classifier_impl.dart'; | ||
|
||
DecisionTreeClassifier createDecisionTreeClassifierFromJson(String json) { | ||
if (json.isEmpty) { | ||
throw Exception('Provided JSON object is empty, please provide a proper ' | ||
'JSON object'); | ||
} | ||
|
||
final decodedJson = jsonDecode(json) as Map<String, dynamic>; | ||
|
||
return DecisionTreeClassifierImpl.fromJson(decodedJson); | ||
} |
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
4 changes: 2 additions & 2 deletions
4
lib/src/classifier/decision_tree_classifier/decision_tree_classifier_factory.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
11 changes: 7 additions & 4 deletions
11
lib/src/classifier/decision_tree_classifier/decision_tree_classifier_factory_impl.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 |
---|---|---|
@@ -1,18 +1,21 @@ | ||
import 'package:ml_algo/src/classifier/decision_tree_classifier/decision_tree_classifier.dart'; | ||
import 'package:ml_algo/src/classifier/decision_tree_classifier/decision_tree_classifier_factory.dart'; | ||
import 'package:ml_algo/src/classifier/decision_tree_classifier/decision_tree_classifier_impl.dart'; | ||
import 'package:ml_algo/src/tree_solver/tree_solver.dart'; | ||
import 'package:ml_algo/src/tree_trainer/tree_node/tree_node.dart'; | ||
import 'package:ml_linalg/dtype.dart'; | ||
|
||
class DecisionTreeClassifierFactoryImpl implements | ||
DecisionTreeClassifierFactory { | ||
|
||
const DecisionTreeClassifierFactoryImpl(); | ||
|
||
@override | ||
DecisionTreeClassifier create( | ||
TreeSolver solver, | ||
TreeNode root, | ||
String targetName, | ||
DType dtype, | ||
) => DecisionTreeClassifierImpl(solver, targetName, dtype); | ||
) => DecisionTreeClassifierImpl( | ||
root, | ||
targetName, | ||
dtype, | ||
); | ||
} |
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
33 changes: 33 additions & 0 deletions
33
lib/src/classifier/decision_tree_classifier/decision_tree_classifier_impl.g.dart
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
lib/src/classifier/decision_tree_classifier/decision_tree_json_keys.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,3 @@ | ||
const dTypeJsonKey = 'DT'; | ||
const targetColumnNameJsonKey = 'T'; | ||
const treeRootNodeJsonKey = 'R'; |
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
Oops, something went wrong.