summaryrefslogtreecommitdiff
path: root/perl-Statistics-MaxEntropy.spec
blob: c289eaeeb39631680385495158042cf8129438ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# Conditional build:
# _without_tests - do not perform "make test"
#
%include	/usr/lib/rpm/macros.perl
%define	pdir	Statistics
%define	pnam	MaxEntropy
Summary:	MaxEntropy - Perl5 module for Maximum Entropy Modeling and Feature Induction
Summary(pl):	MaxEntropy - moduł do modelowania największej entropii i indukcji cech
Name:		perl-Statistics-MaxEntropy
Version:	0.9
Release:	12
License:	GPL
Group:		Development/Languages/Perl
Source0:	http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
Patch0:		%{name}-paths.patch
BuildRequires:	perl-devel >= 5.6
BuildRequires:	rpm-perlprov >= 4.1-13
BuildArch:	noarch
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
This module is an implementation of the Generalised and Improved
Iterative Scaling (GIS, IIS) algorithms and the Feature Induction (FI)
algorithm as defined in (Darroch and Ratcliff 1972) and (Della Pietra
et al. 1997). The purpose of the scaling algorithms is to find the
maximum entropy distribution given a set of events and (optionally) an
initial distribution. Also a set of candidate features may be
specified; then the FI algorithm may be applied to find and add the
candidate feature(s) that give the largest `gain' in terms of Kullback
Leibler divergence when it is added to the current set of features.

%description -l pl
Ten moduł jest implementacją algorytmów uogólnionego i ulepszonego
iteracyjnego skalowania (GIS, IIS) oraz algorytmu indukcji cech (FI -
Feature Induction), zdefiniowanych przez Darrocha i Ratcliffa w 1972
roku oraz Della Pietra i innych w 1997. Celem algorytmów skalujących
jest znalezienie maksymalnego rozproszenia entropii zadanej zbiorem
zdarzeń i (opcjonalnie) początkowym rozproszeniem. Można podać także
zbiór cech-kandydatów; wtedy może być zastosowany algorytm FI do
odnalezienia i dodanie cech-kandydatów, które dają największy zysk w
sensie odchylenia Kullbacka-Leiblera kiedy są dodane do aktualnego
zbioru cech.

%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
%patch -p0

%build
%{__perl} Makefile.PL \
	INSTALLDIRS=vendor 
%{__make}
%{!?_without_tests:%{__make} test}

%install
rm -rf $RPM_BUILD_ROOT

%{__make} install DESTDIR=$RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc Changes README *txt
%attr(755,root,root) %{_bindir}/ME.wrapper.pl
%{perl_vendorlib}/Statistics/*.pm
# empty autosplit.ix files
#%%{perl_vendorlib}/auto/Statistics/Candidates
#%%{perl_vendorlib}/auto/Statistics/MaxEntropy
#%%{perl_vendorlib}/auto/Statistics/SparseVector
%{_mandir}/man[13]/*