diff options
Diffstat (limited to 'frontend/src/app/experiment')
-rw-r--r-- | frontend/src/app/experiment/experiment.component.html | 6 | ||||
-rw-r--r-- | frontend/src/app/experiment/experiment.component.ts | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/frontend/src/app/experiment/experiment.component.html b/frontend/src/app/experiment/experiment.component.html index 62236cce..ffc1db9d 100644 --- a/frontend/src/app/experiment/experiment.component.html +++ b/frontend/src/app/experiment/experiment.component.html @@ -63,8 +63,10 @@ <h3 class="mt-5">Popunjavanje nedostajućih vrednosti:</h3> <div class="form-check" *ngIf="selectedDataset"> <input type="radio" [(ngModel)]="experiment.nullValues " [value]="NullValueOptions.DeleteRows " class="form-check-input" value="deleteRows" name="fillMissing " id="delRows" checked data-bs-toggle="collapse" data-bs-target="#fillMissingCustom.show"> - <label for="delRows" class="form-check-label ">Obriši sve - redove sa nedostajućim vrednostima ({{selectedDataset.nullRows}} od {{selectedDataset.rowCount}})</label><br> + <label *ngIf="selectedColumnsInfoArray.length == selectedDataset.columnInfo.length" for="delRows" class="form-check-label ">Obriši sve + redove sa nedostajućim vrednostima ({{selectedDataset.nullRows}} od {{selectedDataset.rowCount}})</label> + <label *ngIf="selectedColumnsInfoArray.length != selectedDataset.columnInfo.length" for="delRows" class="form-check-label ">Obriši sve + redove sa nedostajućim vrednostima</label><br> <input type="radio" [(ngModel)]="experiment.nullValues " [value]="NullValueOptions.DeleteColumns " class="form-check-input" value="deleteCols" name="fillMissing " id="delCols" data-bs-toggle="collapse" data-bs-target="#fillMissingCustom.show"> <label for="delCols" class="form-check-label ">Obriši sve kolone sa nedostajućim vrednostima ({{countSelectedNullCols()}} od {{selectedDataset.columnInfo.length}})</label><br> diff --git a/frontend/src/app/experiment/experiment.component.ts b/frontend/src/app/experiment/experiment.component.ts index 2d0f6ec5..7e2f0b29 100644 --- a/frontend/src/app/experiment/experiment.component.ts +++ b/frontend/src/app/experiment/experiment.component.ts @@ -6,6 +6,9 @@ import { ModelsService } from '../_services/models.service'; import Shared from '../Shared'; import { ExperimentsService } from '../_services/experiments.service'; import { ColumnEncoding } from '../_data/Experiment'; +import { Router } from '@angular/router'; +import { TrainingComponent } from '../training/training.component'; +import { retryWhen } from 'rxjs'; @Component({ selector: 'app-experiment', @@ -30,7 +33,7 @@ export class ExperimentComponent implements OnInit { tempTestSetDistribution = 90; - constructor(private modelsService: ModelsService, private experimentsService: ExperimentsService) { + constructor(private experimentsService: ExperimentsService, private router: Router) { } ngOnInit(): void { @@ -43,7 +46,6 @@ export class ExperimentComponent implements OnInit { this.experiment.outputColumn = this.selectedDataset.columnInfo[this.selectedDataset.columnInfo.length - 1].columnName; this.resetColumnEncodings(); - console.log(this.experiment.encodings); } resetColumnEncodings() { @@ -166,7 +168,7 @@ export class ExperimentComponent implements OnInit { } saveExperiment() { - if (this.selectedDataset == undefined) { + if (this.selectedDataset == undefined) { Shared.openDialog("Greška", "Izvor podataka nije izabran!"); return; } @@ -192,7 +194,7 @@ export class ExperimentComponent implements OnInit { this.experiment.randomTestSetDistribution = 1 - Math.round(this.tempTestSetDistribution / 100 * 10) / 10; - console.log("Eksperiment:", this.experiment); + //console.log("Eksperiment:", this.experiment); this.experimentsService.addExperiment(this.experiment).subscribe((response) => { this.experiment = response; @@ -202,6 +204,8 @@ export class ExperimentComponent implements OnInit { this.experiment.encodings = []; Shared.openDialog("Obaveštenje", "Eksperiment je uspešno kreiran."); + + this.router.navigate(['/training', this.experiment._id]); }, (error) => { if (error.error == "Experiment with this name exists") { Shared.openDialog("Greška", "Eksperiment sa unetim nazivom već postoji u Vašoj kolekciji. Unesite neki drugi naziv."); |