aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_data/Experiment.ts
blob: c140e10010742e640b5559aeac9d2f50c792b523 (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
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
import { FolderFile } from "./FolderFile";
import { ProblemType } from "./Model";
export default class Experiment extends FolderFile {
    uploaderId: string = '';
    constructor(
        name: string = 'Novi eksperiment',
        public description: string = '',
        public type: ProblemType = ProblemType.Regression,
        public datasetId: string = '',
        public inputColumns: string[] = [],
        public outputColumn: string = '',
        public nullValues: NullValueOptions = NullValueOptions.DeleteRows,
        public nullValuesReplacers: NullValReplacer[] = [],
        dateCreated: Date = new Date(),
        lastUpdated: Date = new Date(),
        public modelIds: string[] = [],
        public columnTypes: ColumnType[] = [],
        public encodings: ColumnEncoding[] = []//[{columnName: "", columnEncoding: Encoding.Label}]
    ) {
        super(name, dateCreated, lastUpdated)
    }

    _columnsSelected: boolean = false;
}

export enum NullValueOptions {
    DeleteRows = 'delete_rows',
    DeleteColumns = 'delete_columns',
    Replace = 'replace'
}

export enum ReplaceWith {
    None = 'Popuni...',
    Mean = 'Srednja vrednost',
    Median = 'Medijana',
    Min = 'Minimum',
    Max = 'Maksimum'
}

export class NullValReplacer {
    "column": string;
    "option": NullValueOptions;
    "value": string;
}

export enum Encoding {
    Label = 'label',
    OneHot = 'onehot',
    /*Ordinal = 'ordinal',
    Hashing = 'hashing',
    Binary = 'binary',
    BaseN = 'baseN'
    
    BackwardDifference = 'backward difference',
    CatBoost = 'cat boost',
    Count = 'count',
    GLMM = 'glmm',
    Target = 'target',
    Helmert = 'helmert',
    JamesStein = 'james stein',
    LeaveOneOut = 'leave one out',
    MEstimate = 'MEstimate',
    Sum = 'sum',
    Polynomial = 'polynomial',
    WOE = 'woe',
    Quantile = 'quantile'
    */
}

export class ColumnEncoding {
    constructor(
        public columnName: string,
        public encoding: Encoding
    ) { }
}

export enum ColumnType {
    categorical = "categorical",
    numerical = "numerical"
}