Type KerasClassifier
Namespace tensorflow.keras.wrappers.scikit_learn
Parent BaseWrapper
Interfaces IKerasClassifier
Implementation of the scikit-learn classifier API for Keras.
Methods
- check_params
- check_params_dyn
- filter_sk_params
- filter_sk_params
- filter_sk_params_dyn
- fit
- fit_dyn
- get_params
- get_params_dyn
- predict
- predict_dyn
- predict_proba
- predict_proba_dyn
- score
- score_dyn
- set_params
- set_params_dyn
Properties
Public instance methods
void check_params(IDictionary<object, object> params)
object check_params_dyn(object params)
IDictionary<object, object> filter_sk_params(PythonFunctionContainer fn, IDictionary<object, object> override)
IDictionary<object, object> filter_sk_params(object fn, IDictionary<object, object> override)
object filter_sk_params_dyn(object fn, object override)
object fit(object x, ndarray y, IDictionary<string, object> kwargs)
Constructs a new model with `build_fn` & fit the model to `(x, y)`.
Parameters
-
object
x -
ndarray
y -
IDictionary<string, object>
kwargs - dictionary arguments Legal arguments are the arguments of `Sequential.fit`
Returns
-
object
object fit_dyn(object x, object y, IDictionary<string, object> kwargs)
Constructs a new model with `build_fn` & fit the model to `(x, y)`.
Parameters
-
object
x -
object
y -
IDictionary<string, object>
kwargs - dictionary arguments Legal arguments are the arguments of `Sequential.fit`
Returns
-
object
object get_params(IDictionary<string, object> params)
object get_params_dyn(IDictionary<string, object> params)
object predict(object x, IDictionary<string, object> kwargs)
Returns predictions for the given test data.
Parameters
-
object
x - array-like, shape `(n_samples, n_features)` Test samples where `n_samples` is the number of samples and `n_features` is the number of features.
-
IDictionary<string, object>
kwargs - dictionary arguments Legal arguments are the arguments of `Sequential.predict`.
Returns
-
object
object predict_dyn(object x, IDictionary<string, object> kwargs)
Returns predictions for the given test data.
Parameters
-
object
x - array-like, shape `(n_samples, n_features)` Test samples where `n_samples` is the number of samples and `n_features` is the number of features.
-
IDictionary<string, object>
kwargs - dictionary arguments Legal arguments are the arguments of `Sequential.predict`.
Returns
-
object
object predict_proba(object x, IDictionary<string, object> kwargs)
Returns class probability estimates for the given test data.
Parameters
-
object
x - array-like, shape `(n_samples, n_features)` Test samples where `n_samples` is the number of samples and `n_features` is the number of features.
-
IDictionary<string, object>
kwargs - dictionary arguments Legal arguments are the arguments of `Sequential.predict_classes`.
Returns
-
object
object predict_proba_dyn(object x, IDictionary<string, object> kwargs)
Returns class probability estimates for the given test data.
Parameters
-
object
x - array-like, shape `(n_samples, n_features)` Test samples where `n_samples` is the number of samples and `n_features` is the number of features.
-
IDictionary<string, object>
kwargs - dictionary arguments Legal arguments are the arguments of `Sequential.predict_classes`.
Returns
-
object
object score(object x, object y, IDictionary<string, object> kwargs)
Returns the mean loss on the given test data and labels.
Parameters
-
object
x - array-like, shape `(n_samples, n_features)` Test samples where `n_samples` is the number of samples and `n_features` is the number of features.
-
object
y - array-like, shape `(n_samples,)` True labels for `x`.
-
IDictionary<string, object>
kwargs - dictionary arguments Legal arguments are the arguments of `Sequential.evaluate`.
Returns
-
object
object score_dyn(object x, object y, IDictionary<string, object> kwargs)
Returns the mean loss on the given test data and labels.
Parameters
-
object
x - array-like, shape `(n_samples, n_features)` Test samples where `n_samples` is the number of samples and `n_features` is the number of features.
-
object
y - array-like, shape `(n_samples,)` True labels for `x`.
-
IDictionary<string, object>
kwargs - dictionary arguments Legal arguments are the arguments of `Sequential.evaluate`.
Returns
-
object