class SmartVectorAssembler extends Transformer
This Transformer creates a needed Dataframe for common ML approaches in Spark MLlib. The resulting Dataframe consists of a column features which is a numeric vector for each entity The other columns are a identifier column like the node id And optional column for label
- Alphabetic
- By Inheritance
- SmartVectorAssembler
- Transformer
- PipelineStage
- Logging
- Params
- Serializable
- Serializable
- Identifiable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SmartVectorAssembler()
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
-
var
_digitStringStrategy: String
- Attributes
- protected
-
var
_entityColumn: String
- Attributes
- protected
-
var
_featureColumns: List[String]
- Attributes
- protected
- var _featureVectorDescription: ListBuffer[String]
-
var
_labelColumn: String
- Attributes
- protected
-
var
_nullDigitReplacement: Int
- Attributes
- protected
-
var
_nullStringReplacement: String
- Attributes
- protected
-
var
_nullTimestampReplacement: Timestamp
- Attributes
- protected
-
var
_numericCollapsingStrategy: String
- Attributes
- protected
-
var
_stringCollapsingStrategy: String
- Attributes
- protected
-
var
_stringIndexerTrainingDfSizeRatio: Double
- Attributes
- protected
-
var
_word2VecMinCount: Int
- Attributes
- protected
-
var
_word2VecSize: Int
- Attributes
- protected
-
var
_word2vecTrainingDfSizeRatio: Double
- Attributes
- protected
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
clear(param: Param[_]): SmartVectorAssembler.this.type
- Definition Classes
- Params
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
copy(extra: ParamMap): Transformer
- Definition Classes
- SmartVectorAssembler → Transformer → PipelineStage → Params
-
def
copyValues[T <: Params](to: T, extra: ParamMap): T
- Attributes
- protected
- Definition Classes
- Params
-
final
def
defaultCopy[T <: Params](extra: ParamMap): T
- Attributes
- protected
- Definition Classes
- Params
-
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
-
final
def
get[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
getDefault[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
def
getFeatureVectorDescription(): ListBuffer[String]
get the description of explainable feature vector
get the description of explainable feature vector
- returns
ListBuffer of Strings, describing for each index of the KG the content
-
final
def
getOrDefault[T](param: Param[T]): T
- Definition Classes
- Params
-
def
getParam(paramName: String): Param[Any]
- Definition Classes
- Params
-
def
getSemanticTransformerDescription(): RDD[Triple]
gain all inforamtion from this transformer as knowledge graph
gain all inforamtion from this transformer as knowledge graph
- returns
RDD[Trile] describing the meta information
-
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() @HotSpotIntrinsicCandidate()
-
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
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
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
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
lazy val
params: Array[Param[_]]
- Definition Classes
- Params
-
final
def
set(paramPair: ParamPair[_]): SmartVectorAssembler.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
set(param: String, value: Any): SmartVectorAssembler.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
set[T](param: Param[T], value: T): SmartVectorAssembler.this.type
- Definition Classes
- Params
-
final
def
setDefault(paramPairs: ParamPair[_]*): SmartVectorAssembler.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
setDefault[T](param: Param[T], value: T): SmartVectorAssembler.this.type
- Attributes
- protected
- Definition Classes
- Params
-
def
setDigitStringStrategy(digitStringStrategy: String): SmartVectorAssembler.this.type
setter for of strategy to transform categorical strings to digit.
setter for of strategy to transform categorical strings to digit. option one is hash option two is index
- digitStringStrategy
strategy, either hash or index
- returns
transformer
-
def
setEntityColumn(p: String): SmartVectorAssembler.this.type
set which columns represents the entity if not set first column is used
set which columns represents the entity if not set first column is used
- p
entity columnName as string
- returns
set transformer
-
def
setFeatureColumns(p: List[String]): SmartVectorAssembler.this.type
set which columns represents the features, if not set all but label and entity are used
set which columns represents the features, if not set all but label and entity are used
- p
label columnName as string
- returns
set transformer
-
def
setLabelColumn(p: String): SmartVectorAssembler.this.type
set which columns represents the labl, if not set no label column
set which columns represents the labl, if not set no label column
- p
label columnName as string
- returns
set transformer
-
def
setNullReplacement(datatype: String, value: Any): SmartVectorAssembler.this.type
Set replacemnet for string or digit
-
def
setStringIndexerTrainingDfSizeRatio(stringIndexerTrainingDfSizeRatio: Double): SmartVectorAssembler.this.type
setter for ratio of training data in training string indexer
setter for ratio of training data in training string indexer
- stringIndexerTrainingDfSizeRatio
fraction in sampling of training data df
- returns
transformer
-
def
setWord2VecMinCount(word2VecMinCount: Int): SmartVectorAssembler.this.type
setter for feature non categorical strings which are replaced by a word to vec
setter for feature non categorical strings which are replaced by a word to vec
- word2VecMinCount
min number of min word occurencs
- returns
transformer
-
def
setWord2VecSize(word2vecSize: Int): SmartVectorAssembler.this.type
setter for feature non categorical strings which are replaced by a word to vec
setter for feature non categorical strings which are replaced by a word to vec
- word2vecSize
size of vector
- returns
transformer
-
def
setWord2vecTrainingDfSizeRatio(word2vecTrainingDfSizeRatio: Double): SmartVectorAssembler.this.type
setter for ratio of training data in traing word 2 vec model
setter for ratio of training data in traing word 2 vec model
- word2vecTrainingDfSizeRatio
fraction in sampling of training data df
- returns
transformer
-
val
spark: SparkSession
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Identifiable → AnyRef → Any
-
def
transform(dataset: Dataset[_]): DataFrame
transforms a dataframe of query results to a numeric feature vectors and a id and label column
transforms a dataframe of query results to a numeric feature vectors and a id and label column
- dataset
dataframe with columns for id features and optional label
- returns
dataframe with columns id features and optional label where features are numeric vectors which incooperate with mllib
- Definition Classes
- SmartVectorAssembler → Transformer
-
def
transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
- Definition Classes
- Transformer
- Annotations
- @Since( "2.0.0" )
-
def
transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
- Definition Classes
- Transformer
- Annotations
- @Since( "2.0.0" ) @varargs()
-
def
transformSchema(schema: StructType): StructType
- Definition Classes
- SmartVectorAssembler → PipelineStage
-
def
transformSchema(schema: StructType, logging: Boolean): StructType
- Attributes
- protected
- Definition Classes
- PipelineStage
- Annotations
- @DeveloperApi()
-
val
uid: String
- Definition Classes
- SmartVectorAssembler → Identifiable
-
def
validateEntityColumn(cols: Seq[String]): Unit
Validate set column to check if we need fallback to first column if not set and if set if it is in available cols
Validate set column to check if we need fallback to first column if not set and if set if it is in available cols
- cols
the available columns
-
def
validateFeatureColumns(cols: Seq[String]): Unit
validate the feature columns if feature columns are set, check if those are in avaiable columns if not raise exception if not set determine feature columns by all columns minus the label and entty column
-
def
validateLabelColumn(cols: Seq[String]): Unit
validate if label is in available columns
validate if label is in available columns
- cols
the avaiable columns
-
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()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
- Deprecated
(Since version ) see corresponding Javadoc for more information.