You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the module Constraints provide the ability to have unlabeled points as input (labeled -1), the method chunks removes unlabeled points in the returned chunks array, which thus has different dimension than the dataset X passed as input to the fit method of RCA_Supervised.
I think the most natural and simple solution is to keep the unlabeled points in chunks with value -1, which is already interpreted by RCA as "not belonging to any chunk".
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/aurelien/Documents/research/github/metric-learn/metric_learn/rca.py", line 244, in fit
return RCA.fit(self, X, chunks)
File "/home/aurelien/Documents/research/github/metric-learn/metric_learn/rca.py", line 132, in fit
X, chunks = self._prepare_inputs(X, chunks, ensure_min_samples=2)
File "/home/aurelien/Documents/research/github/metric-learn/metric_learn/base_metric.py", line 101, in _prepare_inputs
**kwargs)
File "/home/aurelien/Documents/research/github/metric-learn/metric_learn/_util.py", line 131, in check_input
y_numeric=y_numeric)
File "/home/aurelien/anaconda3/lib/python3.7/site-packages/sklearn/utils/validation.py", line 729, in check_X_y
check_consistent_length(X, y)
File "/home/aurelien/anaconda3/lib/python3.7/site-packages/sklearn/utils/validation.py", line 205, in check_consistent_length
" samples: %r" % [int(l) for l in lengths])
ValueError: Found input variables with inconsistent numbers of samples: [5, 4]
Versions
The text was updated successfully, but these errors were encountered:
* chunks return a map of index to chunk
* maj
* maj
* remove storing of known labels
* typo
* no self.num_points
* tests for unlabeled, repairs chunk generation
* maj
* testing diff features
* corrected test
* diff warning
* maj
* added parameter bound test
Description
While the module
Constraints
provide the ability to have unlabeled points as input (labeled-1
), the methodchunks
removes unlabeled points in the returnedchunks
array, which thus has different dimension than the datasetX
passed as input to thefit
method ofRCA_Supervised
.I think the most natural and simple solution is to keep the unlabeled points in
chunks
with value-1
, which is already interpreted byRCA
as "not belonging to any chunk".Steps/Code to Reproduce
Expected Results
Fit without error
Actual Results
Versions
The text was updated successfully, but these errors were encountered: