app/models/easy_ml/splitter.rb in easy_ml-0.2.0.pre.rc45 vs app/models/easy_ml/splitter.rb in easy_ml-0.2.0.pre.rc46
- old
+ new
@@ -50,9 +50,21 @@
SPLITTER_CONSTANTS = SPLITTER_OPTIONS.values.map(&:constantize)
SPLITTER_CONSTANTS.flat_map(&:configuration_attributes).each do |attribute|
add_configuration_attributes attribute
end
+ def date_splitter?
+ splitter_type == "date"
+ end
+
+ def random_splitter?
+ splitter_type == "random"
+ end
+
+ def predefined_splitter?
+ splitter_type == "predefined"
+ end
+
def self.constants
{
SPLITTER_TYPES: SPLITTER_TYPES,
DEFAULT_CONFIGS: SPLITTER_OPTIONS.reduce({}) do |h, (type, klass)|
h.tap do