Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New_WriteStreamToARFFFile #244

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions moa/src/main/java/moa/tasks/WriteStreamToARFFFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
*/
package moa.tasks;

Expand All @@ -31,6 +31,7 @@
import com.github.javacliparser.IntOption;
import com.yahoo.labs.samoa.instances.InstanceImpl;
import com.yahoo.labs.samoa.instances.InstancesHeader;
import moa.streams.ExampleStream;
import moa.streams.InstanceStream;

/**
Expand All @@ -47,9 +48,9 @@ public String getPurposeString() {
}

private static final long serialVersionUID = 1L;

//Change InstanceStream to ExampleStream to handle with more tasks, such as FilteredStream.
public ClassOption streamOption = new ClassOption("stream", 's',
"Stream to write.", InstanceStream.class,
"Stream to write.", ExampleStream.class,
"generators.RandomTreeGenerator");

public FileOption arffFileOption = new FileOption("arffFile", 'f',
Expand All @@ -64,7 +65,7 @@ public String getPurposeString() {

@Override
protected Object doMainTask(TaskMonitor monitor, ObjectRepository repository) {
InstanceStream stream = (InstanceStream) getPreparedClassOption(this.streamOption);
ExampleStream stream = (ExampleStream) getPreparedClassOption(this.streamOption);
File destFile = this.arffFileOption.getFile();
if (destFile != null) {
try {
Expand Down