decision_tree

Creator: coderz1093

Last updated:

0 purchases

decision_tree Image
decision_tree Images

Languages

Categories

Add to Cart

Description:

decision tree

pure dart decision tree #
Installation #
Add the following to your pubspec.yaml:
dependencies:
decision_tree: ^... # use the latest version on pub
copied to clipboard
Usage #
fit(List<Map<String, num>> data, List
import 'package:decision_tree/decision_tree.dart';

final data = [
{'high': 1.6, 'temp': 37.4},
{'high': 1.7, 'temp': 37.5},
{'high': 1.75, 'temp': 36.5},
{'high': 1.8, 'temp': 36.6},
];
final target = ['m', 'm', 'f', 'f'];

final tree = DecisionTree(randomState: 42);
tree.fit(data, target);
print(tree.predict([
{'high': 1.65, 'temp': 37.45},
{'high': 1.9, 'temp': 36.55},
])); // ['m', 'f']
copied to clipboard

Features and bugs #
Welcome to contribute to this project.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.