Skip to content

Commit

Permalink
Add new evaluate test for rpart as template for all models
Browse files Browse the repository at this point in the history
  • Loading branch information
gjwgit committed Feb 1, 2025
1 parent 0638cf6 commit 7079132
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions integration_test/weather_evaluate_rpart.dart
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%.',
],
);
});
});
}

0 comments on commit 7079132

Please sign in to comment.