Efficient implementation of Gaussian Naive Bayes Searchlight.
This implementation takes advantage that GNB is “naive” in its reliance on massive univariate conditional probabilities of each feature given a target class. Plain Searchlight analysis approach asks for the same information over again and over again for the same feature in multiple “lights”. So it becomes possible to drastically cut running time of a Searchlight by pre-computing basic statistics necessary used by GNB beforehand and then doing their subselection for a given split/feature set.
Kudos for the idea and showing that it indeed might be beneficial over generic Searchlight with GNB go to Francisco Pereira.
Notes
Available conditional attributes:
(Conditional attributes enabled by default suffixed with +)
Methods
generate(ds) | Yield processing results. |
get_postproc() | Returns the post-processing node or None. |
get_space() | Query the processing space name of this node. |
reset() | |
set_postproc(node) | Assigns a post-processing node |
set_space(name) | Set the processing space name of this node. |
train(ds) | The default implementation calls _pretrain(), _train(), and finally _posttrain(). |
untrain() | Reverts changes in the state of this node caused by previous training |
Initialize a GNBSearchlight
Parameters : | gnb : GNB
generator : Generator
errorfx : func, optional
indexsum : (‘sparse’, ‘fancy’), optional
reuse_neighbors : bool, optional
splitter : Splitter, optional
enable_ca : None or list of str
disable_ca : None or list of str
queryengine : QueryEngine
roi_ids : None or list(int) or str
null_dist : instance of distribution estimator
auto_train : bool
force_train : bool
space : str, optional
pass_attr : str, list of str|tuple, optional
postproc : Node instance, optional
descr : str
|
---|
Methods
generate(ds) | Yield processing results. |
get_postproc() | Returns the post-processing node or None. |
get_space() | Query the processing space name of this node. |
reset() | |
set_postproc(node) | Assigns a post-processing node |
set_space(name) | Set the processing space name of this node. |
train(ds) | The default implementation calls _pretrain(), _train(), and finally _posttrain(). |
untrain() | Reverts changes in the state of this node caused by previous training |