Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cpp_sisso
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
cpp_sisso
Commits
20d629f3
Commit
20d629f3
authored
4 years ago
by
Thomas Purcell
Browse files
Options
Downloads
Patches
Plain Diff
Bug Fix: LossFunction _n_project set too late
fix that bug
parent
da41d67d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/loss_function/LossFunctionPearsonRMSE.cpp
+3
-2
3 additions, 2 deletions
src/loss_function/LossFunctionPearsonRMSE.cpp
with
3 additions
and
2 deletions
src/loss_function/LossFunctionPearsonRMSE.cpp
+
3
−
2
View file @
20d629f3
...
...
@@ -48,7 +48,7 @@ void LossFunctionPearsonRMSE::set_nfeat(int n_feat)
void
LossFunctionPearsonRMSE
::
reset_projection_prop
(
const
std
::
vector
<
std
::
vector
<
model_node_ptr
>>&
models
)
{
_n_project_prop
=
models
.
size
();
_projection_prop
.
resize
(
_n_samp
*
_n_project_prop
);
for
(
int
mm
=
0
;
mm
<
_n_project_prop
;
++
mm
)
{
...
...
@@ -57,7 +57,6 @@ void LossFunctionPearsonRMSE::reset_projection_prop(const std::vector<std::vecto
}
set_nfeat
(
models
.
back
().
size
()
+
1
);
_n_project_prop
=
models
.
size
();
prepare_project
();
}
...
...
@@ -116,6 +115,7 @@ double LossFunctionPearsonRMSE::project(const node_ptr& feat)
double
LossFunctionPearsonRMSE
::
calc_max_pearson
(
double
*
feat_val_ptr
)
{
std
::
cout
<<
"TEST IN"
<<
std
::
endl
;
int
start
=
0
;
for
(
int
tt
=
0
;
tt
<
_task_sizes_train
.
size
();
++
tt
)
{
...
...
@@ -145,6 +145,7 @@ double LossFunctionPearsonRMSE::calc_max_pearson(double* feat_val_ptr)
start
+=
_task_sizes_train
[
tt
];
}
std
::
cout
<<
"TEST OUT"
<<
std
::
endl
;
return
*
std
::
max_element
(
_scores
.
begin
(),
_scores
.
end
())
/
static_cast
<
double
>
(
-
1
*
_n_task
);
}
...
...
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