From 1509314a97c1a122a50173382e976307f5ec9d40 Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Mon, 18 Apr 2022 00:21:57 +0200 Subject: Dodat tip problema u eksperiment --- frontend/src/app/_data/Experiment.ts | 4 ++- .../_elements/model-load/model-load.component.html | 16 ++-------- .../_elements/model-load/model-load.component.ts | 4 ++- .../src/app/experiment/experiment.component.html | 34 +++++++++++++++++----- .../src/app/experiment/experiment.component.ts | 4 +-- frontend/src/app/training/training.component.html | 2 +- 6 files changed, 38 insertions(+), 26 deletions(-) (limited to 'frontend') diff --git a/frontend/src/app/_data/Experiment.ts b/frontend/src/app/_data/Experiment.ts index 23fd77d4..d2b6eea5 100644 --- a/frontend/src/app/_data/Experiment.ts +++ b/frontend/src/app/_data/Experiment.ts @@ -1,3 +1,4 @@ +import { ProblemType } from "./Model"; export default class Experiment { _id: string = ''; uploaderId: string = ''; @@ -18,7 +19,8 @@ export default class Experiment { public randomTestSet: boolean = true, public randomTestSetDistribution: number = 0.1, //0.1-0.9 (10% - 90%) JESTE OVDE ZAKUCANO 10, AL POSLATO JE KAO 0.1 BACK-U - public encodings: ColumnEncoding[] = []//[{columnName: "", columnEncoding: Encoding.Label}] + public encodings: ColumnEncoding[] = [],//[{columnName: "", columnEncoding: Encoding.Label}] + public type:ProblemType = ProblemType.Regression ) { } } diff --git a/frontend/src/app/_elements/model-load/model-load.component.html b/frontend/src/app/_elements/model-load/model-load.component.html index 85caca0d..dcb35c21 100644 --- a/frontend/src/app/_elements/model-load/model-load.component.html +++ b/frontend/src/app/_elements/model-load/model-load.component.html @@ -17,7 +17,7 @@
    -
  • @@ -124,19 +124,7 @@ {{newModel.batchSize}} - +
diff --git a/frontend/src/app/_elements/model-load/model-load.component.ts b/frontend/src/app/_elements/model-load/model-load.component.ts index aa0797bd..9bd81f95 100644 --- a/frontend/src/app/_elements/model-load/model-load.component.ts +++ b/frontend/src/app/_elements/model-load/model-load.component.ts @@ -1,5 +1,6 @@ -import { Component, OnInit, ViewChild, Output, EventEmitter } from '@angular/core'; +import { Component, OnInit, ViewChild, Output, EventEmitter, Input } from '@angular/core'; import Shared from 'src/app/Shared'; +import Experiment from 'src/app/_data/Experiment'; import Model, { ActivationFunction, LossFunction, LossFunctionBinaryClassification, LossFunctionMultiClassification, LossFunctionRegression, Metrics, MetricsBinaryClassification, MetricsMultiClassification, MetricsRegression, NullValueOptions, Optimizer, ProblemType } from 'src/app/_data/Model'; import { ModelsService } from 'src/app/_services/models.service'; import { GraphComponent } from '../graph/graph.component'; @@ -13,6 +14,7 @@ import { GraphComponent } from '../graph/graph.component'; export class ModelLoadComponent implements OnInit { @ViewChild(GraphComponent) graph!: GraphComponent; + @Input() forExperiment?:Experiment; @Output() selectedModelChangeEvent = new EventEmitter(); newModel: Model = new Model(); diff --git a/frontend/src/app/experiment/experiment.component.html b/frontend/src/app/experiment/experiment.component.html index 5b3b2c43..35124b98 100644 --- a/frontend/src/app/experiment/experiment.component.html +++ b/frontend/src/app/experiment/experiment.component.html @@ -214,13 +214,33 @@ - -
- -
-
-
-
diff --git a/frontend/src/app/experiment/experiment.component.ts b/frontend/src/app/experiment/experiment.component.ts index 036db326..71679243 100644 --- a/frontend/src/app/experiment/experiment.component.ts +++ b/frontend/src/app/experiment/experiment.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import Experiment, { NullValReplacer, NullValueOptions, ReplaceWith, Encoding } from '../_data/Experiment'; -import Model from '../_data/Model'; +import Model,{ProblemType} from '../_data/Model'; import Dataset, { ColumnInfo } from '../_data/Dataset'; import { ModelsService } from '../_services/models.service'; import Shared from '../Shared'; @@ -24,7 +24,7 @@ export class ExperimentComponent implements OnInit { Encoding = Encoding; ColumnEncoding = ColumnEncoding; Object = Object; - + ProblemType=ProblemType; selectedColumnsInfoArray: ColumnInfo[] = []; selectedNotNullColumnsArray: string[] = []; diff --git a/frontend/src/app/training/training.component.html b/frontend/src/app/training/training.component.html index 0ce4cc89..672e75fb 100644 --- a/frontend/src/app/training/training.component.html +++ b/frontend/src/app/training/training.component.html @@ -23,7 +23,7 @@

2. Izaberite model

- +

3. Treniranje modela

-- cgit v1.2.3