Skip to content

Commit

Permalink
revert accidental changes to decomp models
Browse files Browse the repository at this point in the history
  • Loading branch information
rbroc committed Mar 20, 2024
1 parent 46944fa commit 5f8a999
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions turftopic/models/decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def __init__(
] = "sentence-transformers/all-MiniLM-L6-v2",
vectorizer: Optional[CountVectorizer] = None,
objective: Literal["orthogonality", "independence"] = "independence",
subset: str = None
):
self.n_components = n_components
self.encoder = encoder
Expand All @@ -64,7 +63,6 @@ def __init__(
self.decomposition = FastICA(n_components)
else:
self.decomposition = PCA(n_components)
self.subset = subset

def fit_transform(
self, raw_documents, y=None, embeddings: Optional[np.ndarray] = None
Expand All @@ -90,12 +88,6 @@ def fit_transform(
console.log("Model fitting done.")
return doc_topic

def abs_components(self, subset):
if subset == 'abs':
self.components_ = np.abs(self.components_)
if subset == 'neg':
self.components_ = -self.components_

def transform(
self, raw_documents, embeddings: Optional[np.ndarray] = None
) -> np.ndarray:
Expand Down

0 comments on commit 5f8a999

Please sign in to comment.