Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader and Writer for ObservationDiscrete and OpdfDiscrete #22

Open
GoogleCodeExporter opened this issue Jun 20, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 27 Oct 2011 at 11:30

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant