modAL
modAL copied to clipboard
AttributeError: 'DataFrame' object has no attribute 'reshape'
Hi, In this code I get the error. Where the X_pool shape is (1024, 8).
query_idx, query_instances = learner.query(X_pool, n_instances=5)
Please let me know what is wrong here.
I used the Ranked batch-model sampling.
I think it comes from the function select_cold_start_instance in which there is a reshape:
return best_coldstart_instance_index, X[best_coldstart_instance_index].reshape(1, -1)
try using X_pool.values ? otherwise, there should be a check in the function to check that the type of X and apply to reshape to X.values if X is a DataFrame.
I think the problem is that dataframe ojects are not supported, only numpy arrays or sparse matrices (X: Union[numpy.ndarray, scipy.sparse.csr.csr_matrix]).