pysal / segregation

Segregation Measurement, Inferential Statistics, and Decomposition Analysis
https://pysal.org/segregation/
BSD 3-Clause "New" or "Revised" License
111 stars 26 forks source link

Strange non-corresponding legend on output (Out)when running indexes #135

Closed MyrnaSastre closed 5 years ago

MyrnaSastre commented 5 years ago

When running segregation indexes, I get a non-corresponding output legend (Out). It repeats the same output line: "segregation.spatial.spatial_indexes.SpatialDissim" regardless if the index has change... here an example of two different indexes, same Out legend:

Screen Shot 2019-08-22 at 7 20 42 PM

This seems to be the default Output line in my local results... in every index...but this is not the case in the examples from the notebook.

Any ideas as to what can be the problem in my local version? Thanks!!!

knaaptime commented 5 years ago

it looks like you're estimating three different indices:

in the screenshot, you're calling type(index), which is checking the type of the dissimilarity index each time. If you want to take a look at the others, you need to change the variable. e.g.

type(index)
type(index_DDE_g)
type(index_DELTA_g)

should show you different results.

MyrnaSastre commented 5 years ago

I see... thanks Eli!

knaaptime commented 5 years ago

of course. does that solve your issue?

MyrnaSastre commented 5 years ago

Yes. The legend of output changes, but the index value is the same. Here an example before and after correcting the index name:

Screen Shot 2019-08-22 at 9 44 55 PM Screen Shot 2019-08-22 at 9 45 24 PM

so, the estimation seems to be robust even if you don't change the type()

renanxcortes commented 5 years ago

Yes. The legend of output changes, but the index value is the same. Here an example before and after correcting the index name:

Screen Shot 2019-08-22 at 9 44 55 PM Screen Shot 2019-08-22 at 9 45 24 PM

so, the estimation seems to be robust even if you don't change the type()

In the first cell, you create the object called index_ACO but check the type of index. The name of the objects should be the same.

In addition, the estimation has nothing to do with the type. This is just to show the user the name of the class that was built that depends of the function you call.

MyrnaSastre commented 5 years ago

Yes. I get that those names should be the same. That's what I was trying to explain above. I corrected the type() of the index in the second screenshot, but since you mentioned that it should show different results, I just wanted to show you the results in the two versions, one without the correction and the second one corrected. Thanks for the clarification that the estimation is independent. It is clear now... thanks again!

renanxcortes commented 5 years ago

Yes. I get that those names should be the same. That's what I was trying to explain above. I corrected the type() of the index in the second screenshot, but since you mentioned that it should show different results, I just wanted to show you the results in the two versions, one without the correction and the second one corrected. Thanks for the clarification that the estimation is independent. It is clear now... thanks again!

Ok, cool! Glad it is clear now!! :)