-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds a .new_<type> method for each attribute type to Weka::Core::Attribute: .new_numeric(name) .new_nominal(name, values) .new_date(name, format) .new_string(name)
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
Feature/string attributes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.:It happens because the returned object is not a
Weka::Core::Attribute
, but aJava::JavaObject
.This means,at the moment, you can't create string Attributes as separate Objects and work with them..
☝️ solved in #13
Todo:
weka-jruby/lib/weka/core/dense_instance.rb
Line 54 in b44ee9b