[HN Gopher] Boston housing price dataset was removed from scikit...
       ___________________________________________________________________
        
       Boston housing price dataset was removed from scikit-learn 1.2
        
       Author : ok123456
       Score  : 58 points
       Date   : 2022-12-30 20:29 UTC (2 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | loehnsberg wrote:
       | I used the dataset with my students, as it is small and does not
       | require preprocessing, like dummy coding or handling missing
       | values. Students also brought the racial issue to my attention
       | and it created a bit of a discussion. We eventually decided to
       | simply change the definition to "birds by town" and moved on.
       | 
       | Think of all the children books that get rewritten. Read the new
       | ones to your children and discuss the old ones when they are
       | teenagers. I would have preferred if sklearn contributors had
       | done the same and simply revised the description as opposed to
       | removing the dataset.
       | 
       | EDIT: changed "banning" to "removing" the dataset
        
         | guipsp wrote:
         | Can you really call this "banning the dataset"?
         | https://github.com/scikit-learn/scikit-learn/commit/8a86e219...
        
           | duskwuff wrote:
           | This is an impressively responsible way of handling the
           | situation, and I'd recommend that others read it as well. It
           | identifies the specific problem with the dataset which led to
           | its removal from the library (with references!), tells the
           | user how to retrieve it if they really need it, and suggests
           | alternatives.
        
       | Der_Einzige wrote:
       | Good riddance. Even independent of the ethical problems, we
       | should use harder benchmark datasets than this or iris.
        
       | aftbit wrote:
       | Can someone ELI5 why this was removed? Is the problem just that
       | the dataset includes a feature that references black people which
       | might cause a model to draw a connection between black population
       | and housing values? I thought it was pretty well accepted that
       | (for a huge complex variety of historical reasons) black people
       | tend to live in neighborhoods with lower valued houses. Or is
       | there a deeper fairness issue that I'm missing?
        
         | guipsp wrote:
         | The biggest problem is that the dataset contains an artificial
         | feature that is not invertible. This is an issue because the
         | biases of the author of the dataset are present in that
         | feature, and you will never be able to "train" your way out of
         | it because it is not invertible.
        
         | guipsp wrote:
         | You can read the full reason in the commit diff:
         | https://github.com/scikit-learn/scikit-learn/commit/8a86e219...
        
           | version_five wrote:
           | Only on HN would someone ask for an ELI5 and get pointed to a
           | git commit diff :)
        
             | guipsp wrote:
             | You are, of course, correct. I gave it a better shot.
        
       | erehweb wrote:
       | Some discussion of the dataset and issues - this link claims it
       | was removed in June 2020
       | https://fairlearn.org/main/user_guide/datasets/boston_housin...
        
         | VHRanger wrote:
         | I'm annoyed that the dataset has the B variable and the LSAT
         | variable encoding some manually-chosen hyperparameters in the
         | formula creating them.
         | 
         | If the dataset gave the raw features it would be better at
         | least
        
       | pb060 wrote:
       | Thanks god. Most boring dataset ever. The reason why I never got
       | past the first chapter of any ML book I tried to read.
        
       | civilized wrote:
       | What makes me uncomfortable here is the obscure description of
       | the issue and how the obscurity will affect beginners and young
       | minds. Kids with an interest in data science are going to read
       | this and find it baffling, and the references won't help much.
       | They will get the impression that ethics in machine learning is
       | some sort of abstruse field that they can't reason about on their
       | own, so they need to be told what is ethical by experts.
       | 
       | The explanation also seems technically inaccurate. Including a
       | squared feature like the B variable does not assume a positive
       | impact of B. The impact could just as easily be negative if the
       | data is more consistent with that pattern, because the regression
       | coefficient on B could have either sign. If fitting the data
       | yielded a negative sign, it would imply that the most integrated
       | neighborhoods have the highest housing prices rather than the
       | lowest.
        
       | josephcsible wrote:
       | Am I understanding this right? They purged an entire dataset
       | because one of its independent variables is how integrated a
       | neighborhood is?
        
         | version_five wrote:
         | Yes. It's an embarrassment.
        
         | mcs5280 wrote:
         | If we selectively hide things from view all the world's
         | problems will go away
        
           | mertd wrote:
           | Read the code? You can try to import it but you'll get a
           | message explaining the problems with it and a link to where
           | to find it shall you decide you'd like to use it anyway. It's
           | the opposite of hiding.
        
             | ipaddr wrote:
             | Putting unnecessarily gates in front making the process
             | non-standard is not the opposite of hiding.. perhaps
             | somewhere inbetween
        
           | tshaddox wrote:
           | This is a very small collection of toy datasets that this
           | machine learning library includes for the purpose of
           | illustrating the behavior of the library: http://scikit-
           | learn.org/stable/datasets/toy_dataset.html
           | 
           | It's out of the scope of this library to publish all datasets
           | in existence or highlight particular datasets that are
           | relevant to particular societal problems. It's literally just
           | a few datasets so that you can play around with the ML
           | library without downloading any external datasets. I think
           | it's fair to allow them to exercise reasonable discretion in
           | their choice of which toy datasets to ship with their ML
           | library.
        
           | mistrial9 wrote:
           | .. with AI
        
           | JeremyBanks wrote:
           | My Rights to be included as example data in a tool
           | distribution
        
         | ffssffss wrote:
         | What's the point of such an incendiary comment? No, you aren't
         | understanding it right. At worst you are offering a
         | deliberately misleading interpretation. Here's what the link
         | says:                        The Boston housing prices dataset
         | has an ethical problem: as                 investigated in [1],
         | the authors of this dataset engineered a                 non-
         | invertible variable "B" assuming that racial self-segregation
         | had a                 positive impact on house prices [2].
         | Furthermore the goal of the                 research that led
         | to the creation of this dataset was to study the
         | impact of air quality but it did not give adequate
         | demonstration of the                 validity of this
         | assumption.                 The scikit-learn maintainers
         | therefore strongly discourage the use of                 this
         | dataset unless the purpose of the code is to study and educate
         | about ethical issues in data science and machine learning.
        
           | trinsic2 wrote:
           | How is doing a sanity check incendiary in your view again?
        
             | ffssffss wrote:
             | [flagged]
        
               | generalizations wrote:
               | > Please respond to the strongest plausible
               | interpretation of what someone says, not a weaker one
               | that's easier to criticize. Assume good faith.
               | 
               | https://news.ycombinator.com/newsguidelines.html
        
               | ffssffss wrote:
               | Sadly, assumptions of good faith are easily exploited by
               | bad actors (the classic term for this is "just asking
               | questions") but I suppose you're right, I should not have
               | assumed malice.
        
               | generalizations wrote:
               | Better one one mud slinger than two, for the sake of the
               | community. Guilty of it myself too many times. Cheers.
        
               | josephcsible wrote:
               | > The non-invertability is part of the problem, and he
               | completely doesn't understand that.
               | 
               | I get that invertibility means that you can't fully
               | recover the original racial percentage, e.g., that a
               | 48/52 split and a 78/22 split will both look exactly the
               | same, since (.48-.63)^2 and (.78-.63)^2 are equal. I
               | don't see why that totally taints the entire dataset.
        
               | europeanguy wrote:
               | > I think he wrote the comment in bad faith. The non-
               | invertability is part of the problem, and he completely
               | doesn't understand that.
               | 
               | If he doesn't understand it, then it's not in bad faith.
               | Right?
        
               | jeffreyrogers wrote:
               | I don't see why non-invertibility matters. Lots of useful
               | features are non-invertible.
               | 
               | Edit: and if you are dealing with real data sets or
               | producing real datasets for analysis you will often have
               | only approximations to the thing you want to measure.
               | Determining whether your proxy variable is worth
               | including or how to interpret your results in light of it
               | are necessary skills to develop.
        
               | guipsp wrote:
               | The feature is bad. The non-invertibility means that you
               | cannot get back the original data that was used to
               | generate the feature, and try to salvage it.
        
               | josephcsible wrote:
               | Sure, that makes it less useful. But why is that so bad
               | that the entire dataset should be discarded and not used,
               | even for uses that don't care about that particular part
               | of the original data?
        
           | jimbob45 wrote:
           | Is it just me or this some horrifically bad English? I have a
           | fairly strong math background and I'm struggling to figure
           | out what the author meant by any of that.
           | 
           | As far as I can tell, it's something like, "The author made a
           | bad variable. Also, the goal was to check air quality but the
           | variable was bad." What does the subject being air quality
           | impact have to do with anything there?
        
           | josephcsible wrote:
           | The "B" variable measures how integrated a neighborhood is,
           | and that snippet seems to be saying that its existence is the
           | "ethical problem" that led them to purge the dataset. How is
           | any of that different than what I said?
        
             | threeseed wrote:
             | Please provide a source that says that "number of blacks in
             | my neighbourhood" is a measure of "neighbourhood
             | integration".
             | 
             | It's a ridiculous and offensive premise from my
             | perspective.
        
               | josephcsible wrote:
               | > Please provide a source that says that "number of
               | blacks in my neighbourhood" is a measure of
               | "neighbourhood integration".
               | 
               | It isn't. Bk is "number of blacks in my neighbourhood" as
               | you put it, and the whole point of using B instead of it
               | was so that an all-black neighborhood wouldn't count as
               | more integrated than one with a mix of races.
        
               | CoastalCoder wrote:
               | > Please provide a source that says that "number of
               | blacks in my neighbourhood" is a measure of
               | "neighbourhood integration".
               | 
               | I wonder if the dataset design makes more sense in the
               | context of Boston in particular: [0].
               | 
               | [0] https://en.wikipedia.org/wiki/Boston_desegregation_bu
               | sing_cr...
        
               | CoastalCoder wrote:
               | > It's a ridiculous and offensive premise from my
               | perspective.
               | 
               | Can you elaborate on the problem you have with this?
               | 
               | (I'm just trying to not guess at your meaning.)
        
             | anigbrowl wrote:
             | [flagged]
        
               | trinsic2 wrote:
               | Stop what?
        
         | loeg wrote:
         | Close, but not exactly. One of its variables is how far its
         | integration differs from 63% Black, _squared_.
         | 
         | I.e., you cannot distinguish a 73% black neighborhood from a
         | 53% black neighborhood with this variable.
         | 
         | It's a bizarre variable and I guess I could see purging the
         | column or at least suggesting it not be used, but I don't
         | really understand why you'd delete the rest of the (sample)
         | dataset on this basis.
        
         | mcguire wrote:
         | From https://fairlearn.org/main/user_guide/datasets/boston_hous
         | in...:
         | 
         | " _Thus, any models trained using this data that do not take
         | special care to process B will learn to use mathematically
         | encoded racism as a factor in house price prediction._ "
        
           | loeg wrote:
           | House price prediction for prices in 1970s Boston, yes, where
           | housing prices almost certainly reflected racist preferences.
           | That seems like a (potentially) accurate model?
           | 
           | ML models could also learn that the correlation between B and
           | price is negative (i.e., that integration improves house
           | prices). But the critics of the dataset all suggest that B
           | and price are positively correlated.
        
         | threeseed wrote:
         | No. The dataset [1] defines B as:
         | 
         | 1000(Bk - 0.63)^2 where Bk is the proportion of blacks by town
         | 
         | And not sure how anyone can argue the dataset is worthy of
         | being included. It is pretty offensive and misguided at minimum
         | to argue that having more black people in your neighbourhood
         | will depress housing prices. And for it to be solely because
         | they are black and not to do with a range of other factors e.g.
         | socio-economic.
         | 
         | [1] http://lib.stat.cmu.edu/datasets/boston
        
           | mdcds wrote:
           | data is just that, not an argument in itself. how you use it
           | to disprove something is up to you.
        
           | sidlls wrote:
           | But it's a fact that--due to the very racism you're pointing
           | out--house prices tend to be lower the more minorities there
           | are. That's in part _because of_ the racist policies of banks
           | and the real estate industry. Ignoring it doesn't do anyone a
           | service. Now, whether it's used /included responsibly in this
           | dataset is another matter entirely.
        
           | mateo411 wrote:
           | How did they arrive at .63?
           | 
           | It's seems like a weird choice. If there are 62% or 64% then
           | the feature will yield the same value.
           | 
           | I think it would make more sense just to include percentage
           | of households where at least one member of the household has
           | a certain ethnicity.
           | 
           | I don't think it's a offensive to analyze demographic
           | information in the aggregate. In fact this happens all the
           | time.
        
             | HPsquared wrote:
             | It is kind of strange, I don't understand why they would
             | use that. Here's a plot of the function:
             | 
             | https://www.wolframalpha.com/input?i=plot+%5B1000*%28x-0.63
             | %...
        
             | josephcsible wrote:
             | I wonder if that was the overall proportion for the entire
             | surrounding area at the time. If so, then B would be a
             | measure of how different the racial makeup of a given
             | subset is from the entire area.
        
           | Yajirobe wrote:
           | Data can show a correlation. What the underlying causation is
           | is not what the dataset aims to answer.
        
           | kortilla wrote:
           | Offensive to who? It sounds like a great way to compare
           | racism in different areas.
           | 
           | The more it correlates with a lower price, the more race
           | issues.
        
           | version_five wrote:
           | It is pretty offensive and misguided at minimum to argue that
           | having more black people in your neighbourhood will depress
           | housing prices.
           | 
           | I think that's the wrong lens to look at this through. I'm
           | happy to concede your statement about it being offensive is
           | true (although I think from a purely statistical perspective,
           | correlations with poverty, etc probably make the assumption
           | correct. Before 2015 or so when we all lost it, it would only
           | be racist to say there was a causal relationship between race
           | and price, not a correlation). Anyway, that's all an aside.
           | 
           | It's the purging of a dataset, a toy dataset in this context,
           | for a reason of political correctness, that I don't support.
           | If you look hard enough at anything, you can probably find a
           | way to call it racist or some similar slur. If we start
           | applying this lens to tools like scikit learn, we go down a
           | path I don't agree with, that's completely performative in
           | terms of actually addressing any wrongs, and is a continuing
           | distraction from what could be useful work. Debating if and
           | how racist this is is immaterial imo to whether or not we
           | should erase everything doesn't align with modern
           | hypersensitivity about political correctness
        
             | micromacrofoot wrote:
             | You're missing the fact that there are a lot of reasons the
             | data itself is actually bad... another commenter shared a
             | reasonable analysis:
             | https://medium.com/@docintangible/racist-data-
             | destruction-11...
             | 
             | So even if you want to ignore the fact that the data was
             | outright used to discriminate in the past, the data itself
             | is actually flawed in several ways...
        
             | threeseed wrote:
             | > If you look hard enough at anything, you can probably
             | find a way to call it racist or some similar slur.
             | 
             | Which is such an insane premise that it's hard to take the
             | rest of your point seriously.
        
           | josephcsible wrote:
           | Isn't that a measure of how integrated a neighborhood is? And
           | even accepting for the sake of argument that such a variable
           | is evil, why not just exclude it instead of ditching the
           | whole dataset?
        
             | [deleted]
        
             | threeseed wrote:
             | a) No. If 50% of the community is African-Americans and
             | live on one half and everyone else on the other then it
             | would be exactly integrated. Except of course it isn't.
             | 
             | b) It is not scikit-learn's responsibility to alter third
             | party datasets.
        
               | CoastalCoder wrote:
               | > a) No. If 50% of the community is African-Americans and
               | live on one half and everyone else on the other then it
               | would be exactly integrated. Except of course it isn't.
               | 
               | IIUC, you're arguing that "whole-town" level aggregation
               | is misleading. So if we get more granular, we could do it
               | my neighborhood, street, building, apartment/car/shelter,
               | bedroom, bed, bed @ time of day, etc.
               | 
               | Any one of those aggregation levels could hide
               | interesting distinctions that could be made if only the
               | data were reported with even _more_ granularity.
               | 
               | So are you arguing against aggregation in general? Or
               | just whole-town aggregation specifically?
        
           | thw09j9m wrote:
           | > offensive and misguided
           | 
           | The data is the data. The data isn't suggesting that "having
           | more black people in your neighbourhood will depress housing
           | prices." That's your take on what a racist causal
           | interpretation would look like.
           | 
           | The correlation is very real and turning a blind eye to it is
           | worse: https://www.brookings.edu/testimonies/how-racial-
           | disparities...
        
             | micromacrofoot wrote:
             | That's actually a racist causal interpretation made about
             | the data when it was originally analyzed:
             | 
             | > At low to moderate levels of B, an increase in B should
             | have a negative influence on housing value if Blacks are
             | regarded as undesirable neighbors by Whites.
        
               | RobotToaster wrote:
               | Isn't that saying that lower house prices are caused by
               | racism?
        
             | micromacrofoot wrote:
             | That's actually a racist causal interpretation made about
             | the data when it was originally compiled and analyzed...
             | which raises a lot of alarm bells:
             | 
             | > At low to moderate levels of B, an increase in B should
             | have a negative influence on housing value if Blacks are
             | regarded as undesirable neighbors by Whites.
        
         | anigbrowl wrote:
         | No, you are not. https://medium.com/@docintangible/racist-data-
         | destruction-11...
        
       ___________________________________________________________________
       (page generated 2022-12-30 23:01 UTC)