lcc.stars_processing package

Subpackages

Submodules

lcc.stars_processing.stars_filter module

class lcc.stars_processing.stars_filter.StarsFilter(descriptors, deciders)[source]

Bases: object

This class is responsible for filtering stars according to given filters (their own implementation of filtering)

Attributes

descriptors (list) Descriptor objects
decider (list) Decider object
learned (bool) It is True after executing the learning
searched_coords (list) Parameters space coordinates (got from descriptors) of searched objects
others_coords (list) Parameters space coordinates (got from descriptors) of contamination objects

Methods

evaluateCoordinates(*args, **kwargs)[source]

Get probability of membership calculated from all deciders

Parameters:

stars_coords : list, iterable

List of coordinates (lists)

meth : str

Method for filtering:

mean - mean probability

highest - highest probability

lowest - lowest probability

Returns:

list

Probabilities of membership according to selected the method

evaluateStars(stars, meth='mean')[source]

Get probabilities of membership of inspected stars

Parameters:

stars : list

Star objects

meth : str

Method for filtering:

mean - mean probability

highest - highest probability

lowest - lowest probability

Returns:

list

Probabilities of membership according to selected the method

filterStars(*args, **kwargs)[source]

Apply all deciders

Parameters:

stars : list, iterable

Star objects to be filtered

pass_method : str

Inspected star pass if it fulfill the selected condition. Methods for filtering:

all - all probabilities have to be greater then the treshold

mean - mean probability has to be greater then the treshold

one - at least one has to be greater then the treshold

Returns:

list of `Star`s

Stars which passed thru filtering

getSpaceCoordinates(stars)[source]

Get params space coordinates according to descriptors

Parameters:

stars : list, tuple

List of Star objects

Returns:

pandas.DataFrame

Coordinates of the stars as pandas DataFrame

getStatistic(*args, **kwargs)[source]
Parameters:

s_stars : list of Star objects

Searched stars

c_stars : list of Star objects

Contamination stars

treshold : float

Treshold value for filtering (number from 0 to 1)

Returns:

statistic information : dict

precision (float)

True positive / (true positive + false positive)

true_positive_rate (float)

Proportion of positives that are correctly identified as such

true_negative_rate :(float)

Proportion of negatives that are correctly identified as such

false_positive_rate (float)

Proportion of positives that are incorrectly identified as negatives

false_negative_rate (float)

Proportion of negatives that are incorrectly identified as positives

learn(searched, others)[source]

Train deciders on given sample of Star objects

Parameters:

searched : list, tuple

Sample of searched group of stars

others : list, tuple

Contamination sample of stars

Returns:

None

learnOnCoords(searched_coords, others_coords)[source]

Train deciders on given sample of coordinates

Parameters:

searched_coords : pandas.DataFram, list, tuple

Sample of searched coordinates

others_coords : pandas.DataFram, list, tuple

Contamination sample of coordinates

Returns:

None

Module contents