ericdepres / jahmm

Automatically exported from code.google.com/p/jahmm
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Reader and Writer for ObservationDiscrete and OpdfDiscrete #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Problem:

There are no Readers and Writers for ObservationDiscrete and OpdfDiscrete. Also 
the CLI application does not support these types.

Solution:

I've implemented the missing classed and modified the CLI application. A patch 
is included, here is an overview of the changes in this patch:

src/main/java/be/ac/ulg/montefiore/run/jahmm/io/ObservationDiscreteReader.java
ObservationReader for ObservationDiscrete<e>

src/main/java/be/ac/ulg/montefiore/run/jahmm/io/ObservationDiscreteWriter.java
ObservationWriter for ObservationDiscrete<E>

src/main/java/be/ac/ulg/montefiore/run/jahmm/io/ObservationSequencesReader.java
Added wordChars to the SyntaxTable for the recognition of java identifiers

src/main/java/be/ac/ulg/montefiore/run/jahmm/io/OpdfDiscreteReader.java
OpdfReader for OpdfDiscrete<E>

src/main/java/be/ac/ulg/montefiore/run/jahmm/io/OpdfDiscreteWriter.java
OpdfWriter for OpdfDiscrete<E>

src/main/java/be/ac/ulg/montefiore/run/jahmm/io/OpdfGenericReader.java
Parameterization for OpdfReader r

src/main/java/be/ac/ulg/montefiore/run/jahmm/io/OpdfIntegerWriter.java
Use of OpdfWriter.write(Writer, double[]) in OpdfIntegerWriter.write(Writer, 
OpdfInterger) to get formatted probabilities

src/main/java/be/ac/ulg/montefiore/run/jahmm/io/OpdfWriter.java
Extra decimal in the formatter to get the same number of decimals as the 
formatter in the HmmWriter

src/main/java/be/ac/ulg/montefiore/run/jahmm/OpdfDiscrete.java
Parameterization for ObservationDiscrete

src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/CommandLineArguments.java
Option 'discrete' added to -opdf and argument VALUES_CLASS (-c) added.

src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/RelatedObjs.java
Parameterization CentroidFactory removed from RelatedObjs and moved to 
subinterface RelatedCentroidObjs

src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/RelatedCentroidObjs.java
New subinterface of RelatedObjs for Observation types that implement 
CentroidFactory

src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/Types.java
New function relatedCentroidObjs in Types class
New class DiscreteRelatedObjects
Implemented interface changed to RelatedCentroidObjs for existing classes

src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/BWActionHandler.java
src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/CreateActionHandler.java
src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/GenerateActionHandler.java
src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/KLActionHandler.java
Parameterization CentroidFactory removed

src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/KMeansActionHandler.java
Changed to relatedCentroidObjs()

src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/HelpActionHandler.java
Help for new -opdf option and -c argument

src/main/java/be/ac/ulg/montefiore/run/jahmm/apps/cli/PrintActionHandler.java
Modified opdfReader code, require -opdf argument for DiscreteODF input files

Original issue reported on code.google.com by tamm...@gmail.com on 27 Oct 2011 at 11:30

Attachments: