public static class KMeans2.KMeans2Model extends Model implements Job.Progress
Model.ModelAutobufferSerializer, Model.ModelCategory
Modifier and Type | Field and Description |
---|---|
Key |
_clustersKey |
double[][] |
centers |
static DocGen.FieldDoc[] |
DOC_FIELDS |
int |
iterations |
int |
k |
int |
max_iter |
boolean |
normalized |
long[] |
size |
double |
total_within_SS |
double[] |
within_cluster_variances |
_dataKey, _domains, _have_cv_results, _modelClassDist, _names, _priorClassDist, GEN_BENCHMARK_CODE, training_duration_in_ms, training_start_time, warnings
Constructor and Description |
---|
KMeans2.KMeans2Model(KMeans2 params,
Key selfKey,
Key dataKey,
java.lang.String[] names,
java.lang.String[][] domains) |
Modifier and Type | Method and Description |
---|---|
Futures |
delete_impl(Futures fs)
Remove any Model internal Keys
|
KMeans2 |
get_params() |
boolean |
isSupervised() |
Request2 |
job() |
double |
mse()
Returns mse for validation set.
|
int |
nfeatures()
Returns number of input features
|
float |
progress() |
java.lang.String |
responseName() |
protected float[] |
score0(Chunk[] chunks,
int rowInChunk,
double[] tmp,
float[] preds)
Bulk scoring API for one row.
|
protected float[] |
score0(double[] data,
float[] preds)
Subclasses implement the scoring logic.
|
adapt, adapt, addWarning, calcError, classNames, cm, errStr, getDomainMapping, getDomainMapping, getModelCategory, getModelSerializer, getUniqueId, hasCrossValModels, isClassifier, missingColumnsType, nclasses, printCrossValidationModelsHTML, score, score, score, score, score, score, scoreCrossValidation, scoreImpl, setCrossValidationError, setModelClassDistribution, start_training, start_training, stop_training, testJavaScoring, toJava, toJava, toJavaDefaultMaxIters, toJavaFillPreds0, toJavaInit, toJavaInit, toJavaNCLASSES, toJavaPredictBody, toJavaSuper, toJavaUnifyPreds, varimp
delete_and_lock, delete, delete, delete, delete, is_unlocked, is_wlocked, read_lock, read_lock, unlock_all, unlock_lockable, unlock, update, write_lock
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields
public static DocGen.FieldDoc[] DOC_FIELDS
@Request.API(help="Cluster centers, always denormalized") public double[][] centers
@Request.API(help="Sum of within cluster sum of squares") public double total_within_SS
@Request.API(help="Number of clusters") public int k
@Request.API(help="Numbers of observations in each cluster.") public long[] size
@Request.API(help="Whether data was normalized") public boolean normalized
@Request.API(help="Maximum number of iterations before stopping") public int max_iter
@Request.API(help="Iterations the algorithm ran") public int iterations
@Request.API(help="Within cluster sum of squares per cluster") public double[] within_cluster_variances
@Request.API(help="The row-by-row cluster assignments") public final Key _clustersKey
public final KMeans2 get_params()
get_params
in class Model
public double mse()
Model
public float progress()
progress
in interface Job.Progress
protected float[] score0(Chunk[] chunks, int rowInChunk, double[] tmp, float[] preds)
Model
protected float[] score0(double[] data, float[] preds)
Model
public int nfeatures()
Model
public boolean isSupervised()
isSupervised
in class Model
public java.lang.String responseName()
responseName
in class Model
public Futures delete_impl(Futures fs)
delete_impl
in class Model