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

org.conqat.lib.commons.datamining.FrequentItemSet Maven / Gradle / Ivy

There is a newer version: 2024.7.2
Show newest version
/*
 * Copyright (c) CQSE GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.conqat.lib.commons.datamining;

import java.util.Set;

/**
 * A frequent item set consists of a set of items and an associated support value between 0..1
 * indicating in what fraction of all baskets the frequent item set occurs.
 */
public class FrequentItemSet {

	/** The items */
	private final Set items;

	/** The confidence */
	private final double support;

	/** Constructor */
	public FrequentItemSet(Set items, double support) {
		this.items = items;
		this.support = support;
	}

	/** Returns the items. */
	public Set getItems() {
		return items;
	}

	/** Returns the support [0..1]. */
	public double getSupport() {
		return support;
	}

	/** {@inheritDoc} */
	@Override
	public String toString() {
		return items.toString() + "(" + support + ")";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy