CLI documentation
module containing the state dataclass and the singleton in charge of supporting window transitions in the CLI.
PPStateData
dataclass
data class used for state conservation.
Source code in CLI/ProcessProphet.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
ProcessProphet
this class is intended for window management.
this class works as a singleton. the other ProcessProphet classes (such as ProcessProphetStart)
will be always provided with the same instance of this class and will basically determine
the content of self.current_window
.
there can only be one instance of this class, as there is only one terminal to draw in. therefore this class is a singleton.
Source code in CLI/ProcessProphet.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
remove_current_window()
Removes the current window.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
object
|
The new window. |
required |
Source code in CLI/ProcessProphet.py
102 103 104 105 106 107 108 109 |
|
set_current_window(window)
Sets the current window.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
object
|
The new window. |
required |
Source code in CLI/ProcessProphet.py
94 95 96 97 98 99 100 101 |
|
switch_window(new_window)
In charge of switching windows.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
new_window |
object
|
The new window. |
required |
Source code in CLI/ProcessProphet.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
|
SingletonMeta
Bases: type
singleton metaclass taken from https://refactoring.guru/design-patterns/singleton/python/examples
Source code in CLI/ProcessProphet.py
47 48 49 50 51 52 53 54 55 56 57 |
|
This process is in charge of project creation/selection, user mode selection and then action selection (training, preprocessing, prediction generation, ...)
ProcessProphetStart
This class defines the windows for the initial part of the program, i.e.:
- project creation
- project selection
- user mode selection
It also sets the pp.state
path variables once a project has been created/selected.
Source code in CLI/ProcessProphetStart.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
|
__init__(pp, start=True)
Initialize ProcessProphet Object and main menu.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pp |
ProcessProphet
|
The ProcessProphet instance in charge of window management. |
required |
start |
bool
|
If set to True, we start at the very beginning, i.e., project selection/creation. Otherwise, we go straight into the manager selection. Defaults to True. |
True
|
Source code in CLI/ProcessProphetStart.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
handle_project_name_input()
Exception if a new project is created with a name that is already used for another project in the projects directory. The user can return to the previous menu to create a new project with a different name.
If there is a valid input for the new project (unique name), then all of the necessary subdirectories are created where the files needed for the different functionalities of the application are stored. For example, a subdirectory for the input log on which the RNN can then be trained. The user can then continue and select the mode in which they want to work in the new project.
At the same time, the state is updated (see ProcessProphetState
).
We use the following file structure
projects/
: Contains all projects.projects/dummy_project/
: Contains all important subfolders fordummy_project
.projects/dummy_project/input_logs
: All input logs used fordummy_project
should be stored in this folder.projects/dummy_project/models
: All models used fordummy_project
are generated in this folder.projects/dummy_project/petri_nets
: All petri nets used fordummy_project
are stored here.projects/dummy_project/predictive_logs
: All generated predictive logs used fordummy_project
and conformance checking are stored here.projects/dummy_project/partial_traces
: All input partial traces given by the user are searched inside this folder.projects/dummy_project/multiple_predictions_path
: All predictions created using the multiple predictions function are stored here (for thedummy_project
project).
Source code in CLI/ProcessProphetStart.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
|
handle_project_selection()
checks if the selected project exists and updates the pp.state
with the directories that are needed for the different functionalities of the application
e.g. "partial_traces" directory in order to make predictions
The user is notified in the current window if the project is successfully selected and can then pursue further actions like selecting the mode of the application
If the user enters a wrong file name the current window displays the error and the user can go back to the previous menu
Source code in CLI/ProcessProphetStart.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
|
handle_select_mode(mode)
indicates the previously selected mode the current project will be running in selected mode can be confirmed or changed if it was a missinput -> window either changes to previous menu or next menu to select further actions
Source code in CLI/ProcessProphetStart.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
|
launch_conformance()
launches the Conformance checking CLI interface the constructor calls the window change
Source code in CLI/ProcessProphetStart.py
70 71 72 73 74 75 |
|
launch_predictor()
launches the Predictor CLI interface the constructor calls the window change
Source code in CLI/ProcessProphetStart.py
64 65 66 67 68 69 |
|
launch_preprocessor()
launches the Preprocessing CLI interface. the constructor calls the window change
Source code in CLI/ProcessProphetStart.py
50 51 52 53 54 55 |
|
launch_trainer()
launches the Training CLI interface the constructor calls the window change
Source code in CLI/ProcessProphetStart.py
57 58 59 60 61 62 |
|
load_existing_project()
user can load an existing project by entering the name of the existing project if intended the user can return to the main menu or quit the application
Source code in CLI/ProcessProphetStart.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
|
main_menu()
creates main menu for selecting a project to work on
Source code in CLI/ProcessProphetStart.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
|
new_project_form()
user can create a new project and input a name for it if intended the user can return to the main menu or quit the application
Source code in CLI/ProcessProphetStart.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
|
notify_project_creation(message, success)
function used to indicate that the new project name is valid as a result the window is switched to the menu for selecting the mode the currrent project is going to run in
Source code in CLI/ProcessProphetStart.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
select_manager()
after selecting the project and user mode, the user picks one of the managers in ProcessProphet (preprocessing, training, prediction generation and conformance checking)
Source code in CLI/ProcessProphetStart.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
select_mode()
menu to select whether the application should be run in quick or advanced mode.
Source code in CLI/ProcessProphetStart.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
|
This modules gives access to some preprocessing functions.
ProcessProphetPreprocessing
Source code in CLI/ProcessProphetPreprocessing.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
|
__init__(pp)
Initializes a ProcessProphetPreprocessing object and sets up the preprocessing main menu.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pp |
ProcessProphet
|
The ProcessProphet instance in charge of window management. |
required |
Source code in CLI/ProcessProphetPreprocessing.py
20 21 22 23 24 25 26 27 28 |
|
add_unique_start_end()
Indicates all the parameters needed to add unique start and end activities to each trace.
The user can modify these parameters in the left side of the window.
The function also displays the first few Log file names in the current project on the right side of the window.
Side effects
- Initializes a window with default parameters where the user can adjust them.
- Initializes a window where all the event logs of the current project are listed for preprocessing.
- Calls the
add_unique_start_end
function if the user confirms the indicated parameters.
Source code in CLI/ProcessProphetPreprocessing.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
|
check_types(func)
staticmethod
Decorator that checks if the file is an accepted file type (xes/csv) and if the file exists in the project directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
func |
The function that |
required |
Returns:
Type | Description |
---|---|
The decorated function. |
Side effects
If the file type or existence restrictions are not followed, a new window with the corresponding error is indicated.
Source code in CLI/ProcessProphetPreprocessing.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
handle_add_unique_start_end()
first decorator is used to ensure the file can be preprocessed
sends a request to the server with all the needed parameters to do add unique start end end activities to each trace and in case of a successful computation of the request by the server the path where the preprocessed log is stored in will be indicated in a new window
if the request fails because e.g. it exceeds the timeout of TIMEOUT the error is displayed in a new window and the user can go back to the window where the parameters are displayed
Source code in CLI/ProcessProphetPreprocessing.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
|
handle_remove_duplicates()
first decorator is used to ensure the file can be preprocessed
sends a request to the server with all the needed parameters to do remove duplicate rows from the log and in case of a successful computation of the request by the server the path where the preprocessed log is stored in will be indicated in a new window
if the request fails because e.g. it exceeds the timeout of TIMEOUT the error is displayed in a new window and the user can go back to the window where the parameters are displayed
Source code in CLI/ProcessProphetPreprocessing.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
handle_replace_nan_with_mode()
first decorator is used to ensure the file can be preprocessed
sends a request to the server with all the needed parameters to do replace all NaN values in the log and in case of a successful computation of the request by the server the path where the preprocessed log is stored in will be indicated in a new window
if the request fails because e.g. it exceeds the timeout of TIMEOUT the error is displayed in a new window and the user can go back to the window where the parameters are displayed
Source code in CLI/ProcessProphetPreprocessing.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|
loading(message='')
function to indicate a message in a new window e.g. to show that a process is loading
Source code in CLI/ProcessProphetPreprocessing.py
74 75 76 77 78 79 80 81 82 83 84 85 |
|
preprocessing_main_menu()
Displays the main menu for the preprocessing manager.
The user can choose one of the three alternatives
- Replacing NaN values in the log.
- Removing duplicate rows in the log.
- Adding unique start and end activities to each trace.
It is also possible to return to the previous menu.
Source code in CLI/ProcessProphetPreprocessing.py
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
|
remove_duplicates()
This function indicates all the parameters that are needed to remove duplicate rows and the user can modify them in the left side of the window.
The function also indicates the first few Log file names in the current project on the right side of the window.
Side effects
- Initializes a window with default parameters where the user can adjust them.
- Initializes a window where all the event logs of the current project are listed that can be used for the preprocessing.
- Calls the
remove_duplicates
function if the user confirms the indicated parameters.
Source code in CLI/ProcessProphetPreprocessing.py
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
|
replace_nan_with_mode()
This function indicates all the parameters that are needed to replace NaN values and the user can modify them in the left side of the window.
The function also indicates the first few Log file names in the current project on the right side of the window.
Side effects
- Initializes a window with default parameters where the user can adjust them.
- Initializes a window where all the event logs of the current project are listed that can be used for the preprocessing.
- Calls the
replace_nan_with_mode
function if the user confirms the indicated parameters.
Source code in CLI/ProcessProphetPreprocessing.py
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
|
This module supports training of the RMTPP model.
ProcessProphetTrain
This class provides three basic functions:
- train RNN by setting params manually
- train RNN using grid search
- train RNN using random search
Each one of these options generates a .pt
file containing the PyTorch model and a
.config.json
file containing the RNN training configuration, encoders, and other data
relevant to Process Prophet.
Source code in CLI/ProcessProphetTrain.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 |
|
__init__(pp)
other state parameters that make sense in the context of training might also be saved here
Source code in CLI/ProcessProphetTrain.py
32 33 34 35 36 37 38 39 |
|
loading(message='')
a loading screen
Source code in CLI/ProcessProphetTrain.py
42 43 44 45 46 47 48 49 50 51 52 |
|
return_to_menu()
returns to p.p. start. Start is set to False, since we dont want to select the project again. this makes sense for example, when the user wants to make predictions after having trained the RNN.
Source code in CLI/ProcessProphetTrain.py
55 56 57 58 59 60 |
|
set_grid_search_params()
Used to set the parameters for grid search training alternative.
This function distinguishes between quick mode and advanced mode by giving more options to customize the hyperparameters in the advanced mode, whereas in the base mode only the most important parameters can be modified by the user.
Side effects
- Initializes window with default parameters where the user can adjust them.
- Initializes window where all the event logs of the current project are listed that can be used for the training.
- Grid search can be called if the user confirms the indicated parameters.
Source code in CLI/ProcessProphetTrain.py
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
|
set_random_search_params()
Used to set the parameters for random search training alternative.
This function distinguishes between quick mode and advanced mode by giving more options to customize the hyperparameters in the advanced mode, whereas in the base mode only the most important parameters can be modified by the user.
Side effects
- Initializes window with default parameters where the user can adjust them.
- Initializes window where all the event logs of the current project are listed that can be used for the training.
- Random search can be called if the user confirms the indicated parameters.
Source code in CLI/ProcessProphetTrain.py
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
|
set_training_params()
Sets the training parameters for the model.
This method allows the user to either start the training with the displayed default parameters or adapt the parameters according to their own preference.
Side Effects
- The modified parameters are stored in a container and then the training function is called.
- Parameters are displayed in the window.
- A second window is displayed to show the logs contained in this project as a visual aid.
Source code in CLI/ProcessProphetTrain.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
start_grid_search()
sends a request to the server with all the needed parameters to carry out grid search training and in case of a successful computation of the request by the server the accuracy of the trained model is displayed in a new window. It is then possible to return to the action (manager selection) or training menu.
if the request fails because e.g. it exceeds the timeout of TIMEOUT the error is displayed in a new window and the user can go back to the window where the parameters are displayed
Source code in CLI/ProcessProphetTrain.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
|
start_random_search()
sends a request to the server with all the needed parameters to do a random search training and in case of a successful computation of the request by the server the accuracy of the trained model is displayed in a new window. It is then possible to return to the action or training menu
if the request fails because e.g. it exceeds the timeout of TIMEOUT the error is displayed in a new window and the user can go back to the window where the parameters are displayed
Source code in CLI/ProcessProphetTrain.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
|
start_training()
Carries out a training request.
Side effects on success
model
: A model.pt
file is saved in the models folder.config
: A model'sconfig.json
information for the server is saved in the models folder as a JSON file.
The training statistics (time error, accuracy, recall, f1 score) are displayed on the screen.
If the training is unsuccessful, the error returned by the server is displayed on the CLI.
Source code in CLI/ProcessProphetTrain.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
trainer_main_menu()
this function displays the main menuy for the trainer manager.
depending on the mode the current project is running in, the user can choose a training alternative and will be redirected to a new window where the parameters for the chosen alternative are displayed.
it is also possible to return to the previous menu.
Source code in CLI/ProcessProphetTrain.py
634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 |
|
This modules allows prediction generation.
ProcessProphetPredict
Source code in CLI/ProcessProphetPredict.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
|
__init__(pp)
Initializes a ProcessProphetPredict instance and prediction main menu.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pp |
ProcessProphet
|
The ProcessProphet instance in charge of window management. |
required |
Source code in CLI/ProcessProphetPredict.py
17 18 19 20 21 22 23 24 25 |
|
get_multiple_prediction()
Carries out a multiple prediction request.
Side effects
- Markers and timestamps of the multiple prediction are displayed in a separate file.
Source code in CLI/ProcessProphetPredict.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
|
get_single_prediction()
carries out a single prediction request.
Side effects
- marker, timestamp and the probability of the single prediction are displayed
Source code in CLI/ProcessProphetPredict.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
loading(message='')
a loading screen
Source code in CLI/ProcessProphetPredict.py
45 46 47 48 49 50 51 52 53 54 55 |
|
prediction_main_menu()
menu that returns the window of the selected prediction
Source code in CLI/ProcessProphetPredict.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|
return_to_menu()
returns to p.p. start
Source code in CLI/ProcessProphetPredict.py
235 236 237 238 239 |
|
set_multiple_prediction_params()
function to display the default values for a multiple prediction and grants the user access to modify the given parameters for multiple predictions which are then stored in the container and also displayed in the current window
user can also start the prediction with the continue button or return to the previous menu with the back button
Source code in CLI/ProcessProphetPredict.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
|
set_single_prediction_params()
user can modify the given parameters for a single prediction which are then stored in the container and also displayed in the current window
user can also start the prediction with the continue button or return to the previous menu with the back button
Source code in CLI/ProcessProphetPredict.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
This modules allows conformance checking, predictive log generation and process mining.
ProcessProphetModel
Source code in CLI/ProcessProphetModel.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
|
__init__(pp)
Initialize ProcessProphet instance and model main menu.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pp |
ProcessProphet
|
The ProcessProphet instance in charge of window management. |
required |
Other state parameters that make sense in the context of conformance checking might also be saved here.
Source code in CLI/ProcessProphetModel.py
20 21 22 23 24 25 26 27 28 29 30 |
|
get_conformance_checking()
Sends a conformance checking request to the server with the previously confirmed parameters.
Side effects
- The fitness that the conformance checking algorithm computed is displayed and the user can return to previous menus.
- If unsuccessful, an error is indicated and the user can return to the model menu.
Source code in CLI/ProcessProphetModel.py
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
|
get_predictive_log()
Sends a request to create a predictive log to the server with the previously confirmed parameters.
Side effects
- The predictive log that the RNN computed is stored in the predictive_logs directory of the current project, and the user can return to previous menus.
- If unsuccessful, an error is indicated and the user can return to the model menu.
Source code in CLI/ProcessProphetModel.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
|
get_process_mining()
Sends a process mining request to the server with the previously confirmed parameters.
Side effects
- The petri net that the mining algorithm computed is stored in the models directory of the current project, and the user can return to previous menus.
- If unsuccessful, an error is indicated and the user can return to the model menu.
Source code in CLI/ProcessProphetModel.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
|
loading(message='')
a loading screen
Source code in CLI/ProcessProphetModel.py
39 40 41 42 43 44 45 46 47 48 49 |
|
model_main_menu()
menu to select one of the process mining, conformance checking, creation of a predictive log or go back to the previous menu
Source code in CLI/ProcessProphetModel.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
return_to_menu()
returns to p.p. start
Source code in CLI/ProcessProphetModel.py
33 34 35 36 37 |
|
set_conformance_checking()
User can either start the conformance checking with the displayed default parameters or alternatively adapt the parameters to their own preference (e.g. select different conformance checking algorithm).
Modes are not differentiated for this option.
Side effects
- The modified parameters are stored in a container and then the conformance checking function is called.
- Parameters are displayed in the window.
Source code in CLI/ProcessProphetModel.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 |
|
set_predictive_log()
User can either start generating a predictive log with the displayed default parameters or alternatively adapt the parameters to their own preference.
Side effects
- The modified parameters are stored in a container and then the function for creating a predictive log is called.
- Parameters are displayed in the window.
Source code in CLI/ProcessProphetModel.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
|
set_process_mining()
User can either start the mining with the displayed default parameters or alternatively adapt the parameters to their own preference (e.g. select different mining algorithm).
Modes are not differentiated under this option.
Side effects
- The modified parameters are stored in a container and then the mining function is called.
- Parameters are displayed in the window.
Source code in CLI/ProcessProphetModel.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
|