From 7b46f81cfbb813638dc3d766878a6088fa47b17b Mon Sep 17 00:00:00 2001 From: Nevena Bojovic Date: Sun, 27 Mar 2022 22:34:12 +0200 Subject: Front razno. --- frontend/src/app/_data/Model.ts | 13 +++++++------ .../src/app/_pages/add-model/add-model.component.html | 16 ++++++++++------ frontend/src/app/_pages/add-model/add-model.component.ts | 7 +++++-- frontend/src/app/_pages/home/home.component.ts | 2 ++ frontend/src/app/_services/home.service.spec.ts | 16 ++++++++++++++++ frontend/src/app/_services/home.service.ts | 9 +++++++++ 6 files changed, 49 insertions(+), 14 deletions(-) create mode 100644 frontend/src/app/_services/home.service.spec.ts create mode 100644 frontend/src/app/_services/home.service.ts diff --git a/frontend/src/app/_data/Model.ts b/frontend/src/app/_data/Model.ts index f6e01d08..48418d51 100644 --- a/frontend/src/app/_data/Model.ts +++ b/frontend/src/app/_data/Model.ts @@ -15,7 +15,7 @@ export default class Model { public randomTestSetDistribution: number = 0.1, //0.1-0.9 (10% - 90%) JESTE OVDE ZAKUCANO 10, AL POSLATO JE KAO 0.1 BACK-U // Neural net training settings - public type: ANNType = ANNType.FullyConnected, + public type: ProblemType = ProblemType.Regression, public encoding: Encoding = Encoding.Label, public optimizer: Optimizer = Optimizer.Adam, public lossFunction: LossFunction = LossFunction.MeanSquaredError, @@ -23,8 +23,8 @@ export default class Model { public hiddenLayerNeurons: number = 1, public hiddenLayers: number = 1, public batchSize: number = 5, - public inputLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid, - public hiddenLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid, + public hiddenLayerActivationFunction = [], + //public inputLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid, public outputLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid, public username: string = '', public nullValues: NullValueOptions = NullValueOptions.DeleteRows, @@ -32,9 +32,10 @@ export default class Model { ) { } } -export enum ANNType { - FullyConnected = 'potpuno povezana', - Convolutional = 'konvoluciona' +export enum ProblemType { + Regression = 'regresioni', + BinaryClassification = 'binarni-klasifikacioni', + MultiClassification = 'multi-klasifikacioni' } // replaceMissing srednja vrednost mean, median, najcesca vrednost (mode) diff --git a/frontend/src/app/_pages/add-model/add-model.component.html b/frontend/src/app/_pages/add-model/add-model.component.html index b17093c3..9dde9afe 100644 --- a/frontend/src/app/_pages/add-model/add-model.component.html +++ b/frontend/src/app/_pages/add-model/add-model.component.html @@ -40,11 +40,11 @@ Dodajte novi dataset - +
    -
  • @@ -71,7 +71,7 @@
      + name="cbsNew" [checked] = "this.selectedOutputColumnVal != item" [disabled]="this.selectedOutputColumnVal == item">  @@ -159,11 +159,11 @@
    - +
    { + let service: HomeService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(HomeService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/frontend/src/app/_services/home.service.ts b/frontend/src/app/_services/home.service.ts new file mode 100644 index 00000000..0026413a --- /dev/null +++ b/frontend/src/app/_services/home.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +@Injectable({ + providedIn: 'root' +}) +export class HomeService { + + constructor() { } +} -- cgit v1.2.3