Issue with FA.score "'FA' object has no attribute 'n_domains_'"
AttributeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_13888/463825728.py in
~\anaconda3\lib\site-packages\adapt\base.py in score(self, X, y, sample_weight, domain) 713 ] 714 if "domain" in args: --> 715 X = self.transform(X, domain=domain) 716 else: 717 X = self.transform(X)
~\anaconda3\lib\site-packages\adapt\feature_based_fa.py in transform(self, X, domain) 224 X = check_array(X, allow_nd=True) 225 if domain in ["tgt", "target"]: --> 226 X_emb = np.concatenate((np.zeros((len(X), X.shape[-1]*self.n_domains_)), 227 X, 228 X),
AttributeError: 'FA' object has no attribute 'n_domains_'
It seems that you forgot to use fit in line 13, it should be:
model_FE = FA(estimator=Ridge()).fit(X_src, y_src, X_tgt_train, y_tgt_train)