-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new evaluate test for rpart as template for all models
- Loading branch information
Showing
1 changed file
with
71 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/// WEATHER dataset MODEL tab TREE feature RPART option EVALUATE tab. | ||
// | ||
// Time-stamp: <Saturday 2025-02-01 16:12:14 +1100 Graham Williams> | ||
// | ||
/// Copyright (C) 2025, Togaware Pty Ltd | ||
/// | ||
/// Licensed under the GNU General Public License, Version 3 (the "License"); | ||
/// | ||
/// License: https://www.gnu.org/licenses/gpl-3.0.en.html | ||
// | ||
// This program is free software: you can redistribute it and/or modify it under | ||
// the terms of the GNU General Public License as published by the Free Software | ||
// Foundation, either version 3 of the License, or (at your option) any later | ||
// version. | ||
// | ||
// This program is distributed in the hope that it will be useful, but WITHOUT | ||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
// details. | ||
// | ||
// You should have received a copy of the GNU General Public License along with | ||
// this program. If not, see <https://www.gnu.org/licenses/>. | ||
/// | ||
/// Authors: Graham Williams | ||
library; | ||
|
||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:integration_test/integration_test.dart'; | ||
|
||
import 'package:rattle/features/tree/panel.dart'; | ||
import 'package:rattle/main.dart' as app; | ||
|
||
import 'utils/delays.dart'; | ||
//import 'utils/goto_next_page.dart'; | ||
import 'utils/navigate_to_feature.dart'; | ||
import 'utils/navigate_to_tab.dart'; | ||
import 'utils/load_demo_dataset.dart'; | ||
import 'utils/tap_button.dart'; | ||
import 'utils/verify_page.dart'; | ||
import 'utils/verify_selectable_text.dart'; | ||
|
||
void main() { | ||
IntegrationTestWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
group('WEATHER MODEL TREE RPART EVALUATE:', () { | ||
testWidgets('build, evaluate, verify.', (WidgetTester tester) async { | ||
app.main(); | ||
await tester.pumpAndSettle(); | ||
await tester.pump(interact); | ||
await loadDemoDataset(tester, 'Weather'); | ||
await navigateToTab(tester, 'Model'); | ||
await navigateToFeature(tester, 'Tree', TreePanel); | ||
await tapButton(tester, 'Build Decision Tree'); | ||
await navigateToTab(tester, 'Evaluate'); | ||
await tapButton(tester, 'Evaluate'); | ||
//await gotoNextPage(tester); | ||
await verifyPage('Error Matrix'); | ||
await verifySelectableText( | ||
tester, | ||
[ | ||
'No 41 2 4.7', | ||
'Yes 7 4 63.6', | ||
'No 75.9 3.7 4.7', | ||
'Yes 13.0 7.4 63.6', | ||
'Overall Error = 16.67%; Average Error = 34.14%.', | ||
], | ||
); | ||
}); | ||
}); | ||
} |