diff options
Diffstat (limited to 'frontend/src/app/_data')
-rw-r--r-- | frontend/src/app/_data/Dataset.ts | 18 | ||||
-rw-r--r-- | frontend/src/app/_data/Experiment.ts | 34 | ||||
-rw-r--r-- | frontend/src/app/_data/Model.ts | 46 | ||||
-rw-r--r-- | frontend/src/app/_data/Notification.ts | 8 |
4 files changed, 77 insertions, 29 deletions
diff --git a/frontend/src/app/_data/Dataset.ts b/frontend/src/app/_data/Dataset.ts index c5b56957..dd751947 100644 --- a/frontend/src/app/_data/Dataset.ts +++ b/frontend/src/app/_data/Dataset.ts @@ -12,6 +12,22 @@ export default class Dataset { public lastUpdated: Date = new Date(), public username: string = '', public delimiter: string = '', - public hasHeader: boolean = true + public hasHeader: boolean = true, + + public columnInfo: ColumnInfo[] = [], + public preview: string[][] = [[]] + ) { } +} + +export class ColumnInfo { + constructor( + public name: string = '', + public isNumber: boolean = false, + public numNull: number = 0, + public uniqueValues?: string[], + public median?: number, + public mean?: number, + public min?: number, + public max?: number ) { } }
\ No newline at end of file diff --git a/frontend/src/app/_data/Experiment.ts b/frontend/src/app/_data/Experiment.ts new file mode 100644 index 00000000..10320ab6 --- /dev/null +++ b/frontend/src/app/_data/Experiment.ts @@ -0,0 +1,34 @@ +export default class Experiment { + _id: string = ''; + constructor( + public name: string = 'Novi experiment', + public description: string = '', + public datasetId: string = '', + public inputColumns: string[] = [], + public columnToPredict: string = '', + public nullValues: NullValueOptions = NullValueOptions.DeleteRows, + public nullValuesReplacers: NullValReplacer[] = [], + public dateCreated: Date = new Date(), + public lastUpdated: Date = new Date() + ) { } +} + +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; +}
\ No newline at end of file diff --git a/frontend/src/app/_data/Model.ts b/frontend/src/app/_data/Model.ts index d9ba7885..9ea437b1 100644 --- a/frontend/src/app/_data/Model.ts +++ b/frontend/src/app/_data/Model.ts @@ -7,11 +7,9 @@ export default class Model { public description: string = '', public dateCreated: Date = new Date(), public lastUpdated: Date = new Date(), - public datasetId: string = '', + public experimentId: string = '', // Test set settings - public inputColumns: string[] = [], - public columnToPredict: string = '', public randomOrder: boolean = true, 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 @@ -26,11 +24,8 @@ export default class Model { public hiddenLayers: number = 1, public batchSize: number = 5, public hiddenLayerActivationFunctions: string[] = ['sigmoid'], - //public inputLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid, public outputLayerActivationFunction: ActivationFunction = ActivationFunction.Sigmoid, public username: string = '', - public nullValues: NullValueOptions = NullValueOptions.DeleteRows, - public nullValuesReplacers: NullValReplacer[] = [], public metrics: string[] = [], // TODO add to add-model form public epochs: number = 5 // TODO add to add-model form ) { } @@ -85,7 +80,6 @@ export enum ActivationFunction { Linear = 'linear', //Sigmoid='sigmoid', Softmax = 'softmax', - } /* export enum ActivationFunctionHiddenLayer @@ -117,7 +111,6 @@ export enum LossFunction { MeanSquaredError = 'mean_squared_error', MeanSquaredLogarithmicError = 'mean_squared_logarithmic_error', HuberLoss = 'Huber' - } export enum LossFunctionRegression { MeanAbsoluteError = 'mean_absolute_error', @@ -168,31 +161,28 @@ export enum Metrics { MSE = 'mse', MAE = 'mae', RMSE = 'rmse' - + } -export enum MetricsRegression -{ +export enum MetricsRegression { Mse = 'mse', Mae = 'mae', Mape = 'mape', - Msle='msle', - CosineProximity='cosine' + Msle = 'msle', + CosineProximity = 'cosine' } -export enum MetricsBinaryClassification -{ - Accuracy='binary_accuracy', - Auc="AUC", - Precision='precision_score', - Recall='recall_score', - F1='f1_score', - +export enum MetricsBinaryClassification { + Accuracy = 'binary_accuracy', + Auc = "AUC", + Precision = 'precision_score', + Recall = 'recall_score', + F1 = 'f1_score', + } -export enum MetricsMultiClassification -{ - Accuracy='categorical_accuracy', - Auc="AUC", - Precision='precision_score', - Recall='recall_score', - F1='f1_score', +export enum MetricsMultiClassification { + Accuracy = 'categorical_accuracy', + Auc = "AUC", + Precision = 'precision_score', + Recall = 'recall_score', + F1 = 'f1_score', } diff --git a/frontend/src/app/_data/Notification.ts b/frontend/src/app/_data/Notification.ts new file mode 100644 index 00000000..181bb332 --- /dev/null +++ b/frontend/src/app/_data/Notification.ts @@ -0,0 +1,8 @@ +export default class Notification { + _id: string = ''; + constructor( + public title: string = 'Treniranje u toku...', + public id: string = '042', + public progress: number = 0.5 + ) { } +}
\ No newline at end of file |