{"action":"created","issue":{"url":"https://api.github.com/repos/invenia/DataViews.jl/issues/8","labels_url":"https://api.github.com/repos/invenia/DataViews.jl/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/invenia/DataViews.jl/issues/8/comments","events_url":"https://api.github.com/repos/invenia/DataViews.jl/issues/8/events","html_url":"https://github.com/invenia/DataViews.jl/issues/8","id":119788892,"number":8,"title":"Index partitions","user":{"login":"Rory-Finnegan","id":5276097,"avatar_url":"https://avatars.githubusercontent.com/u/5276097?v=3","gravatar_id":"","url":"https://api.github.com/users/Rory-Finnegan","html_url":"https://github.com/Rory-Finnegan","followers_url":"https://api.github.com/users/Rory-Finnegan/followers","following_url":"https://api.github.com/users/Rory-Finnegan/following{/other_user}","gists_url":"https://api.github.com/users/Rory-Finnegan/gists{/gist_id}","starred_url":"https://api.github.com/users/Rory-Finnegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rory-Finnegan/subscriptions","organizations_url":"https://api.github.com/users/Rory-Finnegan/orgs","repos_url":"https://api.github.com/users/Rory-Finnegan/repos","events_url":"https://api.github.com/users/Rory-Finnegan/events{/privacy}","received_events_url":"https://api.github.com/users/Rory-Finnegan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-01T19:26:19Z","updated_at":"2015-12-04T01:36:13Z","closed_at":null,"body":"In a lot of machine learning use cases you may want to index into partitions of an array.\r\n\r\nLet's say we want to build up collection of feature vectors to give to a neural network to do some time series prediction. Now like most feature vectors this might be a composition of different pieces of information (ie: location, direction, speed, temperature, etc). Given the current DataViews you'd probably store each of these pieces of information in separate views or you'd just handle the indexing manually. \r\n\r\nIdeally, you could build up your feature vectors in 1 DataView and index into them in some reasonable way. So in this case we might have a DataView of `:time` by `:features`, but `:features` contains a tuple of feature labels and corresponding indices. The resulting indexing would likely look like something like `view[mytimes, (:location, :temp)]` or `view[mytimes, ((:location, 1:5), (:temp, 2:4))` which returns a sub DataView containing just the location a temp features requested at the provided times. Alternatively, you could do `view[mytime, ((:location, 1),)]` to return the particular value at mytime and location 1 (I'd prefer a slightly cleaner syntax for this option)."},"comment":{"url":"https://api.github.com/repos/invenia/DataViews.jl/issues/comments/161846450","html_url":"https://github.com/invenia/DataViews.jl/issues/8#issuecomment-161846450","issue_url":"https://api.github.com/repos/invenia/DataViews.jl/issues/8","id":161846450,"user":{"login":"Rory-Finnegan","id":5276097,"avatar_url":"https://avatars.githubusercontent.com/u/5276097?v=3","gravatar_id":"","url":"https://api.github.com/users/Rory-Finnegan","html_url":"https://github.com/Rory-Finnegan","followers_url":"https://api.github.com/users/Rory-Finnegan/followers","following_url":"https://api.github.com/users/Rory-Finnegan/following{/other_user}","gists_url":"https://api.github.com/users/Rory-Finnegan/gists{/gist_id}","starred_url":"https://api.github.com/users/Rory-Finnegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rory-Finnegan/subscriptions","organizations_url":"https://api.github.com/users/Rory-Finnegan/orgs","repos_url":"https://api.github.com/users/Rory-Finnegan/repos","events_url":"https://api.github.com/users/Rory-Finnegan/events{/privacy}","received_events_url":"https://api.github.com/users/Rory-Finnegan/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T01:36:13Z","updated_at":"2015-12-04T01:36:13Z","body":"Completed. Now supports partitions with `Dict`, `Tuple{Vararg{Tuple{Symbol, Any}}` or `Tuple{Vararg{Pair{Symbol, Any}}` creation and indexing. NOTE: if you select a single partition with `getindex`, that partition will be raised to represent the index for that entire dimension of the return DataView."}}