deepchem.models.tensorflow_models.IRV.
TensorflowMultiTaskIRVClassifier
(n_tasks, K=10, logdir=None, n_classes=2, penalty=0.0, penalty_type='l2', learning_rate=0.001, momentum=0.8, optimizer='adam', batch_size=50, verbose=True, seed=None, **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.lr.TensorflowLogisticRegression
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)¶add_output_ops
(graph, output)¶add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)[source]¶Constructs the graph architecture of IRV as described in:
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)¶construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(logits, labels, weights)¶evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶Currently models can only be classifiers or regressors.
get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)¶predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
TensorFlow implementation of fully connected networks.
deepchem.models.tensorflow_models.fcnet.
TensorGraphMultiTaskClassifier
(n_tasks, n_features, layer_sizes=[1000], weight_init_stddevs=0.02, bias_init_consts=1.0, weight_decay_penalty=0.0, weight_decay_penalty_type='l2', dropouts=0.5, activation_fns=<function relu>, n_classes=2, **kwargs)[source]¶Bases: deepchem.models.tensorgraph.tensor_graph.TensorGraph
add_output
(layer)¶build
()¶create_submodel
(layers=None, loss=None, optimizer=None)¶Create an alternate objective for training one piece of a TensorGraph.
A TensorGraph consists of a set of layers, and specifies a loss function and optimizer to use for training those layers. Usually this is sufficient, but there are cases where you want to train different parts of a model separately. For example, a GAN consists of a generator and a discriminator. They are trained separately, and they use different loss functions.
A submodel defines an alternate objective to use in cases like this. It may optionally specify any of the following: a subset of layers in the model to train; a different loss function; and a different optimizer to use. This method creates a submodel, which you can then pass to fit() to use it for training.
| Parameters: |
|
|---|---|
| Returns: |
|
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
evaluate_generator
(feed_dict_generator, metrics, transformers=[], labels=None, outputs=None, weights=[], per_task_metrics=False)¶fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, checkpoint_interval=1000, deterministic=False, restore=False, submodel=None)¶Train this model on a dataset.
| Parameters: |
|
|---|
fit_generator
(feed_dict_generator, max_checkpoints_to_keep=5, checkpoint_interval=1000, restore=False, submodel=None)¶Train this model on data from a generator.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | the average loss over the most recent checkpoint interval |
fit_on_batch
(X, y, w, submodel=None)¶get_global_step
()¶get_layer_variables
(layer)¶Get the list of trainable variables in a layer of the graph.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_pickling_errors
(obj, seen=None)¶get_pre_q_input
(input_layer)¶get_task_type
()¶Currently models can only be classifiers or regressors.
load_from_dir
(model_dir)¶predict
(dataset, transformers=[], outputs=None)[source]¶Uses self to make predictions on provided Dataset object.
| Parameters: |
|
|---|---|
| Returns: | y_pred |
| Return type: | numpy ndarray or list of numpy ndarrays |
predict_on_batch
(X, transformers=[], outputs=None)¶Generates predictions for input samples, processing samples in a batch.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | A Numpy array of predictions. |
predict_on_generator
(generator, transformers=[], outputs=None)¶| Parameters: |
|
|---|
predict_proba_on_batch
(X, transformers=[], outputs=None)¶Generates predictions for input samples, processing samples in a batch.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | A Numpy array of predictions. |
predict_proba_on_generator
(generator, transformers=[], outputs=None)¶| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
reload
()¶Reload trained model from disk.
restore
()¶Reload the values of all variables from the most recent checkpoint file.
save
()¶save_checkpoint
(max_checkpoints_to_keep=5)¶Save a checkpoint to disk.
Usually you do not need to call this method, since fit() saves checkpoints automatically. If you have disabled automatic checkpointing during fitting, this can be called to manually write checkpoints.
| Parameters: | max_checkpoints_to_keep (int) – the maximum number of checkpoints to keep. Older checkpoints are discarded. |
|---|
set_loss
(layer)¶set_optimizer
(optimizer)¶Set the optimizer to use for fitting.
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
topsort
()¶deepchem.models.tensorflow_models.fcnet.
TensorGraphMultiTaskFitTransformRegressor
(n_tasks, n_features, fit_transformers=[], n_evals=1, batch_size=50, **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.fcnet.TensorGraphMultiTaskRegressor
Implements a TensorGraphMultiTaskRegressor that performs on-the-fly transformation during fit/predict.
Example:
>>> n_samples = 10
>>> n_features = 3
>>> n_tasks = 1
>>> ids = np.arange(n_samples)
>>> X = np.random.rand(n_samples, n_features, n_features)
>>> y = np.zeros((n_samples, n_tasks))
>>> w = np.ones((n_samples, n_tasks))
>>> dataset = dc.data.NumpyDataset(X, y, w, ids)
>>> fit_transformers = [dc.trans.CoulombFitTransformer(dataset)]
>>> model = dc.models.TensorflowMultiTaskFitTransformRegressor(n_tasks, [n_features, n_features],
... dropouts=[0.], learning_rate=0.003, weight_init_stddevs=[np.sqrt(6)/np.sqrt(1000)],
... batch_size=n_samples, fit_transformers=fit_transformers, n_evals=1)
n_features after fit_transform: 12
add_output
(layer)¶build
()¶create_submodel
(layers=None, loss=None, optimizer=None)¶Create an alternate objective for training one piece of a TensorGraph.
A TensorGraph consists of a set of layers, and specifies a loss function and optimizer to use for training those layers. Usually this is sufficient, but there are cases where you want to train different parts of a model separately. For example, a GAN consists of a generator and a discriminator. They are trained separately, and they use different loss functions.
A submodel defines an alternate objective to use in cases like this. It may optionally specify any of the following: a subset of layers in the model to train; a different loss function; and a different optimizer to use. This method creates a submodel, which you can then pass to fit() to use it for training.
| Parameters: |
|
|---|---|
| Returns: |
|
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
evaluate_generator
(feed_dict_generator, metrics, transformers=[], labels=None, outputs=None, weights=[], per_task_metrics=False)¶fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, checkpoint_interval=1000, deterministic=False, restore=False, submodel=None)¶Train this model on a dataset.
| Parameters: |
|
|---|
fit_generator
(feed_dict_generator, max_checkpoints_to_keep=5, checkpoint_interval=1000, restore=False, submodel=None)¶Train this model on data from a generator.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | the average loss over the most recent checkpoint interval |
fit_on_batch
(X, y, w, submodel=None)¶get_global_step
()¶get_layer_variables
(layer)¶Get the list of trainable variables in a layer of the graph.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_pickling_errors
(obj, seen=None)¶get_pre_q_input
(input_layer)¶get_task_type
()¶Currently models can only be classifiers or regressors.
load_from_dir
(model_dir)¶predict
(dataset, transformers=[], outputs=None)¶Uses self to make predictions on provided Dataset object.
| Parameters: |
|
|---|---|
| Returns: | results |
| Return type: | numpy ndarray or list of numpy ndarrays |
predict_on_batch
(X, transformers=[], outputs=None)¶Generates predictions for input samples, processing samples in a batch.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | A Numpy array of predictions. |
predict_proba
(dataset, transformers=[], outputs=None)¶| Parameters: |
|
|---|---|
| Returns: | y_pred |
| Return type: | numpy ndarray or list of numpy ndarrays |
predict_proba_on_batch
(X, transformers=[], outputs=None)¶Generates predictions for input samples, processing samples in a batch.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | A Numpy array of predictions. |
predict_proba_on_generator
(generator, transformers=[], outputs=None)¶| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
reload
()¶Reload trained model from disk.
restore
()¶Reload the values of all variables from the most recent checkpoint file.
save
()¶save_checkpoint
(max_checkpoints_to_keep=5)¶Save a checkpoint to disk.
Usually you do not need to call this method, since fit() saves checkpoints automatically. If you have disabled automatic checkpointing during fitting, this can be called to manually write checkpoints.
| Parameters: | max_checkpoints_to_keep (int) – the maximum number of checkpoints to keep. Older checkpoints are discarded. |
|---|
set_loss
(layer)¶set_optimizer
(optimizer)¶Set the optimizer to use for fitting.
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
topsort
()¶deepchem.models.tensorflow_models.fcnet.
TensorGraphMultiTaskRegressor
(n_tasks, n_features, layer_sizes=[1000], weight_init_stddevs=0.02, bias_init_consts=1.0, weight_decay_penalty=0.0, weight_decay_penalty_type='l2', dropouts=0.5, activation_fns=<function relu>, **kwargs)[source]¶Bases: deepchem.models.tensorgraph.tensor_graph.TensorGraph
add_output
(layer)¶build
()¶create_submodel
(layers=None, loss=None, optimizer=None)¶Create an alternate objective for training one piece of a TensorGraph.
A TensorGraph consists of a set of layers, and specifies a loss function and optimizer to use for training those layers. Usually this is sufficient, but there are cases where you want to train different parts of a model separately. For example, a GAN consists of a generator and a discriminator. They are trained separately, and they use different loss functions.
A submodel defines an alternate objective to use in cases like this. It may optionally specify any of the following: a subset of layers in the model to train; a different loss function; and a different optimizer to use. This method creates a submodel, which you can then pass to fit() to use it for training.
| Parameters: |
|
|---|---|
| Returns: |
|
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
evaluate_generator
(feed_dict_generator, metrics, transformers=[], labels=None, outputs=None, weights=[], per_task_metrics=False)¶fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, checkpoint_interval=1000, deterministic=False, restore=False, submodel=None)¶Train this model on a dataset.
| Parameters: |
|
|---|
fit_generator
(feed_dict_generator, max_checkpoints_to_keep=5, checkpoint_interval=1000, restore=False, submodel=None)¶Train this model on data from a generator.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | the average loss over the most recent checkpoint interval |
fit_on_batch
(X, y, w, submodel=None)¶get_global_step
()¶get_layer_variables
(layer)¶Get the list of trainable variables in a layer of the graph.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_pickling_errors
(obj, seen=None)¶get_pre_q_input
(input_layer)¶get_task_type
()¶Currently models can only be classifiers or regressors.
load_from_dir
(model_dir)¶predict
(dataset, transformers=[], outputs=None)¶Uses self to make predictions on provided Dataset object.
| Parameters: |
|
|---|---|
| Returns: | results |
| Return type: | numpy ndarray or list of numpy ndarrays |
predict_on_batch
(X, transformers=[], outputs=None)¶Generates predictions for input samples, processing samples in a batch.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | A Numpy array of predictions. |
predict_on_generator
(generator, transformers=[], outputs=None)¶| Parameters: |
|
|---|
predict_proba
(dataset, transformers=[], outputs=None)¶| Parameters: |
|
|---|---|
| Returns: | y_pred |
| Return type: | numpy ndarray or list of numpy ndarrays |
predict_proba_on_batch
(X, transformers=[], outputs=None)¶Generates predictions for input samples, processing samples in a batch.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | A Numpy array of predictions. |
predict_proba_on_generator
(generator, transformers=[], outputs=None)¶| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
reload
()¶Reload trained model from disk.
restore
()¶Reload the values of all variables from the most recent checkpoint file.
save
()¶save_checkpoint
(max_checkpoints_to_keep=5)¶Save a checkpoint to disk.
Usually you do not need to call this method, since fit() saves checkpoints automatically. If you have disabled automatic checkpointing during fitting, this can be called to manually write checkpoints.
| Parameters: | max_checkpoints_to_keep (int) – the maximum number of checkpoints to keep. Older checkpoints are discarded. |
|---|
set_loss
(layer)¶set_optimizer
(optimizer)¶Set the optimizer to use for fitting.
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
topsort
()¶deepchem.models.tensorflow_models.fcnet.
TensorflowMultiTaskClassifier
(n_tasks, n_features, logdir=None, layer_sizes=[1000], weight_init_stddevs=[0.02], bias_init_consts=[1.0], penalty=0.0, penalty_type='l2', dropouts=[0.5], learning_rate=0.001, momentum=0.9, optimizer='adam', batch_size=50, n_classes=2, pad_batches=False, verbose=True, seed=None, **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.TensorflowClassifier
Implements an icml model as configured in a model_config.proto.
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_output_ops
(graph, output)¶Replace logits with softmax outputs.
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)[source]¶Constructs the graph architecture as specified in its config.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)[source]¶Construct a feed dictionary from minibatch data.
TODO(rbharath): ids_b is not used here. Can we remove it?
| Parameters: |
|
|---|
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(logits, labels, weights)¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
deepchem.models.tensorflow_models.fcnet.
TensorflowMultiTaskFitTransformRegressor
(n_tasks, n_features, logdir=None, layer_sizes=[1000], weight_init_stddevs=[0.02], bias_init_consts=[1.0], penalty=0.0, penalty_type='l2', dropouts=[0.5], learning_rate=0.002, momentum=0.8, optimizer='adam', batch_size=50, fit_transformers=[], n_evals=1, verbose=True, seed=None, **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.fcnet.TensorflowMultiTaskRegressor
Implements a TensorflowMultiTaskRegressor that performs on-the-fly transformation during fit/predict
Example:
>>> n_samples = 10
>>> n_features = 3
>>> n_tasks = 1
>>> ids = np.arange(n_samples)
>>> X = np.random.rand(n_samples, n_features, n_features)
>>> y = np.zeros((n_samples, n_tasks))
>>> w = np.ones((n_samples, n_tasks))
>>> dataset = dc.data.NumpyDataset(X, y, w, ids)
>>> fit_transformers = [dc.trans.CoulombFitTransformer(dataset)]
>>> model = dc.models.TensorflowMultiTaskFitTransformRegressor(n_tasks, [n_features, n_features],
... dropouts=[0.], learning_rate=0.003, weight_init_stddevs=[np.sqrt(6)/np.sqrt(1000)],
... batch_size=n_samples, fit_transformers=fit_transformers, n_evals=1)
n_features after fit_transform: 12
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_output_ops
(graph, output)¶No-op for regression models since no softmax.
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)¶Constructs the graph architecture as specified in its config.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)¶Construct a feed dictionary from minibatch data.
TODO(rbharath): ids_b is not used here. Can we remove it?
| Parameters: |
|
|---|
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(output, labels, weights)¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)[source]¶Perform fit transformations on each minibatch. Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)[source]¶Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Makes predictions of class probabilities on given batch of new data.
| Parameters: | X (np.ndarray) – Features |
|---|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
deepchem.models.tensorflow_models.fcnet.
TensorflowMultiTaskRegressor
(n_tasks, n_features, logdir=None, layer_sizes=[1000], weight_init_stddevs=[0.02], bias_init_consts=[1.0], penalty=0.0, penalty_type='l2', dropouts=[0.5], learning_rate=0.001, momentum=0.9, optimizer='adam', batch_size=50, n_classes=2, pad_batches=False, verbose=True, seed=None, **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.TensorflowRegressor
Implements an icml model as configured in a model_config.proto.
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_output_ops
(graph, output)¶No-op for regression models since no softmax.
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)[source]¶Constructs the graph architecture as specified in its config.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)[source]¶Construct a feed dictionary from minibatch data.
TODO(rbharath): ids_b is not used here. Can we remove it?
| Parameters: |
|
|---|
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(output, labels, weights)¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Makes predictions of class probabilities on given batch of new data.
| Parameters: | X (np.ndarray) – Features |
|---|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
Created on Tue Nov 08 14:10:02 2016
@author: Zhenqin Wu
deepchem.models.tensorflow_models.lr.
TensorflowLogisticRegression
(n_tasks, n_features, logdir=None, layer_sizes=[1000], weight_init_stddevs=[0.02], bias_init_consts=[1.0], penalty=0.0, penalty_type='l2', dropouts=[0.5], learning_rate=0.001, momentum=0.9, optimizer='adam', batch_size=50, n_classes=2, pad_batches=False, verbose=True, seed=None, **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.TensorflowGraphModel
A simple tensorflow based logistic regression model.
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
build
(graph, name_scopes, training)[source]¶Constructs the graph architecture of model: n_tasks * sigmoid nodes.
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶Currently models can only be classifiers or regressors.
get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
deepchem.models.tensorflow_models.progressive_joint.
ProgressiveJointRegressor
(n_tasks, n_features, alpha_init_stddevs=[0.02], **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.fcnet.TensorflowMultiTaskRegressor
Implements a progressive multitask neural network.
Progressive Networks: https://arxiv.org/pdf/1606.04671v3.pdf
Progressive networks allow for multitask learning where each task gets a new column of weights. As a result, there is no exponential forgetting where previous tasks are ignored.
TODO(rbharath): This class is unnecessarily complicated. Can we simplify the structure of the code here?
add_adapter
(all_layers, task, layer_num)[source]¶Add an adapter connection for given task/layer combo
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_output_ops
(graph, output)¶No-op for regression models since no softmax.
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)[source]¶Constructs the graph architecture as specified in its config.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)[source]¶Construct a feed dictionary from minibatch data.
TODO(rbharath): ids_b is not used here. Can we remove it?
| Parameters: |
|
|---|
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(output, labels, weights)¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)[source]¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶get_training_op
(graph, loss)[source]¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)[source]¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Makes predictions of class probabilities on given batch of new data.
| Parameters: | X (np.ndarray) – Features |
|---|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
deepchem.models.tensorflow_models.progressive_multitask.
ProgressiveMultitaskRegressor
(n_tasks, n_features, alpha_init_stddevs=[0.02], **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.fcnet.TensorflowMultiTaskRegressor
Implements a progressive multitask neural network.
Progressive Networks: https://arxiv.org/pdf/1606.04671v3.pdf
Progressive networks allow for multitask learning where each task gets a new column of weights. As a result, there is no exponential forgetting where previous tasks are ignored.
TODO(rbharath): This class is unnecessarily complicated. Can we simplify the structure of the code here?
add_adapter
(all_layers, task, layer_num)[source]¶Add an adapter connection for given task/layer combo
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_output_ops
(graph, output)¶No-op for regression models since no softmax.
add_progressive_lattice
(graph, name_scopes, training)[source]¶Constructs the graph architecture as specified in its config.
add_task_training_costs
(graph, name_scopes, outputs, labels, weights)[source]¶Adds the training costs for each task.
Since each task is trained separately, each task is optimized w.r.t a separate task.
TODO(rbharath): Figure out how to support weight decay for this model. Since each task is trained separately, weight decay should only be used on weights in column for that task.
| Parameters: |
|---|
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)¶Constructs the graph architecture as specified in its config.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)[source]¶Construct a feed dictionary from minibatch data.
TODO(rbharath): ids_b is not used here. Can we remove it?
| Parameters: |
|
|---|
construct_task_feed_dict
(this_task, X_b, y_b=None, w_b=None, ids_b=None)[source]¶Construct a feed dictionary from minibatch data.
TODO(rbharath): ids_b is not used here. Can we remove it?
| Parameters: |
|
|---|
cost
(output, labels, weights)¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, tasks=None, close_session=True, max_checkpoints_to_keep=5, **kwargs)[source]¶Fit the model.
Progressive networks are fit by training one task at a time. Iteratively fits one task at a time with other weights frozen.
| Parameters: | dataset (dc.data.Dataset) – Dataset object holding training data |
|---|---|
| Raises: | AssertionError –
If model is not in training mode. |
fit_on_batch
(X, y, w)¶Updates existing model with new information.
fit_task
(sess, dataset, task, task_train_op, nb_epoch=10, log_every_N_batches=50, checkpoint_interval=10)[source]¶Fit the model.
Fit one task.
TODO(rbharath): Figure out if the logging will work correctly with the global_step set as it is.
| Parameters: |
|
|---|---|
| Raises: |
|
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_training_op
(graph, losses, task)[source]¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
| Parameters: |
|
|---|---|
| Returns: | |
| Return type: | A training op. |
get_task_type
()¶get_training_op
(graph, loss)[source]¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X, pad_batch=False)[source]¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Makes predictions of class probabilities on given batch of new data.
| Parameters: | X (np.ndarray) – Features |
|---|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
deepchem.models.tensorflow_models.robust_multitask.
RobustMultitaskClassifier
(n_tasks, n_features, logdir=None, bypass_layer_sizes=[100], bypass_weight_init_stddevs=[0.02], bypass_bias_init_consts=[1.0], bypass_dropouts=[0.5], **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.fcnet.TensorflowMultiTaskClassifier
Implements a neural network for robust multitasking.
Key idea is to have bypass layers that feed directly from features to task output. Hopefully will allow tasks to route around bad multitasking.
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_output_ops
(graph, output)¶Replace logits with softmax outputs.
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)[source]¶Constructs the graph architecture as specified in its config.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)¶Construct a feed dictionary from minibatch data.
TODO(rbharath): ids_b is not used here. Can we remove it?
| Parameters: |
|
|---|
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(logits, labels, weights)¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
deepchem.models.tensorflow_models.robust_multitask.
RobustMultitaskRegressor
(n_tasks, n_features, logdir=None, bypass_layer_sizes=[100], bypass_weight_init_stddevs=[0.02], bypass_bias_init_consts=[1.0], bypass_dropouts=[0.5], **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.fcnet.TensorflowMultiTaskRegressor
Implements a neural network for robust multitasking.
Key idea is to have bypass layers that feed directly from features to task output. Hopefully will allow tasks to route around bad multitasking.
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_output_ops
(graph, output)¶No-op for regression models since no softmax.
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)[source]¶Constructs the graph architecture as specified in its config.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)¶Construct a feed dictionary from minibatch data.
TODO(rbharath): ids_b is not used here. Can we remove it?
| Parameters: |
|
|---|
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(output, labels, weights)¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Makes predictions of class probabilities on given batch of new data.
| Parameters: | X (np.ndarray) – Features |
|---|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
Utils for graph convolution models.
deepchem.models.tensorflow_models.utils.
Kurtosis
(tensor, reduction_indices=None)[source]¶Compute kurtosis, the fourth standardized moment minus three.
| Parameters: |
|
|---|---|
| Returns: | A tensor with the same type as the input tensor. |
deepchem.models.tensorflow_models.utils.
Mask
(t, mask)[source]¶Apply a mask to a tensor.
If not None, mask should be a t.shape[:-1] tensor of 0,1 values.
| Parameters: |
|
|---|---|
| Returns: | A tensor with the same shape as the input tensor. |
| Raises: |
|
deepchem.models.tensorflow_models.utils.
Mean
(tensor, reduction_indices=None, mask=None)[source]¶Compute mean using Sum and Mul for better GPU performance.
See tf.nn.moments for additional notes on this approach.
| Parameters: |
|
|---|---|
| Returns: | A tensor with the same type as the input tensor. |
deepchem.models.tensorflow_models.utils.
Moment
(k, tensor, standardize=False, reduction_indices=None, mask=None)[source]¶Compute the k-th central moment of a tensor, possibly standardized.
| Parameters: |
|
|---|---|
| Returns: | The mean and the requested moment. |
deepchem.models.tensorflow_models.utils.
ParseCheckpoint
(checkpoint)[source]¶Parse a checkpoint file.
| Parameters: | checkpoint – Path to checkpoint. The checkpoint is either a serialized CheckpointState proto or an actual checkpoint file. |
|---|---|
| Returns: | The path to an actual checkpoint file. |
deepchem.models.tensorflow_models.utils.
Skewness
(tensor, reduction_indices=None)[source]¶Compute skewness, the third standardized moment.
| Parameters: |
|
|---|---|
| Returns: | A tensor with the same type as the input tensor. |
deepchem.models.tensorflow_models.utils.
StringToOp
(string)[source]¶Get a TensorFlow op from a string.
| Parameters: | string – String description of an op, such as ‘sum’ or ‘mean’. |
|---|---|
| Returns: | A TensorFlow op. |
| Raises: | NotImplementedError –
If string does not match a supported operation. |
deepchem.models.tensorflow_models.utils.
Variance
(tensor, reduction_indices=None, mask=None)[source]¶Compute variance.
| Parameters: |
|
|---|---|
| Returns: | A tensor with the same type as the input tensor. |
Helper operations and classes for general model building.
deepchem.models.tensorflow_models.
TensorflowClassifier
(n_tasks, n_features, logdir=None, layer_sizes=[1000], weight_init_stddevs=[0.02], bias_init_consts=[1.0], penalty=0.0, penalty_type='l2', dropouts=[0.5], learning_rate=0.001, momentum=0.9, optimizer='adam', batch_size=50, n_classes=2, pad_batches=False, verbose=True, seed=None, **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.TensorflowGraphModel
Classification model.
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)[source]¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_output_ops
(graph, output)¶Replace logits with softmax outputs.
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)¶Define the core graph.
NOTE(user): Operations defined here should be in their own name scope to
avoid any ambiguity when restoring checkpoints.
:raises: NotImplementedError
–
if not overridden by concrete subclass.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)¶Transform a minibatch of data into a feed_dict.
| Raises: | NotImplementedError –
if not overridden by concrete subclass. |
|---|
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(logits, labels, weights)[source]¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)[source]¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)[source]¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
deepchem.models.tensorflow_models.
TensorflowGraph
(graph, session, name_scopes, output, labels, weights, loss)[source]¶Bases: object
Simple class that holds information needed to run Tensorflow graph.
Returns a singleton TensorFlow scope with the given name.
Used to prevent ‘_1’-appended scopes when sharing scopes with child classes.
| Parameters: | name – String. Name scope for group of operations. |
|---|---|
| Returns: | tf.name_scope with the provided name. |
deepchem.models.tensorflow_models.
TensorflowGraphModel
(n_tasks, n_features, logdir=None, layer_sizes=[1000], weight_init_stddevs=[0.02], bias_init_consts=[1.0], penalty=0.0, penalty_type='l2', dropouts=[0.5], learning_rate=0.001, momentum=0.9, optimizer='adam', batch_size=50, n_classes=2, pad_batches=False, verbose=True, seed=None, **kwargs)[source]¶Bases: deepchem.models.models.Model
Parent class for deepchem Tensorflow models.
Has the following attributes:
- placeholder_root: String placeholder prefix, used to create
- placeholder_scope.
Generic base class for defining, training, and evaluating TensorflowGraphs.
| Parameters: |
|
|---|
add_example_weight_placeholders
(graph, name_scopes)[source]¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)[source]¶Add Placeholders for labels for each task.
| Raises: | NotImplementedError –
if not overridden by concrete subclass. |
|---|
build
(graph, name_scopes, training)[source]¶Define the core graph.
NOTE(user): Operations defined here should be in their own name scope to
avoid any ambiguity when restoring checkpoints.
:raises: NotImplementedError
–
if not overridden by concrete subclass.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)[source]¶Transform a minibatch of data into a feed_dict.
| Raises: | NotImplementedError –
if not overridden by concrete subclass. |
|---|
cost
(output, labels, weights)[source]¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. For use in subclasses that want to calculate additional costs. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)[source]¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_task_type
()¶Currently models can only be classifiers or regressors.
get_training_op
(graph, loss)[source]¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])[source]¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X, **kwargs)¶Makes predictions on given batch of new data.
| Parameters: | X (np.ndarray) – Features |
|---|
predict_proba
(dataset, transformers=[], n_classes=2)[source]¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Makes predictions of class probabilities on given batch of new data.
| Parameters: | X (np.ndarray) – Features |
|---|
restore
()[source]¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |
deepchem.models.tensorflow_models.
TensorflowRegressor
(n_tasks, n_features, logdir=None, layer_sizes=[1000], weight_init_stddevs=[0.02], bias_init_consts=[1.0], penalty=0.0, penalty_type='l2', dropouts=[0.5], learning_rate=0.001, momentum=0.9, optimizer='adam', batch_size=50, n_classes=2, pad_batches=False, verbose=True, seed=None, **kwargs)[source]¶Bases: deepchem.models.tensorflow_models.TensorflowGraphModel
Regression model.
add_example_weight_placeholders
(graph, name_scopes)¶Add Placeholders for example weights for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_label_placeholders
(graph, name_scopes)[source]¶Add Placeholders for labels for each task.
Placeholders are wrapped in identity ops to avoid the error caused by feeding and fetching the same tensor.
add_training_cost
(graph, name_scopes, output, labels, weights)¶build
(graph, name_scopes, training)¶Define the core graph.
NOTE(user): Operations defined here should be in their own name scope to
avoid any ambiguity when restoring checkpoints.
:raises: NotImplementedError
–
if not overridden by concrete subclass.
construct_feed_dict
(X_b, y_b=None, w_b=None, ids_b=None)¶Transform a minibatch of data into a feed_dict.
| Raises: | NotImplementedError –
if not overridden by concrete subclass. |
|---|
construct_graph
(training, seed)¶Returns a TensorflowGraph object.
cost
(output, labels, weights)[source]¶Calculate single-task training cost for a batch of examples.
| Parameters: |
|
|---|---|
| Returns: | A tensor with shape batch_size containing the weighted cost for each example. |
evaluate
(dataset, metrics, transformers=[], per_task_metrics=False)¶Evaluates the performance of this model on specified dataset.
| Parameters: |
|
|---|---|
| Returns: | Maps tasks to scores under metric. |
| Return type: |
fit
(dataset, nb_epoch=10, max_checkpoints_to_keep=5, log_every_N_batches=50, checkpoint_interval=10, **kwargs)¶Fit the model.
| Parameters: |
|
|---|---|
| Raises: |
|
fit_on_batch
(X, y, w)¶Updates existing model with new information.
get_model_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_num_tasks
()¶get_params
(deep=True)¶Get parameters for this estimator.
| Parameters: | deep (boolean, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators. |
|---|---|
| Returns: | params – Parameter names mapped to their values. |
| Return type: | mapping of string to any |
get_params_filename
(model_dir)¶Given model directory, obtain filename for the model itself.
get_training_op
(graph, loss)¶Get training op for applying gradients to variables.
Subclasses that need to do anything fancy with gradients should override this method.
Returns: A training op.
predict
(dataset, transformers=[])¶Uses self to make predictions on provided Dataset object.
| Returns: | numpy ndarray of shape (n_samples,) |
|---|---|
| Return type: | y_pred |
predict_on_batch
(X)[source]¶Return model output for the provided input.
Restore(checkpoint) must have previously been called on this object.
| Parameters: | dataset – dc.data.Dataset object. |
|---|---|
| Returns: |
Note that the output and labels arrays may be more than 2D, e.g. for classifier models that return class probabilities. |
| Return type: | x ... |
| Raises: |
|
predict_proba
(dataset, transformers=[], n_classes=2)¶TODO: Do transformers even make sense here?
| Returns: | numpy ndarray of shape (n_samples, n_classes*n_tasks) |
|---|---|
| Return type: | y_pred |
predict_proba_on_batch
(X)¶Makes predictions of class probabilities on given batch of new data.
| Parameters: | X (np.ndarray) – Features |
|---|
reload
()¶Loads model from disk. Thin wrapper around restore() for consistency.
restore
()¶Restores the model from the provided training checkpoint.
| Parameters: | checkpoint – string. Path to checkpoint file. |
|---|
save
()¶No-op since tf models save themselves during fit()
set_params
(**params)¶Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects
(such as pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each
component of a nested object.
| Returns: | |
|---|---|
| Return type: | self |


- SASS has many powerful tools, but these can make your code difficult to
maintain if you're not careful and confusing for the next person who touches it.
- On any decent-sized site, specificity
problems can and will arise rather quickly. Extending your components
later will be difficult as well.
- Defaults to help out the next developer and make the code easier to scan.


Adventure Player
Character Creater
Login
Username
Password
Login
Cancel
Sign Up
Email
Username
Password
Sign Up
Cancel
{{msg}}


--- layout: default title: 404: Page not found ---
Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. Head back home!


Name :
Mobile:
Location
Email :
1 Visit our
Durga Soft Solutions
2 Visit our
Durga Soft Solutions
Bottom
Top
This is my dog


#import <NTLabelStyle.h>
Instance Methods | |
| (id) | - initWithColor:attachAnchorPointX:attachAnchorPointY:causesOverlap:hideIfOverlapped:horizontalOffset:verticalOffset:placementPriority:scaleWithDPI:anchorPointX:anchorPointY:flippable:orientationMode:scalingMode: |
| (float) | - getAnchorPointX |
| (float) | - getAnchorPointY |
| (BOOL) | - isFlippable |
| (enum NTBillboardOrientation) | - getOrientationMode |
| (enum NTBillboardScaling) | - getScalingMode |
| (NSString *) | - swigGetClassName |
| (void *) | - swigGetDirectorObject |
| Instance Methods inherited from NTBillboardStyle | |
| (float) | - getAttachAnchorPointX |
| (float) | - getAttachAnchorPointY |
| (BOOL) | - isCausesOverlap |
| (BOOL) | - isHideIfOverlapped |
| (float) | - getHorizontalOffset |
| (float) | - getVerticalOffset |
| (int) | - getPlacementPriority |
| (BOOL) | - isScaleWithDPI |
| Instance Methods inherited from NTStyle | |
| (BOOL) | - isEqual: |
| (NSUInteger) | - hash |
| (NTColor *) | - getColor |
Class Methods | |
| (NTLabelStyle *) | + swigCreatePolymorphicInstance:swigOwnCObject: |
A style for labels. Contains attributes for configuring how the label is drawn on the screen.
| - (float) getAnchorPointX |
Returns the horizontal anchor point of the label.
| - (float) getAnchorPointY |
Returns the vertical anchor point of the label.
| - (enum NTBillboardOrientation) getOrientationMode |
Returns the orientation mode of the label.
| - (enum NTBillboardScaling) getScalingMode |
Returns the scaling mode of the label.
| - (id) initWithColor: | (NTColor*) | color | |
| attachAnchorPointX: | (float) | attachAnchorPointX | |
| attachAnchorPointY: | (float) | attachAnchorPointY | |
| causesOverlap: | (BOOL) | causesOverlap | |
| hideIfOverlapped: | (BOOL) | hideIfOverlapped | |
| horizontalOffset: | (float) | horizontalOffset | |
| verticalOffset: | (float) | verticalOffset | |
| placementPriority: | (int) | placementPriority | |
| scaleWithDPI: | (BOOL) | scaleWithDPI | |
| anchorPointX: | (float) | anchorPointX | |
| anchorPointY: | (float) | anchorPointY | |
| flippable: | (BOOL) | flippable | |
| orientationMode: | (enum NTBillboardOrientation) | orientationMode | |
| scalingMode: | (enum NTBillboardScaling) | scalingMode | |
Constructs a LabelStyle object from various parameters. Instantiating the object directly is
not recommended, LabelStyleBuilder should be used instead.
| color | The color for the label. |
| attachAnchorPointX | The horizontal attaching anchor point for the label. |
| attachAnchorPointY | The vertical attaching anchor point for the label. |
| causesOverlap | The causes overlap flag for the label. |
| hideIfOverlapped | The hide if overlapped flag for the label. |
| horizontalOffset | The horizontal offset for the label. |
| verticalOffset | The vertical offset for the label. |
| placementPriority | The placement priority for the label. |
| scaleWithDPI | The scale with DPI flag for the label. |
| anchorPointX | The horizontal anchor point for the label. |
| anchorPointY | The vertical anchor point for the label. |
| flippable | The fliappble flag for the label. |
| orientationMode | The orientation mode for the label. |
| scalingMode | The scaling mode for the label. |
| - (BOOL) isFlippable |
Returns the state of the flippable flag.
| + (NTLabelStyle *) swigCreatePolymorphicInstance: | (void*) | cPtr | |
| swigOwnCObject: | (BOOL) | cMemoryOwn | |
Creates a polymorphic instance of the given native object. This is used internally by the SDK.
| cPtr | The native pointer of the instance. |
| cMemoryOwn | The ownership flag. |
Reimplemented from NTBillboardStyle.
Reimplemented in NTTextStyle.
| - (NSString *) swigGetClassName |
Returns the actual class name of this object. This is used internally by the SDK.
Reimplemented from NTBillboardStyle.
Reimplemented in NTTextStyle.
| - (void *) swigGetDirectorObject |
Returns the pointer to the connected director object. This is used internally by the SDK.
Reimplemented from NTBillboardStyle.
Reimplemented in NTTextStyle.


Hi,
After following all instructions and copying emoncms file tree to the root of my web server I see the startup page and all database tables are created but if i go to register nothing happens and apache error log file reports:
File does not exist: /var/www/user
What am i doing wrong?
Hal
Re: emoncms installation problem
i have reinstalled everything, when i go to the localhost/emoncms the welcome page apears and the database gets populated but when i press "register" nothing happens and apache2 error log reports:
[Tue May 31 22:06:02 2011] [error] [client <IP_ADDRESS>] File does not exist: /var/www/emoncms/user, referer: http://localhost/emoncms/
Re: emoncms installation problem
Did you try the clean URL step as described here?: http://openenergymonitor.org/emon/node/150 It sounds like a clean url problem but I may be wrong.
Re: emoncms installation problem
Hi, emoncms works fine now after fixing this clean URL!
So now I wanted to try the new emoncms2 and this time I get the following error:
Notice: Undefined index: q in /var/www/emoncms2/index.php on line 28 Notice: Undefined index: form in /var/www/emoncms2/Controllers/user_block_controller.php on line 16 Notice: Undefined variable: error in /var/www/emoncms2/Controllers/user_block_controller.php on line 51
this is running on the same machine!
Re: emoncms installation problem
Yes sorry, they are only notices so nothing serious.
If you change the line:
ini_set('display_errors','on');
to
ini_set('display_errors','off');
in index.php that will sort it.
Ive made the change to the github version
Re: emoncms installation problem
Hi
This fixes the error messages but still nothing happens when I press "register" with a clean DB on ubuntu 10.04.
The apache error log shows:
[Fri Sep 02 16:00:50 2011] [error] [client <IP_ADDRESS>] PHP Notice: Undefined index: q in /var/www/emoncms2/index.php on line 28, referer: http://localhost/emoncms2/
Re: emoncms installation problem
Sorry for this last message, I was expecting a registration page like in the emoncms, but now I see that this is all handled in the first page.
Thanks
Re: emoncms installation problem
I installed emoncms3 successfuly . But when I tried to register a new user, nothing happens.
I don't have errors
Re: emoncms installation problem
It works now, after cleaning the URL


MDsrv configuration
The MDsrv settings can be modified by changing the app.cfg file, downloadable here. Please find a permanent secure location (not accessible by others) for the file. It is possible to change the host and port, the list of directories where you store your structure and trajectory files (DATA_DIRS) and the security settings. The file is written in Python
DATA_DIRS
Directories where simulations are located should be listed within the DATA_DIR dictionary. It contains only directories, no links to specific files. There is no limit to reuse directories or division into several subdirectories. can be hidden with an underscore (e.g. "_secrets": os.path.abspath("/mnt/disk1/projects")) and only accessed via the url with the directory name (e.g. _secrets).
DATA_DIRS = {
"_hidden": os.path.abspath("/path/hidden/from/dir/listing"),
"myproject": os.path.abspath("/path/project"),
}
Security settings
MDsrv provides two possible ways to secure the data:
- REQUIRE_AUTH protects all directories defined in DATA_DIRS with a user and a passphrase.
- REQUIRE_DATA_AUTH secures the single directories individually with an username and a password.
REQUIRE_AUTH = False
USERNAME = "user"
PASSWORD = "pass"
REQUIRE_DATA_AUTH = True
DATA_AUTH = {
"_hidden2": [ "user", "test123" ],
"myproject": [ "user", "test123" ],
}
Note that only one of REQUIRE_AUTH and REQUIRE_DATA_AUTH can be true with the former taken precedence.
Additional settings:
Within the configuration file, HOST and PORT can be set.
Whenever the app.cfg file is changed, the apache server has to be restarted. If content within the directories is changed, a restart is not necessary. To restart execute one of the following commants
sudo /etc/init.d/apache2 restart
sudo service apache2 restart
More
If you have any questions, found some bugs, or want to report enhancement requests use the Issue Tracker, use the contact formular or write a mail to<EMAIL_ADDRESS>or<EMAIL_ADDRESS>Please give us feedback!


#include <UExprNumber.h>
Public Member Functions | |
| ~UExprNumber () | |
| float | GetValue () const |
| bool | IsDynamic () const |
| ETYPE | GetType () const |
Friends | |
| class | UExprMgr |
File: UExprTerm.h Author: Kevin Bray Created: 07-05-05 Copyright © 2004 Bootstrap Studios. All rights reserved. project includes. class UExprNumber
Definition at line 18 of file UExprNumber.h.
| UExprNumber::~UExprNumber | ( | ) | [inline] |
Definition at line 24 of file UExprNumber.h.
| ETYPE UExprNumber::GetType | ( | ) | const [inline, virtual] |
| float UExprNumber::GetValue | ( | ) | const [inline, virtual] |
| bool UExprNumber::IsDynamic | ( | ) | const [inline, virtual] |
friend class UExprMgr [friend] |
Definition at line 20 of file UExprNumber.h.


medicinal Plants plants Medicinal species Ghana used study plant Used Ethnobotanical use Ethnopharmacol. traditional ./j.jep... reported Study Traditional herbal informants Ejisu-Juaben high knowledge treatment treat parts diseases {border-style Plant local (%) Ethnobiol. px;} #ffffff;} Ethnomed. Survey value ICF Medicine Use area values cited indigenous respondents ailment ./--- Uganda category number Ethiopia Health Herbal Med. Treatment healers health highest malaria Forest Malaria (.%) Asase Ethnopharmacological Municipality Nigeria collected diseases, key low medicines mentioned municipality using (FL Municipality. People Region ailments indica information preparation skin studies treating District Figure Research administration availability different leaves level majority px; respectively. study, various {font-family Burkina K.S.A., New Table collab: followed font-size including indicates major malaria, medicine plants, recorded similar total uses (%), (.%), (accessed Afr. Altern. Bobiri China Conservation Faso Ghana, Healers Healing However, India Medicines Nepal Res. Reserve Western World based consensus disease diseases. documented double; ethnobotanical factor grandis people preparations primary usage (%). (.) (UV) ... ./s--- A.K. Analysis Antimalarial Available Central Cleistopholis Communities Complement. Ghanaian Island, K.K., Knowledge Northwest Pharm. Region, Remedies Vernonia Y.O., [], amygdalina area. border-color border-width calculated care claimed communities conducted countries data healthcare however, importance informant informants. members methods municipality. online: patens preferred ranked solid; survey treated users usually {font-style {font-weight (), (.), (ICF Also, Azadirachta Bangladesh C.A.A., Cameroon District, Djibouti Fabaceae Fidelity File H.K.M., Indigenous Institute Int. Local M.A. Municipality, October Rodrigues Skin Southern Species Statistical Togo Van West Y.F.; activities article available bold common considered courier; document effectiveness em; fever, fidelity gastrointestinal given indicated inhabitants like obtained oral particular practice predominant pt;} relevant species, specific threat threats utilized


Damon Wingo
1. The Game of Thrones
2. A Clash of Kings
3. A Storm of Swords
4. A Feast of Crows
5. Dance with Dragons


{% include "partials/sidebox.html" %}
{% include template %}
{% include "partials/results.html" %}
{% include "partials/search.html" %}
{% include "partials/playbox.html" %}


cpp-ethereum - Ethereum C++ client
This repository contains cpp-ethereum, the Ethereum C++ client.
It is the third most popular of the Ethereum clients, behind geth (the go client) and Parity (the rust client). The code is exceptionally portable and has been used successfully on a very broad range of operating systems and hardware.
Contact
- Chat in cpp-ethereum channel on Gitter.
- Report bugs, issues or feature requests using GitHub issues.
Getting Started
The Ethereum Documentation site hosts the cpp-ethereum homepage, which has a Quick Start section.
| Operating system | Status |
|---|---|
| Ubuntu and macOS | |
| Windows |
Building from source
Get the source code
Git and GitHub is used to maintain the source code. Clone the repository by:
git clone --recursive https://github.com/ethereum/cpp-ethereum.git
cd cpp-ethereum
The --recursive
option is important. It orders git to clone additional
submodules which are required to build the project.
If you missed it you can correct your mistake with command
git submodule update --init
.
Install CMake
CMake is used to control the build configuration of the project. Quite recent version of CMake is required (at the time of writing 3.4.3 is the minimum). We recommend installing CMake by downloading and unpacking the binary distribution of the latest version available on the CMake download page.
The CMake package available in your operating system can also be installed and used if it meets the minimum version requirement.
Alternative method
The repository contains the scripts/install_cmake.sh script that downloads a fixed version of CMake and unpacks it to the given directory prefix. Example usage:
scripts/install_cmake.sh --prefix /usr/local
.
Install dependencies (Linux, macOS)
The following libraries are required to be installed in the system in their development variant:
- leveldb
They usually can be installed using system-specific package manager. Examples for some systems:
| Operating system | Installation command |
|---|---|
| Debian-based | sudo apt-get install libleveldb-dev |
| RedHat-based | dnf install leveldb-devel |
| macOS | brew install leveldb |
We also support a "one-button" shell script scripts/install_deps.sh which attempts to aggregate dependencies installation instructions for Unix-like operating systems. It identifies your distro and installs the external packages. Supporting the script is non-trivial task so please inform us if it does not work for your use-case.
Install dependencies (Windows)
We provide prebuilt dependencies required to build the project. Download them with the scripts/install_deps.bat script.
scripts/install_deps.bat
Build
Configure the project build with the following command. It will create the
build
directory with the configuration.
mkdir build; cd build # Create a build directory.
cmake .. # Configure the project.
cmake --build . # Build all default targets.
On Windows Visual Studio 2015 is required. You should generate Visual Studio
solution file (.sln) for 64-bit architecture by adding
-G "Visual Studio 14 2015 Win64"
argument to the CMake configure command.
After configuration is completed the cpp-ethereum.sln
can be found in the
build
directory.
cmake .. -G "Visual Studio 14 2015 Win64"
Contributing
The current codebase is the work of many, many hands, with nearly 100 individual contributors over the course of its development.
Our day-to-day development chat happens on the cpp-ethereum Gitter channel.
All contributions are welcome! We try to keep a list of tasks that are suitable for newcomers under the tag up-for-grabs. If you have any questions, please just ask.
Please read CONTRIBUTING and CODING_STYLE thoroughly before making alterations to the code base.
All development goes in develop branch.
Mining
This project is not suitable for Ethereum mining. The support for GPU mining has been dropped some time ago including the ethminer tool. Use the ethminer tool from https://github.com/ethereum-mining/ethminer.
Testing
To run the tests, make sure you clone https://github.com/ethereum/tests and point the environment variable
ETHEREUM_TEST_PATH
to that path.
Documentation
License
All contributions are made under the GNU General Public License v3. See LICENSE.


Xmas arrives early for Infinispan users! 5.0.0.ALPHA1 is out!
Just in time for Christmas, the first release in the 5.x series called 5.0.0.ALPHA1 is out. This release implements one of the most demanded features which is the ability to store non-Serializable objects into Infinispan data grids! You can now do so thanks to the ability to plug Infinispan with Externalizer implementations that know how to marshall/unmarshall a particular type. To find out more on how to implement this Externalizers and how to plug them, check the following article that explain this in great detail.
A very important benefit of using Infinispan’s Externalizer framework is that user classes now benefit from a lightning fast marshalling framework based on JBoss Marshalling. Back in the 4.0.0 days when we switched from JDK serialization to JBoss Marshalling, we saw a performance improvement of around 10-15% and we’re confident that 5.x user applications will see a similar performance increase once they start providing Externalizer implementations for their own types.
At this stage, it’s very important that Infinispan users have a go at implementing their own Externalizer implementations so that we have enough time to make adjustments based on feedback provided. Your input is crucial!!
Staying with the marshalling topic, another novelty included in this release is the ability to plug Hot Rod clients with portable serialization thanks to Apache Avro. This is not tremendously important right now, but once Hot Rod protocol clients have been written in other languages, they’d be able to seamlessly share data even if they’re written in different languages! In case you’re not aware, a Python Hot Rod client is already in the making…
Finally, details of all issues fixed can be found here, the download is here, and please report issues here. :-)
Enjoy and Merry Christmas to all :)
Galder


Lisence type: MIT
The libraries used to create this template are Knockout , Crossroads.js , Bootstrap , jQuery , Font Awesome and Q .
git clone git://github.com/crissdev/spa-template-ko.git -b master spa-ko
bower install spa-template-ko
The build script supports a number of options that can be passed through command line. Run the following command in the application directory to see all the options available.
gulp --help
Tests can be run with Karma.
karma start


Asset Sub-class
Configuration Form
Select Asset Class
*
Select Asset Class
{{asset}}
{{asset.name}}
Asset Sub-class Name
*
No special character are allowed
Save
Update
Update Asset Sub-class
×
Are you sure to update this data ?
Asset Sub-class List
Asset Class
Asset Sub-class
Action
Asset Sub-class List
No records Found!