class DoubleMLEstimator extends Estimator[DoubleMLModel] with ComplexParamsWritable with DoubleMLParams with SynapseMLLogging with Wrappable
Double ML estimators. The estimator follows the two stage process, where a set of nuisance functions are estimated in the first stage in a cross-fitting manner and a final stage estimates the average treatment effect (ATE) model. Our goal is to estimate the constant marginal ATE Theta(X)
In this estimator, the ATE is estimated by using the following estimating equations: .. math :: Y - \\E[Y | X, W] = \\Theta(X) \\cdot (T - \\E[T | X, W]) + \\epsilon
Thus if we estimate the nuisance functions :math:q(X, W) = \\E[Y | X, W]
and
:math:f(X, W)=\\E[T | X, W]
in the first stage, we can estimate the final stage ate for each
treatment t, by running a regression, minimizing the residual on residual square loss,
estimating Theta(X) is a final regression problem, regressing tilde{Y} on X and tilde{T})
.. math :: \\hat{\\theta} = \\arg\\min_{\\Theta}\ \E_n\\left[ (\\tilde{Y} - \\Theta(X) \\cdot \\tilde{T})^2 \\right]
Where
\\tilde{Y}=Y - \\E[Y | X, W]
and :math:\\tilde{T}=T-\\E[T | X, W]
denotes the
residual outcome and residual treatment.
The nuisance function :math:q
is a simple machine learning problem and
user can use setOutcomeModel to set an arbitrary sparkML model
that is internally used to solve this problem
The problem of estimating the nuisance function :math:f
is also a machine learning problem and
user can use setTreatmentModel to set an arbitrary sparkML model
that is internally used to solve this problem.
- Alphabetic
- By Inheritance
- DoubleMLEstimator
- Wrappable
- DotnetWrappable
- RWrappable
- PythonWrappable
- BaseWrappable
- SynapseMLLogging
- DoubleMLParams
- HasParallelismInjected
- HasParallelism
- HasWeightCol
- HasMaxIter
- HasFeaturesCol
- HasOutcomeCol
- HasTreatmentCol
- ComplexParamsWritable
- MLWritable
- Estimator
- PipelineStage
- Logging
- Params
- Serializable
- Serializable
- Identifiable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
$[T](param: Param[T]): T
- Attributes
- protected
- Definition Classes
- Params
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
awaitFutures[T](futures: Array[Future[T]]): Seq[T]
- Attributes
- protected
- Definition Classes
- HasParallelismInjected
-
lazy val
classNameHelper: String
- Attributes
- protected
- Definition Classes
- BaseWrappable
-
final
def
clear(param: Param[_]): DoubleMLEstimator.this.type
- Definition Classes
- Params
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
companionModelClassName: String
- Attributes
- protected
- Definition Classes
- BaseWrappable
-
val
confidenceLevel: DoubleParam
- Definition Classes
- DoubleMLParams
-
def
copy(extra: ParamMap): Estimator[DoubleMLModel]
- Definition Classes
- DoubleMLEstimator → Estimator → PipelineStage → Params
-
def
copyValues[T <: Params](to: T, extra: ParamMap): T
- Attributes
- protected
- Definition Classes
- Params
-
lazy val
copyrightLines: String
- Attributes
- protected
- Definition Classes
- BaseWrappable
-
final
def
defaultCopy[T <: Params](extra: ParamMap): T
- Attributes
- protected
- Definition Classes
- Params
-
def
dotnetAdditionalMethods: String
- Definition Classes
- DotnetWrappable
-
def
dotnetClass(): String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
lazy val
dotnetClassName: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
lazy val
dotnetClassNameString: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
lazy val
dotnetClassWrapperName: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
lazy val
dotnetCopyrightLines: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
def
dotnetExtraEstimatorImports: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
def
dotnetExtraMethods: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
lazy val
dotnetInternalWrapper: Boolean
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
def
dotnetMLReadWriteMethods: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
lazy val
dotnetNamespace: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
lazy val
dotnetObjectBaseClass: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
def
dotnetParamGetter(p: Param[_]): String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
def
dotnetParamGetters: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
def
dotnetParamSetter(p: Param[_]): String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
def
dotnetParamSetters: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
def
dotnetWrapAsTypeMethod: String
- Attributes
- protected
- Definition Classes
- DotnetWrappable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
explainParam(param: Param[_]): String
- Definition Classes
- Params
-
def
explainParams(): String
- Definition Classes
- Params
-
final
def
extractParamMap(): ParamMap
- Definition Classes
- Params
-
final
def
extractParamMap(extra: ParamMap): ParamMap
- Definition Classes
- Params
-
val
featuresCol: Param[String]
The name of the features column
The name of the features column
- Definition Classes
- HasFeaturesCol
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fit(dataset: Dataset[_]): DoubleMLModel
Fits the DoubleML model.
Fits the DoubleML model.
- dataset
The input dataset to train.
- returns
The trained DoubleML model, from which you can get Ate and Ci values
- Definition Classes
- DoubleMLEstimator → Estimator
-
def
fit(dataset: Dataset[_], paramMaps: Seq[ParamMap]): Seq[DoubleMLModel]
- Definition Classes
- Estimator
- Annotations
- @Since( "2.0.0" )
-
def
fit(dataset: Dataset[_], paramMap: ParamMap): DoubleMLModel
- Definition Classes
- Estimator
- Annotations
- @Since( "2.0.0" )
-
def
fit(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DoubleMLModel
- Definition Classes
- Estimator
- Annotations
- @Since( "2.0.0" ) @varargs()
-
final
def
get[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getConfidenceLevel: Double
- Definition Classes
- DoubleMLParams
-
final
def
getDefault[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
def
getExecutionContextProxy: ExecutionContext
- Definition Classes
- HasParallelismInjected
-
def
getFeaturesCol: String
- Definition Classes
- HasFeaturesCol
-
final
def
getMaxIter: Int
- Definition Classes
- HasMaxIter
-
final
def
getOrDefault[T](param: Param[T]): T
- Definition Classes
- Params
-
def
getOutcomeCol: String
- Definition Classes
- HasOutcomeCol
-
def
getOutcomeModel: Estimator[_ <: Model[_]]
- Definition Classes
- DoubleMLParams
-
def
getParallelism: Int
- Definition Classes
- HasParallelism
-
def
getParam(paramName: String): Param[Any]
- Definition Classes
- Params
-
def
getParamInfo(p: Param[_]): ParamInfo[_]
- Definition Classes
- BaseWrappable
-
def
getPayload(methodName: String, numCols: Option[Int], executionSeconds: Option[Double], exception: Option[Exception]): Map[String, String]
- Attributes
- protected
- Definition Classes
- SynapseMLLogging
-
def
getSampleSplitRatio: Array[Double]
- Definition Classes
- DoubleMLParams
-
def
getTreatmentCol: String
- Definition Classes
- HasTreatmentCol
-
def
getTreatmentModel: Estimator[_ <: Model[_]]
- Definition Classes
- DoubleMLParams
-
def
getWeightCol: String
- Definition Classes
- HasWeightCol
-
final
def
hasDefault[T](param: Param[T]): Boolean
- Definition Classes
- Params
-
def
hasParam(paramName: String): Boolean
- Definition Classes
- Params
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isDefined(param: Param[_]): Boolean
- Definition Classes
- Params
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
isSet(param: Param[_]): Boolean
- Definition Classes
- Params
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logBase(info: Map[String, String], featureName: Option[String]): Unit
- Attributes
- protected
- Definition Classes
- SynapseMLLogging
-
def
logBase(methodName: String, numCols: Option[Int], executionSeconds: Option[Double], featureName: Option[String]): Unit
- Attributes
- protected
- Definition Classes
- SynapseMLLogging
-
def
logClass(featureName: String): Unit
- Definition Classes
- SynapseMLLogging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logErrorBase(methodName: String, e: Exception): Unit
- Attributes
- protected
- Definition Classes
- SynapseMLLogging
-
def
logFit[T](f: ⇒ T, columns: Int): T
- Definition Classes
- SynapseMLLogging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTransform[T](f: ⇒ T, columns: Int): T
- Definition Classes
- SynapseMLLogging
-
def
logVerb[T](verb: String, f: ⇒ T, columns: Option[Int] = None): T
- Definition Classes
- SynapseMLLogging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
makeDotnetFile(conf: CodegenConfig): Unit
- Definition Classes
- DotnetWrappable
-
def
makePyFile(conf: CodegenConfig): Unit
- Definition Classes
- PythonWrappable
-
def
makeRFile(conf: CodegenConfig): Unit
- Definition Classes
- RWrappable
-
final
val
maxIter: IntParam
- Definition Classes
- HasMaxIter
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
outcomeCol: Param[String]
- Definition Classes
- HasOutcomeCol
-
val
outcomeModel: EstimatorParam
- Definition Classes
- DoubleMLParams
-
val
parallelism: IntParam
- Definition Classes
- HasParallelism
-
lazy val
params: Array[Param[_]]
- Definition Classes
- Params
-
def
pyAdditionalMethods: String
- Definition Classes
- PythonWrappable
-
lazy val
pyClassDoc: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
lazy val
pyClassName: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyExtraEstimatorImports: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyExtraEstimatorMethods: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
lazy val
pyInheritedClasses: Seq[String]
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyInitFunc(): String
- Definition Classes
- PythonWrappable
-
lazy val
pyInternalWrapper: Boolean
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
lazy val
pyObjectBaseClass: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyParamArg[T](p: Param[T]): String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyParamDefault[T](p: Param[T]): Option[String]
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyParamGetter(p: Param[_]): String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyParamSetter(p: Param[_]): String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyParamsArgs: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyParamsDefaults: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
lazy val
pyParamsDefinitions: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyParamsGetters: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pyParamsSetters: String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
pythonClass(): String
- Attributes
- protected
- Definition Classes
- PythonWrappable
-
def
rClass(): String
- Attributes
- protected
- Definition Classes
- RWrappable
-
def
rDocString: String
- Attributes
- protected
- Definition Classes
- RWrappable
-
def
rExtraBodyLines: String
- Attributes
- protected
- Definition Classes
- RWrappable
-
def
rExtraInitLines: String
- Attributes
- protected
- Definition Classes
- RWrappable
-
lazy val
rFuncName: String
- Attributes
- protected
- Definition Classes
- RWrappable
-
lazy val
rInternalWrapper: Boolean
- Attributes
- protected
- Definition Classes
- RWrappable
-
def
rParamArg[T](p: Param[T]): String
- Attributes
- protected
- Definition Classes
- RWrappable
-
def
rParamsArgs: String
- Attributes
- protected
- Definition Classes
- RWrappable
-
def
rSetterLines: String
- Attributes
- protected
- Definition Classes
- RWrappable
-
val
sampleSplitRatio: DoubleArrayParam
- Definition Classes
- DoubleMLParams
-
def
save(path: String): Unit
- Definition Classes
- MLWritable
- Annotations
- @Since( "1.6.0" ) @throws( ... )
-
final
def
set(paramPair: ParamPair[_]): DoubleMLEstimator.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
set(param: String, value: Any): DoubleMLEstimator.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
set[T](param: Param[T], value: T): DoubleMLEstimator.this.type
- Definition Classes
- Params
-
def
setConfidenceLevel(value: Double): DoubleMLEstimator.this.type
Set the higher bound percentile of ATE distribution.
Set the higher bound percentile of ATE distribution. Default is 0.975. lower bound value will be automatically calculated as 100*(1-confidenceLevel) That means by default we compute 95% confidence interval, it is [2.5%, 97.5%] percentile of ATE distribution
- Definition Classes
- DoubleMLParams
-
final
def
setDefault(paramPairs: ParamPair[_]*): DoubleMLEstimator.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
setDefault[T](param: Param[T], value: T): DoubleMLEstimator.this.type
- Attributes
- protected[org.apache.spark.ml]
- Definition Classes
- Params
-
def
setFeaturesCol(value: String): DoubleMLEstimator.this.type
- Definition Classes
- HasFeaturesCol
-
def
setMaxIter(value: Int): DoubleMLEstimator.this.type
Set the maximum number of confidence interval bootstrapping iterations.
Set the maximum number of confidence interval bootstrapping iterations. Default is 1, which means it does not calculate confidence interval. To get Ci values please set a meaningful value
- Definition Classes
- DoubleMLParams
-
def
setOutcomeCol(value: String): DoubleMLEstimator.this.type
Set name of the column which will be used as outcome
Set name of the column which will be used as outcome
- Definition Classes
- HasOutcomeCol
-
def
setOutcomeModel(value: Estimator[_ <: Model[_]]): DoubleMLEstimator.this.type
Set outcome model, it could be any model derived from 'org.apache.spark.ml.regression.Regressor' or 'org.apache.spark.ml.classification.ProbabilisticClassifier'
Set outcome model, it could be any model derived from 'org.apache.spark.ml.regression.Regressor' or 'org.apache.spark.ml.classification.ProbabilisticClassifier'
- Definition Classes
- DoubleMLParams
-
def
setParallelism(value: Int): DoubleMLEstimator.this.type
- Definition Classes
- DoubleMLParams
-
def
setSampleSplitRatio(value: Array[Double]): DoubleMLEstimator.this.type
Set the sample split ratio, default is Array(0.5, 0.5)
Set the sample split ratio, default is Array(0.5, 0.5)
- Definition Classes
- DoubleMLParams
-
def
setTreatmentCol(value: String): DoubleMLEstimator.this.type
Set name of the column which will be used as treatment
Set name of the column which will be used as treatment
- Definition Classes
- HasTreatmentCol
-
def
setTreatmentModel(value: Estimator[_ <: Model[_]]): DoubleMLEstimator.this.type
Set treatment model, it could be any model derived from 'org.apache.spark.ml.regression.Regressor' or 'org.apache.spark.ml.classification.ProbabilisticClassifier'
Set treatment model, it could be any model derived from 'org.apache.spark.ml.regression.Regressor' or 'org.apache.spark.ml.classification.ProbabilisticClassifier'
- Definition Classes
- DoubleMLParams
-
def
setWeightCol(value: String): DoubleMLEstimator.this.type
- Definition Classes
- HasWeightCol
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
thisStage: Params
- Attributes
- protected
- Definition Classes
- BaseWrappable
-
def
toString(): String
- Definition Classes
- Identifiable → AnyRef → Any
-
def
transformSchema(schema: StructType): StructType
- Definition Classes
- DoubleMLEstimator → PipelineStage
- Annotations
- @DeveloperApi()
-
def
transformSchema(schema: StructType, logging: Boolean): StructType
- Attributes
- protected
- Definition Classes
- PipelineStage
- Annotations
- @DeveloperApi()
-
val
treatmentCol: Param[String]
- Definition Classes
- HasTreatmentCol
-
val
treatmentModel: EstimatorParam
- Definition Classes
- DoubleMLParams
-
val
uid: String
- Definition Classes
- DoubleMLEstimator → SynapseMLLogging → Identifiable
-
def
validateColTypeWithModel(dataset: Dataset[_], colName: String, model: Estimator[_]): Unit
- Attributes
- protected
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
weightCol: Param[String]
The name of the weight column
The name of the weight column
- Definition Classes
- HasWeightCol
-
def
write: MLWriter
- Definition Classes
- ComplexParamsWritable → MLWritable