Skip to content

can you add version parameter to main class #8

Description

@Sandy4321

can you add version parameter to main class
dir(C)
['class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'weakref', 'estimator_type', 'ablation', 'c', 'fit', 'get_params', 'load', 'map_type', 'max_card', 'min_support', 'n_iter', 'policy', 'predict', 'rl', 'rl', 'save', 'score', 'set_params', 'verbosity']

from
from corels import CorelsClassifier

["loud", "samples"] is the most verbose setting possible

C = CorelsClassifier(max_card=2, c=0.8, verbosity=["loud", "samples"])

4 samples, 3 features

X = [[1, 0, 1], [0, 0, 0], [1, 1, 0], [0, 1, 0]]
y = [1, 0, 0, 1]

Feature names

features = ["Mac User", "Likes Pie", "Age < 20"]

Fit the model

C.fit(X, y, features=features, prediction_name="Has a dirty computer")

Print the resulting rulelist

print(C.rl())

Predict on the training set

print("Prediction: " + str(C.predict(X)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions