Open hosford42 opened 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.
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.
Add support for scikit-learn interfaces. (See Machine Learning with scikit-learn.)
X
is anumpy
array withX.shape == (len(samples), len(features))
y
is anumpy
array withy.shape == (len(samples),)
To train the model:
model.fit(X, y)
To apply the model:
predictions = model.predict(X)
(predictions
is anumpy
array withpredictions.shape == y.shape
.)To score the model:
score = model.score(X, y)
(score
is a floating point in range[0, 1]
)