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

Feature/string attributes #12

Merged
merged 21 commits into from
Dec 22, 2016
Merged

Feature/string attributes #12

merged 21 commits into from
Dec 22, 2016

Conversation

paulgoetze
Copy link
Owner

@paulgoetze paulgoetze commented Oct 28, 2016

Allow defining string attributes for an Instances object.

A still not yet solved issue is that a string attribute does not have the Attribute's methods defined if it was created with Attribute.new_string(...), e.g.:

undefined method `type' for #<Java::JavaObject:0x5b1e88f>

It happens because the returned object is not a Weka::Core::Attribute, but a Java::JavaObject.

This means,at the moment, you can't create string Attributes as separate Objects and work with them..

☝️ solved in #13

Todo:

  • Add string attribute/values to test datasets to cover test cases for string attributes
  • Add missing/modify existing specs to check against string attributes
  • Add handling of string attributes in DenseInstance#value_from:
    def value_from(value, index)

kcning and others added 10 commits December 3, 2016 14:57
Attribute#add_string_value() should not be called inside
Attribute#internal_value_of(). The method call is moved into
Instances#instance_from().
feature/string-attributes: fixed issue#12
    1) add support for string attribute
    2) add spec for string attribute
    1) add support for checking if a certain type of attribute exists
    2) add spec for the new methods
@kcning kcning mentioned this pull request Dec 9, 2016
@paulgoetze paulgoetze merged commit c0a1a09 into develop Dec 22, 2016
@paulgoetze paulgoetze deleted the feature/string-attributes branch December 22, 2016 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants