Re: [Scikit-learn-general] Random patches and coordinates

2013-04-21 Thread Nicolas Trésegnie
I think you are right. Moreover, a transformer already exists here . I see two solutions: * The transform() method could return the coordinates and the invers

Re: [Scikit-learn-general] Random patches and coordinates

2013-04-21 Thread Gael Varoquaux
Would a transformer, with an associated inverse_transform, be useful here? It seems to me that it would be the right pattern, however I don't have the code in mind, so I may be wrong. -- Precog is a next-generation analyti

Re: [Scikit-learn-general] Random patches and coordinates

2013-04-21 Thread Nicolas Trésegnie
Hi Alex, Indeed, this solution wouldn't break anything but I generally avoid letting the parameters change the return type of a function. Is this approach used somewhere else in scikit-learn? After the modification of extract_patches_2d, I will probably modify reconstruct_from_patches_2d. I

Re: [Scikit-learn-general] Random patches and coordinates

2013-04-21 Thread Alexandre Gramfort
hi Nicolas, I would add a bool parameter to extract_patches_2d such as return_coordinates. If True it returns (patches, coords) Alex -- Precog is a next-generation analytics platform capable of advanced analytics on semi