Skip to content

AttributeError: module 'gosdt' has no attribute 'configure' #219

@ranit43

Description

@ranit43

I am facing the following issue when trying to fit the 'OptimalTreeClassifier'

I also installed gosdt pip install gosdt

def get_clf_OptimalTree(X, Y):
    print("\nTraining Optimal Tree Classifier model\n")
    X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=0.2)
    feature_names = X_train.columns.tolist()
    clf_optimal_tree = OptimalTreeClassifier()
    clf_optimal_tree.fit(X_train, y_train, feature_names=feature_names)

    print(clf_optimal_tree)

    return clf_optimal_tree

and I get the following

clf_optimal_tree.fit(X_train, y_train, feature_names=feature_names)

imodels/tree/gosdt/pygosdt.py", line 120, in fit
    gosdt.configure(json.dumps(configuration, separators=(',', ':')))
    ^^^^^^^^^^^^^^^
AttributeError: module 'gosdt' has no attribute 'configure'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions