pub struct FeatureExtractor;Expand description
Extract features from OIP defect record
Implementations§
Source§impl FeatureExtractor
impl FeatureExtractor
pub fn new() -> Self
Sourcepub fn extract(
&self,
category: u8,
files_changed: usize,
lines_added: usize,
lines_deleted: usize,
timestamp: i64,
) -> Result<CommitFeatures>
pub fn extract( &self, category: u8, files_changed: usize, lines_added: usize, lines_deleted: usize, timestamp: i64, ) -> Result<CommitFeatures>
Extract features from defect category and metadata
Uses default values for CITL fields (backwards compatible)
Sourcepub fn extract_with_citl(
&self,
category: u8,
files_changed: usize,
lines_added: usize,
lines_deleted: usize,
timestamp: i64,
error_code_class: ErrorCodeClass,
has_suggestion: bool,
suggestion_applicability: SuggestionApplicability,
clippy_lint_count: u8,
span_line_delta: f32,
diagnostic_confidence: f32,
) -> Result<CommitFeatures>
pub fn extract_with_citl( &self, category: u8, files_changed: usize, lines_added: usize, lines_deleted: usize, timestamp: i64, error_code_class: ErrorCodeClass, has_suggestion: bool, suggestion_applicability: SuggestionApplicability, clippy_lint_count: u8, span_line_delta: f32, diagnostic_confidence: f32, ) -> Result<CommitFeatures>
Extract features with CITL diagnostic information (NLP-014)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FeatureExtractor
impl RefUnwindSafe for FeatureExtractor
impl Send for FeatureExtractor
impl Sync for FeatureExtractor
impl Unpin for FeatureExtractor
impl UnwindSafe for FeatureExtractor
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more