Hedging your bets, hierarchical_classifier, DARTS [understanding, questions]

140 views
Skip to first unread message

taras sereda

unread,
Jun 10, 2015, 12:28:28 PM6/10/15
to caffe...@googlegroups.com
Hi all.
I've spend some time trying to understand all the details about hedging project and usage of hierarchical classifiers.

2. I've got running examples of DARTS algorithm with models and features provided.

But I still have some concerns and questions about particular usage of image.net.pickle  web_demo.py 
Source code:

image.net.pickle has the following structure.  

the format is 
key , len()

 [('probmat', 1860),
 
('words', 1860),
 
('preferences', 1860),
 
('idmapping', 1000),
 
('infogain', 1860)]

words - are from synset of 1000 classes (also including internal nodes)
preferences - probably indicates the depth of each node in semantic tree structure. (since exactly 1000 of items have value of 1)
idmapping - probably holds order of classes as in trained model
infogain - measure of information gain on each node. which depends only on depth of the node. Am i right?


and the last one is probmat which I don't understand how to compute. Can somebody give me a link where I can find more info about this parameter?


From my understanding of Info_gain measurement :
info gain is a quotient of prior distribution to posterior distribution.
or a measurement which describes how entropy changes traversing tree from one level no another.

        # A bias to prefer children nodes in single-chain paths
       
# I am setting the value to 0.1 as a quick, simple model.
       
# We could use better psychological models here...
       
self.bet['infogain'] -= np.array(self.bet['preferences']) * 0.1

while initialisation self.bet['infogain'] immediately reduced by value np.array(self.bet['preferences']) * 0.1?
What exactly it gives us? Is it for describing a fact of a kind of uniform prior distribution?

till now self.bet['infogain'] is a kind of starting value which will be changed in this way for particular predict values:

            # Compute expected information gain
            expected_infogain
= np.dot(
               
self.bet['probmat'], scores[self.bet['idmapping']])
            expected_infogain
*= self.bet['infogain']



self.bet['probmat'].shape
>>(1860, 1000)
scores
[self.bet['idmapping']]
>>(1000,)


np.dot function produces matrix with dimensions (1860,1) which in turn will be multiplied element-wise with self.bet['infogain'].
My question is. Where bet['probmat'] comes from? Since in original matlab code I haven't seen such computations.
Thanks in advance.



Regards. Taras.






 

 
Reply all
Reply to author
Forward
0 new messages