from skmultiflow.data.data_stream import DataStream from skmultiflow.evaluation import EvaluatePrequential from skmultiflow.trees import HoeffdingTree stream = DataStream(X_train, y = y_train) stream.prepare_for_use() ht = HoeffdingTree() evaluator = EvaluatePrequential(show_plot=True, pretrain_size=5000, max_samples=20000, metrics = ['accuracy', 'running_time','model_size'], output_file='results.csv') evaluator.evaluate(stream=stream, model=ht);
show_plot=Falseyour code runs normally (is it correct?). It seems that your problem is related to the matplotlib backend used in jupyter. Probably the solution is to set a proper backend for your interactive plot
@jacobmontiel .. I think I figured it out, by taking your advise to set one of the Adaptive Random forest AdaptiveRandomForest(drift_detection_method=None). thank you
Glad to help.
@jacobmontiel Hi Jacob, is there a way that I can get access to the actual values predicted per data segment during the evaluations? I have 1 million SEAGen data points and need to perform McNemar's Statistical Significance formula which requires me to know which labels classifier A got incorrect vs classifier B.. etc. etc. As such I need to record the actual values predicted by each classifier.
If you are using an evaluator you can add
metrics to get predicted values. In this case you also need to set
n_wait=1. As a suggestion, in this case deactivate the plot as
n_wait=1 implies a high refresh rate in the plot which is a lot of overhead.
@automater0 I'm guessing the Kappa T stands for temporal. Bifet refers to it as Kper. see pg. 91 Bifet, A., Gavaldá, R., Holmes, G., & Pfahringer, B. (2017). Machine learning for data streams: with practical examples in MOA (Adaptive computation and machine learning series). MIT Press.
That is correct.
BatchIncrementalmodel. This is a simple class to show how you can do batch-incremental learning using batch methods from scikit-learn. But you are not restricted to models from that library.
EDDMexpect input data (error) encoded in the oposite way to
$ pip install -U git+https://github.com/scikit-multiflow/scikit-multiflow
Hi everyone, i have a problem related with plot_show. I set plot_show = True but it doesn't work. What should i do? Do you have any idea?
I have the same issue in Codelab, and could not solve it using %matplotlib inline nor %matplotlib notebook. Anyone tried this in codelab before?
# -*- coding: utf-8 -*- !pip install scikit-multiflow %matplotlib inline from skmultiflow.data import WaveformGenerator from skmultiflow.trees import HoeffdingTree from skmultiflow.evaluation import EvaluatePrequential # 1. Create a stream stream = WaveformGenerator() stream.prepare_for_use() # 2. Instantiate the HoeffdingTree classifier ht = HoeffdingTree() # 3. Setup the evaluator evaluator = EvaluatePrequential(show_plot=True, pretrain_size=200, max_samples=20000) # 4. Run evaluation evaluator.evaluate(stream=stream, model=ht)