Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MeLOn - Machine Learning Models for Optimization
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AVT-SVT
public
MeLOn - Machine Learning Models for Optimization
Commits
bead165b
Commit
bead165b
authored
4 years ago
by
Artur Maria Schweidtmann
Browse files
Options
Downloads
Patches
Plain Diff
Release version 0.0.2
Hotfix: scaling functions in GP such that they also works for double
parent
064cbd92
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gaussian process/model/inc/gp.h
+5
-3
5 additions, 3 deletions
gaussian process/model/inc/gp.h
with
5 additions
and
3 deletions
gaussian process/model/inc/gp.h
+
5
−
3
View file @
bead165b
...
...
@@ -45,6 +45,7 @@ namespace melon {
std
::
unique_ptr
<
kernel
::
StationaryKernel
<
double
,
T
>>
_kernel
;
/*!< kernel object*/
std
::
unique_ptr
<
Scaler
<
T
>>
_inputScaler
;
/*!< Object for scaling input data*/
std
::
unique_ptr
<
Scaler
<
T
>>
_predictionScaler
;
/*!< Object for scaling output data*/
std
::
unique_ptr
<
Scaler
<
double
>>
_parameterScaler
;
/*!< Object for scaling double parameters*/
/*
* @brief Sets data object containing model parameters.
...
...
@@ -315,6 +316,7 @@ namespace melon {
_inputScaler
=
ScalerFactory
<
T
>::
create_scaler
(
_data
->
inputScalerData
);
_predictionScaler
=
ScalerFactory
<
T
>::
create_scaler
(
_data
->
predictionScalerData
);
_parameterScaler
=
ScalerFactory
<
double
>::
create_scaler
(
_data
->
predictionScalerData
);
// this scaler is used for double values only
}
...
...
@@ -380,8 +382,8 @@ namespace melon {
double
minimum_scaled
=
*
min_element
(
_data
->
Y
.
begin
(),
_data
->
Y
.
end
());
double
result
=
_p
rediction
Scaler
->
descale
({
minimum_scaled
}).
front
();
double
result
=
_p
arameter
Scaler
->
descale
({
minimum_scaled
}).
front
();
return
result
;
}
...
...
@@ -397,7 +399,7 @@ namespace melon {
double
maximum_scaled
=
*
max_element
(
_data
->
Y
.
begin
(),
_data
->
Y
.
end
());
double
result
=
_p
rediction
Scaler
->
descale
({
maximum_scaled
}).
front
();
double
result
=
_p
arameter
Scaler
->
descale
({
maximum_scaled
}).
front
();
return
result
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment