Re: how to identify outliers

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: how to identify outliers
Дата
Msg-id 4AE7891F.8080402@hogranch.com
обсуждение исходный текст
Ответ на how to identify outliers  ("Rhys A.D. Stewart" <rhys.stewart@gmail.com>)
Ответы Re: how to identify outliers  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
Rhys A.D. Stewart wrote:
> Hey all,
> I have the following table:  data(pnum text, distance float8, route text).
> I would like to remove the outliers in distance, i.e. lets say i get
> the avg dist of pnum for each route and the std deviation of the
> distance what is the best way to identify the outliers?
>

i dunno.  brute force, two passes, one to identify the MIN and MAX of
the values, then another SELECT avg(value) ....   WHERE (....) AND val
!= minval AND val != maxval.

you could probably do something with a standard deviation that is more
accurate for large sets than just tossing the 2 outliers.





В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: auto truncate/vacuum full
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: PHP + PDO + PGPOOL = Segmentation fault