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

Changes to Feature and Attribute #11

Merged
merged 3 commits into from
Dec 31, 2022
Merged

Changes to Feature and Attribute #11

merged 3 commits into from
Dec 31, 2022

Conversation

zStupan
Copy link
Collaborator

@zStupan zStupan commented Dec 31, 2022

Summary

  • Changed Feature and Attribute to abstract types
  • Added structs NumericalFeature, CategoricalFeature, which are subtypes of abstract type Feature.
  • Added structs NumericalAttribute, CategoricalAttribute, which are subtypes of abstract type Attribute.
  • NumericalFeature and NumericalAttribute are parametric structs that accept subtypes of Real (e. g. NumericalFeature{Int64}, NumericalFeature{Float32}, NumericalFeature{UInt8}, ...).
  • Added methods isnumerical and iscategorical, to check if Attribute or Feature is numerical/categorical.
  • Added dtype method which returns the parameter type for numerical feaures and attributes (e. g. dtype(NumericalFeature("distance", 1, 100)) # returns Int64), and String for categorical features and attributes.
  • Updated the rest of the code and tests accordingly.

@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2022

Codecov Report

Base: 45.77% // Head: 45.12% // Decreases project coverage by -0.64% ⚠️

Coverage data is based on head (58ae171) compared to base (a5a0128).
Patch coverage: 71.42% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #11      +/-   ##
==========================================
- Coverage   45.77%   45.12%   -0.65%     
==========================================
  Files          14       14              
  Lines         284      277       -7     
==========================================
- Hits          130      125       -5     
+ Misses        154      152       -2     
Impacted Files Coverage Δ
src/NiaARM.jl 0.00% <ø> (ø)
src/attribute.jl 30.00% <22.22%> (+18.88%) ⬆️
src/feature.jl 50.00% <44.44%> (+35.71%) ⬆️
src/dataset.jl 100.00% <100.00%> (ø)
src/narm.jl 93.44% <100.00%> (-0.11%) ⬇️
src/rule.jl 50.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zStupan zStupan merged commit 446640c into firefly-cpp:main Dec 31, 2022
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.

None yet

2 participants