From 513f965ac3fa9d2b965bad277a3d07939c662f29 Mon Sep 17 00:00:00 2001 From: Advaith Rao Date: Tue, 5 Dec 2023 23:38:07 -0500 Subject: [PATCH] Small code fix for rf differential privacy --- ethics/differential_privacy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethics/differential_privacy.py b/ethics/differential_privacy.py index f336c3a..19bf8cc 100644 --- a/ethics/differential_privacy.py +++ b/ethics/differential_privacy.py @@ -50,13 +50,13 @@ def __init__( self.criterion = criterion self.njobs = njobs + self.vectorizer = Word2VecEmbedder() + self.model = Pipeline([ ('vectorizer', self.vectorizer), ('classifier', RandomForestClassifier(n_estimators=self.n_estimators, criterion=self.criterion, n_jobs=self.njobs)) ]) - self.vectorizer = Word2VecEmbedder() - def train( self, body: pd.Series | list[str],