Skip to content
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.

set_property: type parameter #9

Closed
fracpete opened this issue May 1, 2014 · 2 comments
Closed

set_property: type parameter #9

fracpete opened this issue May 1, 2014 · 2 comments
Assignees
Labels

Comments

@fracpete
Copy link
Owner

fracpete commented May 1, 2014

add "type" parameter which defines what type to convert the value

Example:
J48's confidenceFactor is float, but Python uses double

The following converts the string "0.3" into a float before setting the property:
cls = Classifier("weka.classifiers.trees.J48")
cls.set_property("confidenceFactor", "0.3", "f")

@fracpete fracpete added the bug label May 1, 2014
@fracpete fracpete self-assigned this May 1, 2014
@fracpete
Copy link
Owner Author

fracpete commented May 2, 2014

this only seems to be a problem for Java "float" primitives

@fracpete
Copy link
Owner Author

fracpete commented May 5, 2014

added function "double_to_float" to weka.core.types module that generates a java.lang.Float object from a Python double

@fracpete fracpete closed this as completed May 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant