Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update olivetti_faces.py #2900

Closed
wants to merge 1 commit into from
Closed

Update olivetti_faces.py #2900

wants to merge 1 commit into from

Conversation

kaushik94
Copy link
Contributor

i have written a little documentation for the return object in olivetti_faces.py
and changed the ordering of the parameters

Returns
--------
dataset: A dot-accessible dictionary
Contains faces: array of faces in the original database.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fields are actually data, images, target, DESCR as far as I can see, not faces...?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This documentation gets processed (more-or-less) as ReStructuredText. Run make doc-noplots and look at the output in doc/_build/html/stable/modules/generated/. Using one of the RST list formats might be cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay that was a mistake, will change that but i don't understand one thing.
why are we sending the "faces" twice.Once in the form of column matrix "data"(if im not wrong) and then in the form of "images" ?
isn't that a waste of space?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just for convenience. There is no memory copy, this is just a reshaping of the same memory buffer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data attribute generally has a 2D shape (n_samples, n_features) in other load, so we respect that convention here while allowing the user to access the original shape of the images in the faces attribute.

@arjoly
Copy link
Member

arjoly commented Jul 18, 2014

This has been solved in some pr.

@arjoly arjoly closed this Jul 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants