LostTech.TensorFlow : API Documentation

Type KMeansClustering

Namespace tensorflow_estimator.python.estimator.canned.kmeans

Parent Estimator

Interfaces IKMeansClustering

Public instance methods

object cluster_centers()

Returns the cluster centers.

object cluster_centers_dyn()

Returns the cluster centers.

IEnumerator<object> predict_cluster_index(ValueTuple<object, object, object> input_fn)

Finds the index of the closest cluster center to each input point.
Parameters
ValueTuple<object, object, object> input_fn
Input points. See tf.estimator.Estimator.predict.

IEnumerator<object> predict_cluster_index(PythonFunctionContainer input_fn)

Finds the index of the closest cluster center to each input point.
Parameters
PythonFunctionContainer input_fn
Input points. See tf.estimator.Estimator.predict.

object predict_cluster_index_dyn(object input_fn)

Finds the index of the closest cluster center to each input point.
Parameters
object input_fn
Input points. See tf.estimator.Estimator.predict.

object score(ValueTuple<object, object, object> input_fn)

Returns the sum of squared distances to nearest clusters.

Note that this function is different from the corresponding one in sklearn which returns the negative sum.
Parameters
ValueTuple<object, object, object> input_fn
Input points. See tf.estimator.Estimator.evaluate. Only one batch is retrieved.
Returns
object
The sum of the squared distance from each point in the first batch of inputs to its nearest cluster center.

object score(PythonFunctionContainer input_fn)

Returns the sum of squared distances to nearest clusters.

Note that this function is different from the corresponding one in sklearn which returns the negative sum.
Parameters
PythonFunctionContainer input_fn
Input points. See tf.estimator.Estimator.evaluate. Only one batch is retrieved.
Returns
object
The sum of the squared distance from each point in the first batch of inputs to its nearest cluster center.

object score_dyn(object input_fn)

Returns the sum of squared distances to nearest clusters.

Note that this function is different from the corresponding one in sklearn which returns the negative sum.
Parameters
object input_fn
Input points. See tf.estimator.Estimator.evaluate. Only one batch is retrieved.
Returns
object
The sum of the squared distance from each point in the first batch of inputs to its nearest cluster center.

IEnumerator<object> transform(ValueTuple<object, object, object> input_fn)

Transforms each input point to its distances to all cluster centers.

Note that if `distance_metric=KMeansClustering.SQUARED_EUCLIDEAN_DISTANCE`, this function returns the squared Euclidean distance while the corresponding sklearn function returns the Euclidean distance.
Parameters
ValueTuple<object, object, object> input_fn
Input points. See tf.estimator.Estimator.predict.

IEnumerator<object> transform(PythonFunctionContainer input_fn)

Transforms each input point to its distances to all cluster centers.

Note that if `distance_metric=KMeansClustering.SQUARED_EUCLIDEAN_DISTANCE`, this function returns the squared Euclidean distance while the corresponding sklearn function returns the Euclidean distance.
Parameters
PythonFunctionContainer input_fn
Input points. See tf.estimator.Estimator.predict.

object transform_dyn(object input_fn)

Transforms each input point to its distances to all cluster centers.

Note that if `distance_metric=KMeansClustering.SQUARED_EUCLIDEAN_DISTANCE`, this function returns the squared Euclidean distance while the corresponding sklearn function returns the Euclidean distance.
Parameters
object input_fn
Input points. See tf.estimator.Estimator.predict.

Public static methods

KMeansClustering NewDyn(object num_clusters, object model_dir, ImplicitContainer<T> initial_clusters, ImplicitContainer<T> distance_metric, object seed, ImplicitContainer<T> use_mini_batch, ImplicitContainer<T> mini_batch_steps_per_iteration, ImplicitContainer<T> kmeans_plus_plus_num_retries, object relative_tolerance, object config, object feature_columns)

Public properties

object ALL_DISTANCES_dyn get; set;

object CLUSTER_CENTERS_VAR_NAME_dyn get; set;

object CLUSTER_INDEX_dyn get; set;

object config get;

object config_dyn get;

object COSINE_DISTANCE_dyn get; set;

object KMEANS_PLUS_PLUS_INIT_dyn get; set;

object model_dir get;

object model_dir_dyn get;

object model_fn get;

object model_fn_dyn get;

object params get;

object params_dyn get;

object PythonObject get;

object RANDOM_INIT_dyn get; set;

object SCORE_dyn get; set;

object SQUARED_EUCLIDEAN_DISTANCE_dyn get; set;

Public fields

string SCORE

return string

string ALL_DISTANCES

return string

string CLUSTER_INDEX

return string