aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_data/Model.ts
blob: 216e1c364a5d089d178e4a7bf6234b6edee98d20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
export default class Model {
    constructor(
        public name: string = 'Novi model',
        public description: string = '',
        public dateCreated: Date = new Date(),
        public datasetId?: number,

        //Test set settings
        public inputColumns: number[] = [0],
        public columnToPredict: number = 1,
        public randomTestSet: boolean = true,
        public randomTestSetDistribution: number = 0.10, //0.1-0.9 (10% - 90%)

        // Neural net training settings
        public type: ANNType = ANNType.FullyConnected,
        public encoding: Encoding = Encoding.Label,
        public optimizer: Optimizer = Optimizer.Adam,
        public lossFunction: LossFunction = LossFunction.MeanSquaredError,
        public inputNeurons: number = 1,
        public hiddenLayerNeurons: number = 1,
        public hiddenLayers: number = 1,
        public batchSize: number = 5,
        public inputLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid,
        public hiddenLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid,
        public outputLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid
    ) { }
}

export enum ANNType {
    FullyConnected = 'potpuno povezana',
    Convolutional = 'konvoluciona'
}

export enum Encoding {
    Label = 'label',
    OneHot = 'one hot'
}

export enum ActivationFunction {
    Relu = 'relu',
    Sigmoid = 'sigmoid',
    Tanh = 'tanh',
    Linear = 'linear'
}

export enum LossFunction {
    BinaryCrossEntropy = 'binary_crossentropy',
    MeanSquaredError = 'mean_squared_error'
}

export enum Optimizer {
    Adam = 'adam'
}