Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scarliles/honesty #69

Draft
wants to merge 72 commits into
base: submodulev3
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
8c09f7f
init split condition injection
SamuelCarliles3 Feb 16, 2024
ecfc9b1
wip
SamuelCarliles3 Feb 16, 2024
0c3d5c0
wip
SamuelCarliles3 Feb 16, 2024
5fd12a2
wip
SamuelCarliles3 Feb 20, 2024
b593ee0
injection progress
SamuelCarliles3 Feb 27, 2024
180fac3
injection progress
SamuelCarliles3 Feb 27, 2024
c207c3e
split injection refactoring
SamuelCarliles3 Feb 27, 2024
7cc71c1
added condition parameter passthrough prototype
SamuelCarliles3 Feb 29, 2024
2470d49
some tidying
SamuelCarliles3 Feb 29, 2024
ee3399f
more tidying
SamuelCarliles3 Feb 29, 2024
a079e4f
splitter injection refactoring
SamuelCarliles3 Mar 10, 2024
5397b66
cython injection due diligence, converted min_sample and monotonic_cs…
SamuelCarliles3 Mar 15, 2024
44f1d57
tree tests pass huzzah!
SamuelCarliles3 Mar 18, 2024
4f19d53
added some splitconditions to header
SamuelCarliles3 Mar 18, 2024
cb71be0
commented out some sample code that was substantially increasing peak…
SamuelCarliles3 Mar 21, 2024
e34be5c
added vector resize
SamuelCarliles3 Apr 9, 2024
aac802e
wip
SamuelCarliles3 Apr 10, 2024
c12f2fd
Merge branch 'submodulev3' into scarliles/splitter-injection-redux
SamuelCarliles3 Apr 15, 2024
a7f5e92
settling injection memory management for now
SamuelCarliles3 Apr 15, 2024
7a70a0b
added regression forest benchmark
SamuelCarliles3 Apr 22, 2024
d9ad68a
Merge pull request #2 from ssec-jhu/scarliles/regression-benchmark
SamuelCarliles3 Apr 22, 2024
893d588
ran black for linting check
SamuelCarliles3 Apr 23, 2024
548493c
Merge branch 'submodulev3' of github.com:ssec-jhu/scikit-learn into s…
SamuelCarliles3 Apr 23, 2024
e4b53ff
Merge branch 'submodulev3' into scarliles/regression-benchmark
SamuelCarliles3 Apr 23, 2024
089d901
Merge branch 'neurodata:submodulev3' into submodulev3
SamuelCarliles3 Apr 24, 2024
3ba5f74
Merge branch 'submodulev3' of github.com:ssec-jhu/scikit-learn into s…
SamuelCarliles3 Apr 24, 2024
cf285c1
Merge branch 'scarliles/splitter-injection-redux' into scarliles/regr…
SamuelCarliles3 Apr 24, 2024
ffc6328
Merge pull request #3 from ssec-jhu/scarliles/regression-benchmark
SamuelCarliles3 Apr 24, 2024
87c90fd
initial pass at refactoring DepthFirstTreeBuilder.build
SamuelCarliles3 May 23, 2024
51da586
some renaming to make closure pattern more obvious
SamuelCarliles3 May 28, 2024
6c117a2
added SplitRecordFactory
SamuelCarliles3 May 28, 2024
c7b675b
Merge branch 'scarliles/update-node-refactor2' into scarliles/update-…
SamuelCarliles3 May 28, 2024
9e7b131
SplitRecordFactory progress
SamuelCarliles3 May 28, 2024
a017669
build loop refactor
SamuelCarliles3 May 29, 2024
4325b0a
add_or_update tweak
SamuelCarliles3 May 29, 2024
78c3a1b
reverted to back out build body refactor
SamuelCarliles3 May 30, 2024
b8cc636
refactor baby step
SamuelCarliles3 May 30, 2024
f225658
update node refactor more baby steps
SamuelCarliles3 May 30, 2024
bc17634
wip
SamuelCarliles3 Jun 14, 2024
c949182
added EventBroker class
SamuelCarliles3 Jun 16, 2024
247c4fc
added initial event firing to node_split_best
SamuelCarliles3 Jun 17, 2024
71da148
removed some old commented out code
SamuelCarliles3 Jun 17, 2024
a1fa950
honesty wip
SamuelCarliles3 Jun 30, 2024
ff0dfed
honesty wip
SamuelCarliles3 Jun 30, 2024
db4c947
honesty wip
SamuelCarliles3 Jul 1, 2024
2e87134
honesty wip
SamuelCarliles3 Jul 1, 2024
03c95d9
honesty wip
SamuelCarliles3 Jul 1, 2024
69fc530
honesty wip
SamuelCarliles3 Jul 3, 2024
61dfd0f
honesty wip
SamuelCarliles3 Jul 5, 2024
29a52be
Merge remote-tracking branch 'neurodata/submodulev3' into submodulev3
SamuelCarliles3 Jul 5, 2024
cf52ff5
broke sort functions, partitioners out of _splitter.pyx
SamuelCarliles3 Jul 5, 2024
8e433a6
refactored partitioner
SamuelCarliles3 Jul 6, 2024
09a8ec5
fixed some unintended commented out lines in SparsePartitioner
SamuelCarliles3 Jul 6, 2024
6bb7a33
Merge branch 'scarliles/defuse-partitioner' into scarliles/honesty
SamuelCarliles3 Jul 8, 2024
a2030a8
importing _honest_tree from treeple
SamuelCarliles3 Jul 10, 2024
64688e5
honesty wip
SamuelCarliles3 Jul 18, 2024
febf5e9
honesty wip
SamuelCarliles3 Jul 22, 2024
5e7d07d
honesty wip
SamuelCarliles3 Jul 31, 2024
2c4e992
honesty wip
SamuelCarliles3 Aug 1, 2024
2346e4d
honesty wip
SamuelCarliles3 Aug 4, 2024
551fcf1
honesty wip
SamuelCarliles3 Aug 4, 2024
f1fb747
honesty wip
SamuelCarliles3 Aug 4, 2024
2f2d15a
honest partition testing wip
SamuelCarliles3 Aug 9, 2024
cd79492
honest leaf validity test working
SamuelCarliles3 Aug 10, 2024
53cf65c
honest prediction wip
SamuelCarliles3 Aug 22, 2024
a9e065b
honest prediction wip
SamuelCarliles3 Aug 24, 2024
80c391d
honest prediction passing tests
SamuelCarliles3 Aug 24, 2024
9b5651e
hacked in working honest predict_proba, progress on honest regression
SamuelCarliles3 Aug 30, 2024
cbb23ee
first draft honest forest passing tests
SamuelCarliles3 Sep 3, 2024
c565d65
honesty wip
SamuelCarliles3 Sep 5, 2024
2316e4c
treeple-compatibility tweaks
SamuelCarliles3 Sep 8, 2024
71cacf3
might testing wip
SamuelCarliles3 Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion asv_benchmarks/benchmarks/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,58 @@
GradientBoostingClassifier,
HistGradientBoostingClassifier,
RandomForestClassifier,
RandomForestRegressor,
)

