Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11346 > unrolled thread
| Started by | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| First post | 2012-08-15 07:32 +0000 |
| Last post | 2012-08-17 08:18 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Removing Outliers from List Bob Hanlon <hanlonr357@gmail.com> - 2012-08-15 07:32 +0000
Re: Removing Outliers from List Murta <rodrigomurtax@gmail.com> - 2012-08-17 08:18 +0000
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Date | 2012-08-15 07:32 +0000 |
| Subject | Re: Removing Outliers from List |
| Message-ID | <k0fja9$q6q$1@smc.vnet.net> |
list = {24, 24, 3, 2, 1, 1, 1, 1};
Module[{clusters = FindClusters[list], len},
len = Max[Length /@ clusters];
Select[clusters, Length[#] == len &][[1]]]
{3, 2, 1, 1, 1, 1}
Bob Hanlon
On Tue, Aug 14, 2012 at 4:20 AM, Murta <rodrigomurtax@gmail.com> wrote:
> Hi All
>
> Some simple idea on how to remove the outliers from a list like this?:
>
> l={24, 24, 3, 2, 1, 1, 1, 1}
>
> to get this:
>
> l={3, 2, 1, 1, 1, 1}
>
> I have one complicated one that need a lower sigma parameter to work:
> ------------------------------------------------
> l={24, 24, 3, 2, 1, 1, 1, 1}
>
> removeNormalOutliers[data_,\[Alpha]_:2.09]:=Block[{removeSub},
>
> removeSub[dataSub_]:=Module[{\[Sigma],\[Mu],return},
> If[Length[dataSub]>1,\[Mu]=N@Mean[dataSub];
> \[Sigma]=N@StandardDeviation[dataSub];
> return=Select[dataSub,#<=\[Mu]+\[Alpha] \[Sigma]&],dataSub]
> ];
> FixedPoint[removeSub,data,20]
> ]
>
> removeNormalOutliers[l, 1]
> ------------------------------------------------
>
> Some better/simple idea?
> tks in advance
> Murta
>
[toc] | [next] | [standalone]
| From | Murta <rodrigomurtax@gmail.com> |
|---|---|
| Date | 2012-08-17 08:18 +0000 |
| Message-ID | <k0kuoe$6du$1@smc.vnet.net> |
| In reply to | #11346 |
Tks Bob I was looking something like this. best regards Murta
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web