Skip to content

Update forest.py#15

Open
Dhruv127 wants to merge 2 commits intoObliviousAI:masterfrom
Dhruv127:patch-1
Open

Update forest.py#15
Dhruv127 wants to merge 2 commits intoObliviousAI:masterfrom
Dhruv127:patch-1

Conversation

@Dhruv127
Copy link
Contributor

No description provided.

Copy link
Contributor

@jkfitzsimons jkfitzsimons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check out the comments. This PR does not implement a DP RandomForrestRegressor. Hopefully the comments clarify why but if you get really stuck let me know and I can help guide you! 👍

self.bounds = bounds
self.random_state = random_state

def _dp_mean(self, array):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to never be called....

return private_mean

def fit(self, X, y):
super().fit(X, y) # Fit the RandomForestRegressor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you are fitting with the parent RandomForrestRegressor which means no differential privacy will be applied during the training (ie the main point). Please go back an look at how they created the RandomForrestClassifier via custom trees. Their trees randomly partition the domain (not using the gini or entropy coefficient like in the vanilla RandomForrestRegressor). Then once the random trees are created you can use your _dp_mean method on the leaves.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check now

@Dhruv127
Copy link
Contributor Author

@jkfitzsimons please check now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants