Synapseml  0.10.0
Public Member Functions | Static Public Member Functions | List of all members
Synapse.ML.Nn.KNN Class Reference

KNN implements KNN More...

Inheritance diagram for Synapse.ML.Nn.KNN:
Inheritance graph
[legend]
Collaboration diagram for Synapse.ML.Nn.KNN:
Collaboration graph
[legend]

Public Member Functions

 KNN ()
 Creates a KNN without any parameters. More...
 
 KNN (string uid)
 Creates a KNN with a UID that is used to give the KNN a unique ID. More...
 
KNN SetFeaturesCol (string value)
 Sets value for featuresCol More...
 
KNN SetK (int value)
 Sets value for k More...
 
KNN SetLeafSize (int value)
 Sets value for leafSize More...
 
KNN SetOutputCol (string value)
 Sets value for outputCol More...
 
KNN SetValuesCol (string value)
 Sets value for valuesCol More...
 
string GetFeaturesCol ()
 Gets featuresCol value More...
 
int GetK ()
 Gets k value More...
 
int GetLeafSize ()
 Gets leafSize value More...
 
string GetOutputCol ()
 Gets outputCol value More...
 
string GetValuesCol ()
 Gets valuesCol value More...
 
override KNNModel Fit (DataFrame dataset)
 Fits a model to the input data. More...
 
void Save (string path)
 Saves the object so that it can be loaded later using Load. Note that these objects can be shared with Scala by Loading or Saving in Scala. More...
 
JavaMLWriter Write ()
 
Returns
a JavaMLWriter instance for this ML instance.

 
JavaMLReader< KNNRead ()
 Get the corresponding JavaMLReader instance. More...
 

Static Public Member Functions

static KNN Load (string path)
 Loads the KNN that was previously saved using Save(string). More...
 

Detailed Description

KNN implements KNN

Constructor & Destructor Documentation

◆ KNN() [1/2]

Synapse.ML.Nn.KNN.KNN ( )
inline

Creates a KNN without any parameters.

◆ KNN() [2/2]

Synapse.ML.Nn.KNN.KNN ( string  uid)
inline

Creates a KNN with a UID that is used to give the KNN a unique ID.

Parameters
uidAn immutable unique ID for the object and its derivatives.

Member Function Documentation

◆ Fit()

override KNNModel Synapse.ML.Nn.KNN.Fit ( DataFrame  dataset)

Fits a model to the input data.

Parameters
datasetThe DataFrame to fit the model to.
Returns
KNNModel

◆ GetFeaturesCol()

string Synapse.ML.Nn.KNN.GetFeaturesCol ( )

Gets featuresCol value

Returns
featuresCol: The name of the features column

◆ GetK()

int Synapse.ML.Nn.KNN.GetK ( )

Gets k value

Returns
k: number of matches to return

◆ GetLeafSize()

int Synapse.ML.Nn.KNN.GetLeafSize ( )

Gets leafSize value

Returns
leafSize: max size of the leaves of the tree

◆ GetOutputCol()

string Synapse.ML.Nn.KNN.GetOutputCol ( )

Gets outputCol value

Returns
outputCol: The name of the output column

◆ GetValuesCol()

string Synapse.ML.Nn.KNN.GetValuesCol ( )

Gets valuesCol value

Returns
valuesCol: column holding values for each feature (key) that will be returned when queried

◆ Load()

static KNN Synapse.ML.Nn.KNN.Load ( string  path)
static

Loads the KNN that was previously saved using Save(string).

Parameters
pathThe path the previous KNN was saved to
Returns
New KNN object, loaded from path.

◆ Read()

JavaMLReader<KNN> Synapse.ML.Nn.KNN.Read ( )

Get the corresponding JavaMLReader instance.

Returns
an JavaMLReader<KNN> instance for this ML instance.

◆ Save()

void Synapse.ML.Nn.KNN.Save ( string  path)

Saves the object so that it can be loaded later using Load. Note that these objects can be shared with Scala by Loading or Saving in Scala.

Parameters
pathThe path to save the object to

◆ SetFeaturesCol()

KNN Synapse.ML.Nn.KNN.SetFeaturesCol ( string  value)

Sets value for featuresCol

Parameters
valueThe name of the features column
Returns
New KNN object

◆ SetK()

KNN Synapse.ML.Nn.KNN.SetK ( int  value)

Sets value for k

Parameters
valuenumber of matches to return
Returns
New KNN object

◆ SetLeafSize()

KNN Synapse.ML.Nn.KNN.SetLeafSize ( int  value)

Sets value for leafSize

Parameters
valuemax size of the leaves of the tree
Returns
New KNN object

◆ SetOutputCol()

KNN Synapse.ML.Nn.KNN.SetOutputCol ( string  value)

Sets value for outputCol

Parameters
valueThe name of the output column
Returns
New KNN object

◆ SetValuesCol()

KNN Synapse.ML.Nn.KNN.SetValuesCol ( string  value)

Sets value for valuesCol

Parameters
valuecolumn holding values for each feature (key) that will be returned when queried
Returns
New KNN object

The documentation for this class was generated from the following file: