FactorialDesign

open class FactorialDesign(factors: Set<Factor>, name: String? = null) : Identity, ExperimentalDesignIfc

A factorial design represents a list of design points where every design point represents a possible row in the cartesian product of the levels for the factors. That is, all possible combinations of the levels for the factors are possible design points. A design point is individually generated when needed via the associated iterator for the design.

Parameters

factors

a set representing the factors used in the design. There must be 2 factors in the supplied set.

name

an optional name for the design

Inheritors

Constructors

Link copied to clipboard
constructor(factors: Set<Factor>, name: String? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
open inner class FactorialDesignIterator(val numReps: Int? = null) : DesignPointIteratorIfc

This iterator should present each design point until all points in the design have been presented.

Properties

Link copied to clipboard
override val factorNames: List<String>

The names of the factors within a list.

Link copied to clipboard
open override val factors: Map<String, Factor>

The factors associated with the design held by name.

Link copied to clipboard
override val id: Int
Link copied to clipboard
open override var label: String?
Link copied to clipboard
override val name: String
Link copied to clipboard
Link copied to clipboard
open val numFactors: Int

The number of factor in the design

Functions

Link copied to clipboard

Makes a center point for the factors of the design in the original measurement units

Link copied to clipboard

Returns an iterator that produces the design points in order from 1 to the number of design points.

Link copied to clipboard

Returns all the design points in the experiment

Link copied to clipboard
open fun designPointsAsDataframe(coded: Boolean = false): AnyFrame

Returns the design points as a data frame. The columns of the data frame are the factor names and the rows are the design points.

Link copied to clipboard
open fun designPointsTo2DArray(coded: Boolean = false): Array<DoubleArray>

Returns all the design points based on the cartesian product of the factors and their levels as a 2D array. The rows of the array are the design points. The row array's 0th element represents the first factor in the list of factor names.

Link copied to clipboard
open fun designPointsToList(coded: Boolean = false): List<DoubleArray>

Returns all the design points based on the cartesian product of the factors and their levels. The element arrays of the returned list are the design points. The element array's 0th element represents the first factor in the list of factor names.

Link copied to clipboard
open fun factorName(k: Int): String

Returns the name of the factor. The first factor is at k = 1

Link copied to clipboard
open fun forEach(p0: Consumer<in DesignPoint>)
Link copied to clipboard
open fun isValid(settings: Map<Factor, Double>, enforceRange: Boolean = true): Boolean

Checks if the settings for the factors are valid for this design

Link copied to clipboard
open operator override fun iterator(): DesignPointIteratorIfc

Returns an iterator that produces the design points in order from 1 to the number of design points. Every des

Link copied to clipboard
open fun linearModel(type: LinearModel.Type = LinearModel.Type.FirstOrder): LinearModel

To facilitate the specification of a linear model for the design

Link copied to clipboard
Link copied to clipboard
open fun toCodedValues(rawValues: DoubleArray): DoubleArray

Converts the original values to code values

Link copied to clipboard
open fun toOriginalValues(codedValues: DoubleArray): DoubleArray

Converts the coded values to values on the original measurement scale.

Link copied to clipboard
open override fun toString(): String