I'm creating this page in an attempt to document what I learn about Bruce's polynomial regression implementation in Language-ID/scripts/seg2xml3.pl. Currently this code fails under Cygwin and 64-bit Linux, so the better I understand it the more likely I can fix it. –Josh 17:29, 28 June 2007 (MDT)

The implementation utilizes the PDL numerics library. Bruce is using the following includes: :use strict; :use Data::Dumper; :use POSIX qw(ceil floor); :use PDL (); :use PDL::Ops (); :use PDL::Fit::Polynomial ();

He notes in a comment: :Use empty list () after PDL imports to avoid having it pollute our namespace with unwanted symbols, such as a ceil and floor that clobber (and are incompatible with) the ones imported from POSIX. See “perldoc -f use” for details on the “use … ()” syntax. :PDL's importer doesn't behave normally; it imports symbols even when you give an explicit list a la “use PDL qw(pdl)”.

Question: Why use the POSIX ceil and floor instead of the PDL::Math ceil and floor?

Spoken Language ID

nlp-private/polynomial-regression.txt · Last modified: 2015/04/23 13:39 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0