KNN implements KNN
More...
◆ 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
-
uid | An immutable unique ID for the object and its derivatives. |
◆ Fit()
override KNNModel Synapse.ML.Nn.KNN.Fit |
( |
DataFrame |
dataset | ) |
|
Fits a model to the input data.
- Parameters
-
dataset | The 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
-
path | The 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
-
path | The path to save the object to |
◆ SetFeaturesCol()
KNN Synapse.ML.Nn.KNN.SetFeaturesCol |
( |
string |
value | ) |
|
Sets value for featuresCol
- Parameters
-
value | The name of the features column |
- Returns
- New KNN object
◆ SetK()
KNN Synapse.ML.Nn.KNN.SetK |
( |
int |
value | ) |
|
Sets value for k
- Parameters
-
value | number of matches to return |
- Returns
- New KNN object
◆ SetLeafSize()
KNN Synapse.ML.Nn.KNN.SetLeafSize |
( |
int |
value | ) |
|
Sets value for leafSize
- Parameters
-
value | max 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
-
value | The name of the output column |
- Returns
- New KNN object
◆ SetValuesCol()
KNN Synapse.ML.Nn.KNN.SetValuesCol |
( |
string |
value | ) |
|
Sets value for valuesCol
- Parameters
-
value | column 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: