pub struct ILPProblem {
pub positive_examples: Vec<String>,
pub negative_examples: Vec<String>,
pub background: Vec<String>,
pub target: String,
}Expand description
Represents a learning problem in Inductive Logic Programming. ILP learns logic programs (Horn clauses) from examples and background knowledge.
Fields§
§positive_examples: Vec<String>Positive examples (facts that should be entailed).
negative_examples: Vec<String>Negative examples (facts that should NOT be entailed).
background: Vec<String>Background knowledge (predefined facts and rules).
target: StringTarget predicate to learn.
Implementations§
Source§impl ILPProblem
impl ILPProblem
Sourcepub fn add_positive(&mut self, example: &str)
pub fn add_positive(&mut self, example: &str)
Add a positive example.
Sourcepub fn add_negative(&mut self, example: &str)
pub fn add_negative(&mut self, example: &str)
Add a negative example.
Sourcepub fn add_background(&mut self, fact: &str)
pub fn add_background(&mut self, fact: &str)
Add background knowledge.
Sourcepub fn total_examples(&self) -> usize
pub fn total_examples(&self) -> usize
Count the total number of training examples.
Trait Implementations§
Source§impl Clone for ILPProblem
impl Clone for ILPProblem
Source§fn clone(&self) -> ILPProblem
fn clone(&self) -> ILPProblem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ILPProblem
impl RefUnwindSafe for ILPProblem
impl Send for ILPProblem
impl Sync for ILPProblem
impl Unpin for ILPProblem
impl UnsafeUnpin for ILPProblem
impl UnwindSafe for ILPProblem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more