"If I want to browse the images how to do it". Well, with 60K images, I'm guessing that you don't really want to browse them. Maybe you can clarify what you mean by "browse". Do you want to search, filter, iterate, etc?
"I guessed this might behave as list". There was no reason to guess this. The ResourceData
output that you assigned to trainingData
was clearly a list. You can see this because it was surrounded by brackets, "{" and "}".
"is there a way to list all functions supported on a variable?" This question makes me think there is a misunderstanding of how Mathematica works. Mathematica is basically an expression evaluation system. The following explanation is very rough, but hopefully helpful. When Mathematica sees an expression, it parses that expression and looks for rewrite rules that match the expression. It does this by using OwnValues
, DownValues
, and UpValues
, and it does this in a very specific order and recursively. At some point, it will find no further evaluation rules and it stops. This might terminate in something that we might interpret as an "answer", like an integer value. But it can also terminate in something that to us looks only partially evaluated. It can also generate messages and errors in the process. So, a short answer to your question is that all functions are supported on all expressions.
Another way to think about this is that Mathematica doesn't have anything analogous to static type checking. So variables don't have types, and so they don't have a specific set of "supported functions". So another answer to your question is simply "no", there is no way to programmatically determine the intended semantics of an expression and thereby know what "functions it supports". However, by defining your own rewrite rules (typically via SetDelayed
) and then using pattern matching and/or conditional constraints, you can precisely specify which expressions "work" in the sense of evaluating to a satisfying terminal expression. So there is a sense in which you can realize strong typing for your own custome "types".
You can inspect an expression in various ways. You can use Head
to determine the head of the expression, the outermost wrapper, the thing that might sort of seem like a type. FullForm
and TreeForm
can help you understand the structure of an expression. There are other "functions" that help you extract parts, apply functions to subexpressions, search, etc. So there are many ways to interactively build an understanding of an expression that you're looking at. But if you're wanting something programmatic that will take an arbitrary expression and give you back a list of "things you can do to this expression that will result in a satisfying terminal expression", then this is effectively impossible (not literally impossible, because you have access to all of the DownValues
and so forth, but I seriously doubt that this is the kind of thing you were asking about).
If this didn't answer your question, maybe you can provide a fuller example that shows the kind of thing you would like to be able to do.