[−][src]Struct lib_dachshund::dachshund::beam::Beam
Used for (quasi-clique) detection. A singleton object that keeps state across the beam search. At any point this object considers a "beam" of candidates that is always kept under beam_size, to avoid exponential blowup of the search space.
Fields
candidates: Vec<Candidate<'a, TGraph>>
graph: &'a TGraph
Implementations
impl<'a, TGraph: GraphBase> Beam<'a, TGraph>
[src]
pub fn new(
graph: &'a TGraph,
clique_rows: &'a Vec<CliqueRow>,
beam_size: usize,
verbose: bool,
non_core_types: &'a [String],
num_non_core_types: usize,
alpha: f32,
global_thresh: Option<f32>,
local_thresh: Option<f32>,
graph_id: GraphId
) -> CLQResult<Beam<'a, TGraph>>
[src]
graph: &'a TGraph,
clique_rows: &'a Vec<CliqueRow>,
beam_size: usize,
verbose: bool,
non_core_types: &'a [String],
num_non_core_types: usize,
alpha: f32,
global_thresh: Option<f32>,
local_thresh: Option<f32>,
graph_id: GraphId
) -> CLQResult<Beam<'a, TGraph>>
creates new beam for mining quasi-bicliques. The following parameters are required:
graph
: a reference to aTGraph
object (typically constructed by a transformer`.clique_rows
: a Vector ofCliqueRow
entries, which are used to initialize the search process with already-existing cliques.beam_size
: the number of top candidates to maintain as potential future sources for expansion in the "beam" (i.e., the list of top candidates).verbose
: used for debugging.non_core_types
: list of string identifiers for non-core types.alpha
:Scorer
constructor parameter. Controls the contribution of density to the ``cliqueness'' score. Higher values means denser cliques are prefered, all else being equal.global_thresh
:Scorer
constructor parameter. If provided, candidates must be at least this dense to be considered valid (quasi-)cliques.local_thresh
:Scorer
constructor parameter. if provided, each node in the candidate must have at leastlocal_thresh
proportion of ties to other nodes in the candidate, for the candidate to be considered valid.graph_id
: uniquely identifies the graph currently being processed.
pub fn run_search(
&mut self,
num_to_search: usize,
beam_size: usize,
num_epochs: usize,
max_repeated_prior_scores: usize
) -> CLQResult<BeamSearchResult<'a, TGraph>>
[src]
&mut self,
num_to_search: usize,
beam_size: usize,
num_epochs: usize,
max_repeated_prior_scores: usize
) -> CLQResult<BeamSearchResult<'a, TGraph>>
runs one_step_search for num_epochs
epochs, trying num_to_search
expansion candidates for each candidate in the beam (the list of top
candidates found so far). The beam is of beam_size
. If the top
score resulting from a one step search is repeated max_repeated_prior_scores
times, the search is terminated early. (Note that the search has a stochastic
component, which is why repeating the search may yield different results).
Auto Trait Implementations
impl<'a, TGraph> RefUnwindSafe for Beam<'a, TGraph> where
TGraph: RefUnwindSafe,
TGraph: RefUnwindSafe,
impl<'a, TGraph> Send for Beam<'a, TGraph> where
TGraph: Sync,
TGraph: Sync,
impl<'a, TGraph> Sync for Beam<'a, TGraph> where
TGraph: Sync,
TGraph: Sync,
impl<'a, TGraph> Unpin for Beam<'a, TGraph>
impl<'a, TGraph> UnwindSafe for Beam<'a, TGraph> where
TGraph: RefUnwindSafe,
TGraph: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,