org.ranksys.javafm.data.FMData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JavaFM Show documentation
Show all versions of JavaFM Show documentation
Java 8 Factorization Machines Library.
The newest version!
/*
* Copyright (C) 2016 RankSys http://ranksys.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package org.ranksys.javafm.data;
import org.ranksys.javafm.FMInstance;
import java.util.stream.Stream;
/**
* Collection of instances.
*
* @author Saúl Vargas ([email protected])
*/
public interface FMData {
/**
* Returns number of instances.
*
* @return number of instances
*/
public int numInstances();
/**
* Returns Number of features of the instances.
*
* @return number of features
*/
public int numFeatures();
/**
* Shuffle the data, so that stream() results the instances in different order.
*/
public void shuffle();
/**
* Returns a stream of all instances.
*
* @return stream of all instances
*/
public Stream extends FMInstance> stream();
}