1Statistics::DescriptiveU:s:eSrmoCootnhterri(b3u)ted PerlStDaotciusmteinctsa:t:iDoenscriptive::Smoother(3)
2
3
4
6 Statistics::Descriptive::Smoother - Base module for smoothing
7 statistical data
8
10 version 3.0800
11
13 use Statistics::Descriptive::Smoother;
14 my $smoother = Statistics::Descriptive::Smoother->instantiate({
15 method => 'exponential',
16 coeff => 0.5,
17 data => [1, 2, 3, 4, 5],
18 samples => [110, 120, 130, 140, 150],
19 });
20 my @smoothed_data = $smoother->get_smoothed_data();
21
23 This module provide methods to smooth the trend of a series of
24 statistical data.
25
26 The methods provided are the "Exponential" and the "Weighted
27 Exponential" (see respectively
28 "Statistics::Descriptive::Smoother::Exponential" and
29 "Statistics::Descriptive::Smoother::Weightedexponential" for more
30 details).
31
32 This class is just a factory that will instantiate the object to
33 perform the chosen smoothing algorithm.
34
36 Statistics::Descriptive::Smoother->instantiate({});
37 Create a new Smoother object.
38
39 This method require several parameters:
40
41 method
42 Method used for the smoothing. Allowed values are:
43 "exponential" and "weightedexponential"
44
45 coeff
46 Smoothing coefficient. It needs to be in the [0;1] range,
47 otherwise undef will be reutrned. 0 means that the series is
48 not smoothed at all, while 1 the series is universally equal
49 to the initial unsmoothed value.
50
51 data Array ref with the data of the series. At least 2 values are
52 needed to smooth the series, undef is returned otherwise.
53
54 samples
55 Array ref with the samples each data value has been built
56 with. This is an optional parameter since it is not used by
57 all the smoothing algorithm.
58
59 $smoother->get_smoothing_coeff();
60 Returns the smoothing coefficient.
61
62 $smoother->set_smoothing_coeff(0.5);
63 Set the smoothing coefficient value. It needs to be in the [0;1]
64 range, otherwise undef will be reutrned.
65
67 Fabio Ponciroli
68
70 Copyright(c) 2012 by Fabio Ponciroli.
71
73 This file is licensed under the MIT/X11 License:
74 http://www.opensource.org/licenses/mit-license.php.
75
76 Permission is hereby granted, free of charge, to any person obtaining a
77 copy of this software and associated documentation files (the
78 "Software"), to deal in the Software without restriction, including
79 without limitation the rights to use, copy, modify, merge, publish,
80 distribute, sublicense, and/or sell copies of the Software, and to
81 permit persons to whom the Software is furnished to do so, subject to
82 the following conditions:
83
84 The above copyright notice and this permission notice shall be included
85 in all copies or substantial portions of the Software.
86
87 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
88 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
89 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
90 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
91 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
92 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
93 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
94
96 Websites
97 The following websites have more information about this module, and may
98 be of help to you. As always, in addition to those websites please use
99 your favorite search engine to discover more resources.
100
101 • MetaCPAN
102
103 A modern, open-source CPAN search engine, useful to view POD in
104 HTML format.
105
106 <https://metacpan.org/release/Statistics-Descriptive>
107
108 • RT: CPAN's Bug Tracker
109
110 The RT ( Request Tracker ) website is the default bug/issue
111 tracking system for CPAN.
112
113 <https://rt.cpan.org/Public/Dist/Display.html?Name=Statistics-Descriptive>
114
115 • CPANTS
116
117 The CPANTS is a website that analyzes the Kwalitee ( code metrics )
118 of a distribution.
119
120 <http://cpants.cpanauthors.org/dist/Statistics-Descriptive>
121
122 • CPAN Testers
123
124 The CPAN Testers is a network of smoke testers who run automated
125 tests on uploaded CPAN distributions.
126
127 <http://www.cpantesters.org/distro/S/Statistics-Descriptive>
128
129 • CPAN Testers Matrix
130
131 The CPAN Testers Matrix is a website that provides a visual
132 overview of the test results for a distribution on various
133 Perls/platforms.
134
135 <http://matrix.cpantesters.org/?dist=Statistics-Descriptive>
136
137 • CPAN Testers Dependencies
138
139 The CPAN Testers Dependencies is a website that shows a chart of
140 the test results of all dependencies for a distribution.
141
142 <http://deps.cpantesters.org/?module=Statistics::Descriptive>
143
144 Bugs / Feature Requests
145 Please report any bugs or feature requests by email to
146 "bug-statistics-descriptive at rt.cpan.org", or through the web
147 interface at
148 <https://rt.cpan.org/Public/Bug/Report.html?Queue=Statistics-Descriptive>.
149 You will be automatically notified of any progress on the request by
150 the system.
151
152 Source Code
153 The code is open to the world, and available for you to hack on. Please
154 feel free to browse it and play with it, or whatever. If you want to
155 contribute patches, please send me a diff or prod me to pull from your
156 repository :)
157
158 <https://github.com/shlomif/perl-Statistics-Descriptive>
159
160 git clone git://github.com/shlomif/perl-Statistics-Descriptive.git
161
163 Shlomi Fish <shlomif@cpan.org>
164
166 Please report any bugs or feature requests on the bugtracker website
167 <https://github.com/shlomif/perl-Statistics-Descriptive/issues>
168
169 When submitting a bug or request, please include a test-file or a patch
170 to an existing test-file that illustrates the bug or desired feature.
171
173 This software is copyright (c) 1997 by Jason Kastner, Andrea Spinelli,
174 Colin Kuskie, and others.
175
176 This is free software; you can redistribute it and/or modify it under
177 the same terms as the Perl 5 programming language system itself.
178
179
180
181perl v5.36.0 2023-01-2S0tatistics::Descriptive::Smoother(3)