Skip to content

Commit

Permalink
Merge pull request #135 from BCG-Gamma/hotfix/correct_readme_code
Browse files Browse the repository at this point in the history
Correct facet api arguments in README & notebook
  • Loading branch information
sithankanna authored Oct 29, 2020
2 parents b367f1e + 5e2bdf3 commit a3a2bf5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Enhanced machine learning workflow
)
# create FACET sample object
boston_obs = Sample(observations=df, target="MEDIAN_HOUSE_PRICE")
boston_obs = Sample(observations=df, target_name="MEDIAN_HOUSE_PRICE")
# create pipeline for random forest regressor
rforest_reg = RegressorPipelineDF(regressor=RandomForestRegressorDF(random_state=42))
Expand Down Expand Up @@ -201,13 +201,13 @@ Model Simulation
).fit(sample=boston_obs)
SIM_FEAT = "LSTAT"
simulator = UnivariateUpliftSimulator(crossfit=ranker.best_model_crossfit_, n_jobs=3)
simulator = UnivariateUpliftSimulator(crossfit=boot_crossfit, n_jobs=3)
# split the simulation range into equal sized partitions
partitioner = ContinuousRangePartitioner()
# run the simulation
simulation = simulator.simulate_feature(name=SIM_FEAT, partitioner=partitioner)
simulation = simulator.simulate_feature(feature_name=SIM_FEAT, partitioner=partitioner)
# visualise results
SimulationDrawer().draw(data=simulation, title=SIM_FEAT)
Expand Down
Binary file modified _static/simulation_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sphinx/auxiliary/Boston_getting_started_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
"partitioner = ContinuousRangePartitioner()\n",
"\n",
"# run the simulation\n",
"simulation = simulator.simulate_feature(name=SIM_FEAT, partitioner=partitioner)\n",
"simulation = simulator.simulate_feature(feature_name=SIM_FEAT, partitioner=partitioner)\n",
"\n",
"# visualise results\n",
"SimulationDrawer().draw(data=simulation, title=SIM_FEAT)"
Expand Down
Binary file modified sphinx/source/_static/simulation_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a3a2bf5

Please sign in to comment.