diff options
author | Nevena Bojovic <nenabojov@gmail.com> | 2022-05-10 23:19:30 +0200 |
---|---|---|
committer | Nevena Bojovic <nenabojov@gmail.com> | 2022-05-10 23:19:30 +0200 |
commit | 620288faaae5cbdd70c50bd07672ede1fdf2394e (patch) | |
tree | 58c789f65bae6750fec004abd6002e5d6ac1c845 /frontend/src/app/_data | |
parent | c02a7f0793a7b290029ec81859cdea5724a3f7dc (diff) | |
parent | 1690c70e86e5f79fa5708ea12ed034bf605cf259 (diff) |
Merge branch 'redesign' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into redesign
Diffstat (limited to 'frontend/src/app/_data')
-rw-r--r-- | frontend/src/app/_data/Model.ts | 21 | ||||
-rw-r--r-- | frontend/src/app/_data/Predictor.ts | 2 |
2 files changed, 6 insertions, 17 deletions
diff --git a/frontend/src/app/_data/Model.ts b/frontend/src/app/_data/Model.ts index 526a8290..d1e89e84 100644 --- a/frontend/src/app/_data/Model.ts +++ b/frontend/src/app/_data/Model.ts @@ -13,7 +13,7 @@ export default class Model extends FolderFile { // Neural net training settings public type: ProblemType = ProblemType.Regression, public optimizer: Optimizer = Optimizer.Adam, - public lossFunction: LossFunction = LossFunction.MeanSquaredError, + public lossFunction: LossFunction = LossFunctionRegression[0], public inputNeurons: number = 1, public hiddenLayers: number = 1, public batchSize: BatchSize = BatchSize.O3, @@ -132,21 +132,10 @@ export enum LossFunction { MeanSquaredLogarithmicError = 'mean_squared_logarithmic_error', HuberLoss = 'Huber' } -export enum LossFunctionRegression { - MeanAbsoluteError = 'mean_absolute_error', - MeanSquaredError = 'mean_squared_error', - MeanSquaredLogarithmicError = 'mean_squared_logarithmic_error', -} -export enum LossFunctionBinaryClassification { - BinaryCrossEntropy = 'binary_crossentropy', - SquaredHingeLoss = 'squared_hinge_loss', - HingeLoss = 'hinge_loss', -} -export enum LossFunctionMultiClassification { - CategoricalCrossEntropy = 'categorical_crossentropy', - SparseCategoricalCrossEntropy = 'sparse_categorical_crossentropy', - KLDivergence = 'kullback_leibler_divergence', -} +export const LossFunctionRegression =[LossFunction.MeanAbsoluteError,LossFunction.MeanSquaredError,LossFunction.MeanSquaredLogarithmicError] +export const LossFunctionBinaryClassification=[LossFunction.BinaryCrossEntropy,LossFunction.SquaredHingeLoss,LossFunction.HingeLoss] + +export const LossFunctionMultiClassification=[LossFunction.CategoricalCrossEntropy,LossFunction.SparseCategoricalCrossEntropy,LossFunction.KLDivergence] export enum Optimizer { Adam = 'Adam', diff --git a/frontend/src/app/_data/Predictor.ts b/frontend/src/app/_data/Predictor.ts index c5cb2218..e15ae8f9 100644 --- a/frontend/src/app/_data/Predictor.ts +++ b/frontend/src/app/_data/Predictor.ts @@ -9,7 +9,7 @@ export default class Predictor { public accessibleByLink: boolean = false, public dateCreated: Date = new Date(), public uploaderId: string = '', - public finalMetrics: Metric[] = [] + //public finalMetrics: Metric[] = [] ) { } } |