SlicedInverseRegression¶
- class otsliced.SlicedInverseRegression(*args)¶
SlicedInverseRegression algorithm.
- Parameters:
- X
openturns.Sample
Input sample
- y
openturns.Sample
Feature sample
- X
Examples
>>> import openturns as ot >>> import otsliced >>> N = 100 >>> X = ot.Normal([0.0] * 2, [0.1] * 2).getSample(N) >>> X += [[-i / (N - 1), 2 * i / (N - 1)] for i in range(N)] >>> X = X - X.computeMean() >>> f = ot.SymbolicFunction(['x1', 'x2'], ['4*(x1+2*x2)+2']) >>> Y = f(X) + ot.Normal(0.0, 0.2).getSample(N) >>> algo = otsliced.SlicedInverseRegression(X, Y) >>> algo.run() >>> transformation = algo.getResult().getTransformation()
Methods
Accessor to the object's name.
getId
()Accessor to the object's id.
Accessor to the number of modes.
getName
()Accessor to the object's name.
Accessor to the result.
Accessor to the object's shadowed id.
Accessor to the number of slices.
Accessor to the object's visibility state.
hasName
()Test if the object is named.
Test if the object has a distinguishable name.
run
()Run the algorithm.
setModesNumber
(modesNumber)Accessor to the number of modes.
setName
(name)Accessor to the object's name.
setShadowedId
(id)Accessor to the object's shadowed id.
setSliceNumber
(sliceNumber)Accessor to the number of slices.
setVisibility
(visible)Accessor to the object's visibility state.
- __init__(*args)¶
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getId()¶
Accessor to the object’s id.
- Returns:
- idint
Internal unique identifier.
- getModesNumber()¶
Accessor to the number of modes.
- Returns:
- modesNumberint
Number of modes retained.
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getResult()¶
Accessor to the result.
- Returns:
- result
otsliced.SlicedInverseRegressionResult
Result class
- result
- getShadowedId()¶
Accessor to the object’s shadowed id.
- Returns:
- idint
Internal unique identifier.
- getSliceNumber()¶
Accessor to the number of slices.
- Returns:
- sliceNumberint
Number of slices
- getVisibility()¶
Accessor to the object’s visibility state.
- Returns:
- visiblebool
Visibility flag.
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- hasVisibleName()¶
Test if the object has a distinguishable name.
- Returns:
- hasVisibleNamebool
True if the name is not empty and not the default one.
- run()¶
Run the algorithm.
- setModesNumber(modesNumber)¶
Accessor to the number of modes.
- Parameters:
- modesNumberint
Number of modes retained.
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
- setShadowedId(id)¶
Accessor to the object’s shadowed id.
- Parameters:
- idint
Internal unique identifier.
- setSliceNumber(sliceNumber)¶
Accessor to the number of slices.
- Parameters:
- sliceNumberint
Number of slices
- setVisibility(visible)¶
Accessor to the object’s visibility state.
- Parameters:
- visiblebool
Visibility flag.