Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bolsonaro
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Luc Giffon
bolsonaro
Merge requests
!23
Resolve "integration-sota"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "integration-sota"
15-integration-sota
into
master
Overview
0
Commits
23
Pipelines
0
Changes
1
Merged
Charly Lamothe
requested to merge
15-integration-sota
into
master
5 years ago
Overview
0
Commits
23
Pipelines
0
Changes
1
Expand
Closes
#15 (closed)
0
0
Merge request reports
Viewing commit
d6d303ec
Prev
Next
Show latest version
1 file
+
1
−
12
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
d6d303ec
delete useless main
· d6d303ec
Luc Giffon
authored
5 years ago
code/bolsonaro/models/kmeans_forest_regressor.py
+
1
−
12
Options
@@ -121,15 +121,4 @@ class KMeansForestClassifier(KmeansForest, metaclass=ABCMeta):
def
_get_best_tree_index
(
self
,
y_preds
,
y_true
):
score
=
self
.
_score_metric
(
y_preds
,
y_true
)
best_tree_index
=
np
.
argmax
(
score
)
# get best scoring tree (the one with lowest mse)
return
best_tree_index
if
__name__
==
"
__main__
"
:
from
sklearn
import
datasets
from
bolsonaro.models.model_parameters
import
ModelParameters
X
,
y
=
datasets
.
fetch_california_housing
(
return_X_y
=
True
)
ModelParameters
(
extracted_forest_size
=
100
,
normalize_D
=
True
,
)
k_reg
=
KMeansForestRegressor
()
\ No newline at end of file
return
best_tree_index
\ No newline at end of file
Loading