public class GLM2 extends Job.ModelJobWithoutClassificationField
| Modifier and Type | Class and Description |
|---|---|
static class |
GLM2.GLMGrid |
class |
GLM2.GLMGridSearch |
static class |
GLM2.ParallelGLMs |
static class |
GLM2.Source |
Job.ChunkProgress, Job.ChunkProgressJob, Job.ColumnsJob, Job.ColumnsResJob, Job.Fail, Job.FrameJob, Job.JobCancelledException, Job.JobHandle, Job.JobState, Job.List, Job.ModelJob, Job.ModelJobWithoutClassificationField, Job.Progress, Job.ProgressMonitor, Job.ValidatedJobRequest2.ColumnSelect, Request2.Dependent, Request2.DoClassBoolean, Request2.DRFCopyDataBoolean, Request2.MultiVecSelect, Request2.MultiVecSelectType, Request2.SpecialVecSelect, Request2.TypeaheadKey, Request2.VecClassSelect, Request2.VecSelectRequest.API, Request.Default, Request.Filter, Request.Validator<V>RequestBuilders.ArrayBuilder, RequestBuilders.ArrayHeaderRowBuilder, RequestBuilders.ArrayRowBuilder, RequestBuilders.ArrayRowElementBuilder, RequestBuilders.ArrayRowSingleColBuilder, RequestBuilders.BooleanStringBuilder, RequestBuilders.Builder, RequestBuilders.ElementBuilder, RequestBuilders.HideBuilder, RequestBuilders.KeyCellBuilder, RequestBuilders.KeyElementBuilder, RequestBuilders.KeyLinkElementBuilder, RequestBuilders.KeyMinAvgMaxBuilder, RequestBuilders.NoCaptionObjectBuilder, RequestBuilders.ObjectBuilder, RequestBuilders.PaginatedTable, RequestBuilders.PreFormattedBuilder, RequestBuilders.Response, RequestBuilders.ResponseInfo, RequestBuilders.WarningCellBuilderRequestArguments.Argument<T>, RequestArguments.Bool, RequestArguments.ClassifyBool, RequestArguments.DRFCopyDataBool, RequestArguments.EnumArgument<T extends java.lang.Enum<T>>, RequestArguments.ExistingFile, RequestArguments.FrameClassVec, RequestArguments.FrameKeyMultiVec, RequestArguments.FrameKeyVec, RequestArguments.GeneralFile, RequestArguments.H2OExistingKey, RequestArguments.H2OIllegalArgumentException, RequestArguments.H2OKey, RequestArguments.H2OKey2, RequestArguments.InputCheckBox, RequestArguments.InputSelect<T>, RequestArguments.InputText<T>, RequestArguments.Int, RequestArguments.LongInt, RequestArguments.MultipleSelect<T>, RequestArguments.MultipleText<T>, RequestArguments.NumberSequence, RequestArguments.NumberSequenceFloat, RequestArguments.Real, RequestArguments.Record<T>, RequestArguments.RSeq, RequestArguments.RSeqFloat, RequestArguments.Str, RequestArguments.StringList, RequestArguments.TypeaheadInputText<T>RequestStatics.RequestTypeConstants.Extensions, Constants.Schemes, Constants.Suffixes| Modifier and Type | Field and Description |
|---|---|
boolean |
_done |
GLMParams |
_glm |
java.lang.String |
_jobName |
static java.text.DecimalFormat |
AIC_DFORMAT |
protected double[] |
alpha |
static java.text.DecimalFormat |
AUC_DFORMAT |
protected Frame |
beta_constraints |
protected double |
beta_epsilon |
static double |
c1 |
static double |
DEFAULT_BETA_EPS |
double |
DEFAULT_LAMBDA |
static java.text.DecimalFormat |
DEV_EXPLAINED_DFORMAT |
static DocGen.FieldDoc[] |
DOC_FIELDS |
static java.lang.String |
DOC_GET |
protected GLMParams.Family |
family |
protected boolean |
higher_accuracy |
protected boolean |
intercept |
protected double[] |
lambda |
protected double |
lambda_min_ratio |
protected boolean |
lambda_search |
protected GLMParams.Link |
link |
static double |
LS_STEP |
int |
max_iter |
int |
MAX_ITERATIONS_PER_LAMBDA |
protected int |
max_predictors |
static int |
MAX_PREDICTORS |
protected int |
n_folds |
protected int |
nlambdas |
protected boolean |
non_negative |
Vec |
offset |
protected double |
prior |
protected boolean |
standardize |
protected boolean |
strong_rules |
float[] |
thresholds |
protected double |
tweedie_variance_power |
protected boolean |
use_all_factor_levels |
boolean |
variable_importances
Whether to compute variable importances for input features, based on the absolute
value of the coefficients.
|
responsecols, ignored_cols, ignored_cols_by_namesource_cv, _fjtask, description, destination_key, end_time, exception, job_key, LIST, start_time, state_parms, response_info_requestHelp, SUPPORTS_ONLY_V1, SUPPORTS_ONLY_V2, SUPPORTS_V1_V2ARRAY_BUILDER, ARRAY_HEADER_ROW_BUILDER, ARRAY_ROW_BUILDER, ARRAY_ROW_ELEMENT_BUILDER, ARRAY_ROW_SINGLECOL_BUILDER, ELEMENT_BUILDER, GSON_BUILDER, OBJECT_BUILDER, ROOT_OBJECT_queryHtml_argumentsALPHA, ARGUMENTS, AUC, BASE, BEST_THRESHOLD, BETA_EPS, BIN_LIMIT, BROWSE, BUCKET, BUILT_IN_KEY_JOBS, CANCELLED, CARDINALITY, CASE, CASE_MODE, CHUNK, CLASS, CLOUD_HEALTH, CLOUD_NAME, CLOUD_SIZE, CLOUD_UPTIME_MILLIS, CLUSTERS, COEFFICIENTS, COL_INDEX, COLS, COLUMN_NAME, COLUMNS_DISPLAY, CONSENSUS, CONTENTS, COUNT, DATA_KEY, DEPTH, DESCRIPTION, DEST_KEY, DTHRESHOLDS, ELAPSED, END_TIME, ENUM_DOMAIN_SIZE, ERROR, ESCAPE_NAN, EXCLUSIVE_SPLIT_LIMIT, EXPRESSION, FAILED, FAMILY, FEATURES, FILE, FILES, FILTER, FIRST_CHUNK, FJ_QUEUE_HI, FJ_QUEUE_LO, FJ_THREADS_HI, FJ_THREADS_LO, FREE_DISK, FREE_MEM, GFLOPS, HEADER, HEIGHT, HELP, IGNORE, ITEMS, ITERATIVE_CM, JOB, JOB_KEY, JOBS, JSON_H2O, KEY, KEYS, LAMBDA, LAST_CONTACT, LIMIT, LINK, LOCKED, MAX, MAX_DISK, MAX_ITER, MAX_MEM, MAX_ROWS, MEAN, MEM_BW, MIN, MODEL_KEY, MODELS, MORE, MTRY, MTRY_NODES, NAME, NEG_X, NO_CM, NODE, NODE_HEALTH, NODE_NAME, NODES, NORMALIZE, NUM_COLS, NUM_CPUS, NUM_FAILED, NUM_KEYS, NUM_MISSING_VALUES, NUM_ROWS, NUM_SUCCEEDED, NUM_TREES, OBJECT, OFFSET, OOBEE, PARALLEL, PARSER_TYPE, PATH, PREVIEW, PREVIOUS_MODEL_KEY, PRIOR, PROGRESS, PROGRESS_KEY, PROGRESS_TOTAL, REDIRECT, REDIRECT_ARGS, REPLICATION_FACTOR, REQUEST_TIME, RESPONSE, RHO, ROW, ROW_SIZE, ROWS, RPCS, SAMPLE, SAMPLING_STRATEGY, SCALE, SEED, SENT_ROWS, SEPARATOR, SIZE, SOURCE_KEY, STACK_TRACES, START_TIME, STAT_TYPE, STATUS, STEP, STRATA_SAMPLES, SUCCEEDED, SYSTEM_LOAD, TASK_KEY, TCPS_ACTIVE, TCPS_DUTY, TIME, TO_ENUM, TOT_MEM, TREE_COUNT, TREE_DEPTH, TREE_LEAVES, TREE_NUM, TREES, TWEEDIE_POWER, TYPE, URL, USE_NON_LOCAL_DATA, VALUE, VALUE_SIZE, VALUE_TYPE, VARIANCE, VERSION, VIEW, WARNINGS, WEIGHT, WEIGHTS, WIDTH, X, XVAL, Y| Constructor and Description |
|---|
GLM2() |
GLM2(java.lang.String desc,
Key jobKey,
Key dest,
GLM2.Source src,
GLMParams.Family family) |
GLM2(java.lang.String desc,
Key jobKey,
Key dest,
GLM2.Source src,
GLMParams.Family family,
GLMParams.Link l) |
GLM2(java.lang.String desc,
Key jobKey,
Key dest,
GLM2.Source src,
GLMParams.Family family,
GLMParams.Link l,
int nfolds,
boolean highAccuracy) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
aicStr(double aic) |
static java.lang.String |
aucStr(double auc) |
void |
cancel(java.lang.String msg)
Signal exceptional cancellation of this job.
|
protected double |
checkGradient(double[] newBeta,
double[] grad) |
protected void |
checkKKTAndComplete(jsr166y.CountedCompleter cc,
GLMTask.GLMIterationTask glmt,
double[] newBeta,
boolean failedLineSearch) |
protected void |
cleanup()
Clean-up code which is executed after each
Func.exec() call in any case (normal/exceptional). |
Key |
defaultDestKey() |
Key |
defaultJobKey() |
static java.lang.String |
devExplainedStr(double dev) |
GLM2 |
doInit() |
protected boolean |
filterNaCols() |
GLM2 |
fork()
Forks computation of this job.
|
GLM2 |
fork(H2O.H2OCountedCompleter cc) |
GLM2.GLMGridSearch |
gridSearch() |
void |
init()
Invoked before job runs.
|
protected double |
l1norm(double[] beta) |
protected double |
l2norm(double[] beta) |
static java.lang.String |
link(Key k,
java.lang.String content)
Return the query link to this page
|
protected boolean |
needLineSearch(double step,
double objOld,
double objNew,
double[] pk,
double[] gradOld) |
protected boolean |
needLineSearch(GLMTask.GLMIterationTask glmt) |
double |
nextLambdaValue() |
float |
progress()
Return progress of this job.
|
protected void |
registered(RequestServer.API_VERSION ver)
Iterates over fields and their annotations, and creates argument handlers.
|
void |
run(boolean doLog,
H2O.H2OCountedCompleter cmp) |
protected RequestBuilders.Response |
serve()
Implements UI call.
|
protected NanoHTTPD.Response |
serveGrid(NanoHTTPD server,
java.util.Properties parms,
RequestStatics.RequestType type) |
GLM2 |
setBetaConstraints(Frame f) |
GLM2 |
setHighAccuracy() |
void |
setLambda(double l) |
GLM2 |
setNonNegative(boolean val) |
GLM2 |
setRegularization(double[] alpha,
double[] lambda) |
void |
setTweediePower(double pwr) |
dontweave.gson.JsonObject |
toJSON()
Annotate the name of the response column in the job parameter JSON
|
selectFrame, selectVecsall, cancel, cancel, checkIdx, dest, findJob, findJobByDest, get, getState, gridParallelism, hygiene, hygiene, invoke, isCancelledOrCrashed, isCrashed, isDone, isEnded, isRunning, isRunning, onCancelled, redirect, remove, runTimeMs, self, speedDescription, speedValue, start, waitUntilJobEnded, waitUntilJobEndedcreate, fillResponseInfo, find, input, logStart, makeJsonBox, servePublic, set, split, superServeGrid, supportedVersions, toJSON, toStringaddToNavbar, addToNavbar, addToNavbar, DocExampleFail, DocExampleSucc, href, href, hrefType, HTMLHelp, htmlTemplate, initializeNavBar, log, mapTypeahead, ReSTHelp, serve, serveJava, serveResponse, toDocGET, toHTML, toJava, wrap, wrap, wrap, writeJSONFieldsbuild, buildJSONResponseBox, buildResponseHeader, namebuildQuery, checkArguments, queryArgumentValueSetarguments, argumentsToJson, frameColumnNameToIndexcheckJsonName, encodeRedirectArgs, JSON2HTML, jsonError, requestName, Str2JSONclone, frozenType, init, newInstance, read, toDocField, write, writeJSONpublic static final double LS_STEP
public static DocGen.FieldDoc[] DOC_FIELDS
public static final java.lang.String DOC_GET
public final java.lang.String _jobName
public transient boolean _done
@Request.API(help="Column to be used as an offset, if you have one.", required=false, filter=hex.glm.GLM2.responseFilter.class, json=true) public Vec offset
@Request.API(help="Family.", filter=Request.Default.class, json=true, importance=CRITICAL) protected GLMParams.Family family
@Request.API(help="", filter=Request.Default.class, json=true, importance=SECONDARY) protected GLMParams.Link link
@Request.API(help="Tweedie variance power", filter=Request.Default.class, json=true, importance=SECONDARY) protected double tweedie_variance_power
@Request.API(help="prior probability for y==1. To be used only for logistic regression iff the data has been sampled and the mean of response does not reflect reality.", filter=Request.Default.class, importance=EXPERT) protected double prior
@Request.API(help="validation folds", filter=Request.Default.class, lmin=0L, lmax=100L, json=true, importance=CRITICAL) protected int n_folds
@Request.API(help="distribution of regularization between L1 and L2.", filter=Request.Default.class, json=true, importance=SECONDARY) protected double[] alpha
public final double DEFAULT_LAMBDA
@Request.API(help="regularization strength", filter=Request.Default.class, json=true, importance=SECONDARY) protected double[] lambda
@Request.API(help="use lambda search starting at lambda max, given lambda is then interpreted as lambda min", filter=Request.Default.class, importance=SECONDARY) protected boolean lambda_search
@Request.API(help="number of lambdas to be used in a search", filter=Request.Default.class, importance=EXPERT) protected int nlambdas
@Request.API(help="min lambda used in lambda search, specified as a ratio of lambda_max", filter=Request.Default.class, importance=EXPERT) protected double lambda_min_ratio
@Request.API(help="lambda_search stop condition: stop training when model has more than than this number of predictors (or don\'t use this option if -1).", filter=Request.Default.class, importance=EXPERT) protected int max_predictors
public int MAX_ITERATIONS_PER_LAMBDA
@Request.API(help="use strong rules to filter out inactive columns", filter=Request.Default.class, importance=SECONDARY) protected boolean strong_rules
@Request.API(help="Standardize numeric columns to have zero mean and unit variance.", filter=Request.Default.class, json=true, importance=CRITICAL) protected boolean standardize
@Request.API(help="Include intercept term in the model.", filter=Request.Default.class, json=true, importance=CRITICAL) protected boolean intercept
@Request.API(help="Restrict coefficients to be non-negative.", filter=Request.Default.class, json=true, importance=CRITICAL) protected boolean non_negative
@Request.API(help="lower bounds for coefficients", filter=Request.Default.class, hide=true) protected Frame beta_constraints
@Request.API(help="By default, first factor level is skipped from the possible set of predictors. Set this flag if you want use all of the levels. Needs sufficient regularization to solve!", filter=Request.Default.class, importance=SECONDARY) protected boolean use_all_factor_levels
@Request.API(help="Compute variable importances for input features. NOTE: If use_all_factor_levels is off the importance of the base level will NOT be shown.", filter=Request.Default.class, json=true, importance=SECONDARY) public boolean variable_importances
@Request.API(help="beta_eps", filter=Request.Default.class, json=true, importance=SECONDARY) protected double beta_epsilon
@Request.API(help="max-iterations", filter=Request.Default.class, lmin=1L, lmax=1000000L, json=true, importance=CRITICAL) public int max_iter
@Request.API(help="use line search (slower speed, to be used if glm does not converge otherwise)", filter=Request.Default.class, importance=SECONDARY) protected boolean higher_accuracy
public static int MAX_PREDICTORS
public GLMParams _glm
public static final double DEFAULT_BETA_EPS
public transient float[] thresholds
public static final double c1
public static final java.text.DecimalFormat AUC_DFORMAT
public static final java.text.DecimalFormat AIC_DFORMAT
public static final java.text.DecimalFormat DEV_EXPLAINED_DFORMAT
public GLM2()
public GLM2(java.lang.String desc,
Key jobKey,
Key dest,
GLM2.Source src,
GLMParams.Family family)
public GLM2(java.lang.String desc,
Key jobKey,
Key dest,
GLM2.Source src,
GLMParams.Family family,
GLMParams.Link l)
public GLM2(java.lang.String desc,
Key jobKey,
Key dest,
GLM2.Source src,
GLMParams.Family family,
GLMParams.Link l,
int nfolds,
boolean highAccuracy)
public void setTweediePower(double pwr)
public void setLambda(double l)
public GLM2 setHighAccuracy()
protected void registered(RequestServer.API_VERSION ver)
Request2registered in class Job.ColumnsResJobpublic dontweave.gson.JsonObject toJSON()
Job.ColumnsResJobtoJSON in class Job.ColumnsResJobpublic Key defaultDestKey()
defaultDestKey in class Jobpublic Key defaultJobKey()
defaultJobKey in class Jobpublic GLM2 doInit()
public GLM2 setNonNegative(boolean val)
public GLM2 setRegularization(double[] alpha, double[] lambda)
public static java.lang.String link(Key k, java.lang.String content)
public GLM2.GLMGridSearch gridSearch()
public void cancel(java.lang.String msg)
Jobpublic void init()
Jobinit in class Job.ColumnsResJobprotected void cleanup()
FuncFunc.exec() call in any case (normal/exceptional).protected boolean filterNaCols()
filterNaCols in class Request2protected RequestBuilders.Response serve()
RequestThis should be call only from UI layer - i.e., RequestServer.
serve in class JobRequestServerpublic float progress()
Jobprotected double l2norm(double[] beta)
protected double l1norm(double[] beta)
protected boolean needLineSearch(GLMTask.GLMIterationTask glmt)
protected final boolean needLineSearch(double step,
double objOld,
double objNew,
double[] pk,
double[] gradOld)
protected double checkGradient(double[] newBeta,
double[] grad)
protected void checkKKTAndComplete(jsr166y.CountedCompleter cc,
GLMTask.GLMIterationTask glmt,
double[] newBeta,
boolean failedLineSearch)
public GLM2 fork()
JobThe call does not block.
public GLM2 fork(H2O.H2OCountedCompleter cc)
public void run(boolean doLog,
H2O.H2OCountedCompleter cmp)
public double nextLambdaValue()
protected NanoHTTPD.Response serveGrid(NanoHTTPD server, java.util.Properties parms, RequestStatics.RequestType type)
public static final java.lang.String aucStr(double auc)
public static final java.lang.String aicStr(double aic)
public static final java.lang.String devExplainedStr(double dev)