All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bnd.math.domain.learning.TrainingSet Maven / Gradle / Ivy

The newest version!
package com.bnd.math.domain.learning;

import java.util.ArrayList;
import java.util.List;

/**
 * @author © Peter Banda
 * @since 2012
 */
public class TrainingSet {

	private List> trainingPairs = new ArrayList>();

	public TrainingSet() {
		// nothing to do
	}

	public List> getTrainingPairs() {
		return trainingPairs;
	}

	public void ListTrainingPairs(List> trainingPairs) {
		this.trainingPairs = trainingPairs;
	}

	public void addTrainingPair(TrainingPair trainingPair) {
		trainingPairs.add(trainingPair);
	}

	public void removeTrainingPair(TrainingPair trainingPair) {
		trainingPairs.remove(trainingPair);
	}

	public int getInputArity() {
		return !trainingPairs.isEmpty() ? trainingPairs.get(0).getInput().size() : 0;
	}

	public int getDesiredOutputArity() {
		return !trainingPairs.isEmpty() ? trainingPairs.get(0).getDesiredOutput().size() : 0;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy