hosford42 / xcs

Accuracy-based Learning Classifier Systems (XCS)
http://hosford42.github.io/xcs/
BSD 3-Clause "New" or "Revised" License
46 stars 18 forks source link

Support scikit-learn interoperability #17

Open hosford42 opened 9 years ago

hosford42 commented 9 years ago

Add support for scikit-learn interfaces. (See Machine Learning with scikit-learn.)

X is a numpy array with X.shape == (len(samples), len(features)) y is a numpy array with y.shape == (len(samples),)

To train the model: model.fit(X, y)

To apply the model: predictions = model.predict(X) (predictions is a numpy array with predictions.shape == y.shape.)

To score the model: score = model.score(X, y) (score is a floating point in range [0, 1])

hosford42 commented 9 years ago

Check out the Contributing page for scikit-learn. There is a lot of good advice there for ensuring the module is of high quality, and also how to get XCS added to the scikit-learn codebase. There is also a description of the APIs of scikit-learn objects.

hosford42 commented 9 years ago

I have created the scikit-learn branch for this. The appropriate way to map reinforcement learning algorithms to scikit-learn's APIs isn't clear. See Does scikit-learn have an API for reinforcement learning algorithms? for details. In the meantime, I am removing this issue from the "Prep for First Non-Alpha Release" milestone.