from .common import Benchmark, Estimator, Predictor
from .datasets import (
_20newsgroups_highdim_dataset,
_20newsgroups_lowdim_dataset,
_synth_classification_dataset,
_synth_regression_dataset,
_synth_regression_sparse_dataset,
)
from .utils import make_gen_classif_scorers
from .utils import make_gen_classif_scorers, make_gen_reg_scorers


class RandomForestRegressorBenchmark(Predictor, Estimator, Benchmark):
"""
Benchmarks for RandomForestRegressor.
"""

param_names = ["representation", "n_jobs"]
params = (["dense", "sparse"], Benchmark.n_jobs_vals)

def setup_cache(self):
super().setup_cache()

def make_data(self, params):
representation, n_jobs = params

if representation == "sparse":
data = _synth_regression_sparse_dataset()
else:
data = _synth_regression_dataset()

return data

def make_estimator(self, params):
representation, n_jobs = params

n_estimators = 500 if Benchmark.data_size == "large" else 100

estimator = RandomForestRegressor(
n_estimators=n_estimators,
min_samples_split=10,
max_features="log2",
n_jobs=n_jobs,
random_state=0,
)

return estimator

def make_scorers(self):
make_gen_reg_scorers(self)


class RandomForestClassifierBenchmark(Predictor, Estimator, Benchmark):
Expand Down
2 changes: 2 additions & 0 deletions sklearn/ensemble/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from ._forest import (
ExtraTreesClassifier,
ExtraTreesRegressor,
HonestRandomForestClassifier,
RandomForestClassifier,
RandomForestRegressor,
RandomTreesEmbedding,
Expand All @@ -21,6 +22,7 @@

__all__ = [
"BaseEnsemble",
"HonestRandomForestClassifier",
"RandomForestClassifier",
"RandomForestRegressor",
"RandomTreesEmbedding",
Expand Down
Loading