partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
valid | kmeans.__update_centers | !
@brief Calculate centers of clusters in line with contained objects.
@return (numpy.array) Updated centers. | pyclustering/cluster/kmeans.py | def __update_centers(self):
"""!
@brief Calculate centers of clusters in line with contained objects.
@return (numpy.array) Updated centers.
"""
dimension = self.__pointer_data.shape[1]
centers = numpy.zeros((len(self.__clusters), dimen... | def __update_centers(self):
"""!
@brief Calculate centers of clusters in line with contained objects.
@return (numpy.array) Updated centers.
"""
dimension = self.__pointer_data.shape[1]
centers = numpy.zeros((len(self.__clusters), dimen... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/kmeans.py#L512-L527 | [
"def",
"__update_centers",
"(",
"self",
")",
":",
"dimension",
"=",
"self",
".",
"__pointer_data",
".",
"shape",
"[",
"1",
"]",
"centers",
"=",
"numpy",
".",
"zeros",
"(",
"(",
"len",
"(",
"self",
".",
"__clusters",
")",
",",
"dimension",
")",
")",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans.__calculate_total_wce | !
@brief Calculate total within cluster errors that is depend on metric that was chosen for K-Means algorithm. | pyclustering/cluster/kmeans.py | def __calculate_total_wce(self):
"""!
@brief Calculate total within cluster errors that is depend on metric that was chosen for K-Means algorithm.
"""
dataset_differences = self.__calculate_dataset_difference(len(self.__clusters))
self.__total_wce = 0
for inde... | def __calculate_total_wce(self):
"""!
@brief Calculate total within cluster errors that is depend on metric that was chosen for K-Means algorithm.
"""
dataset_differences = self.__calculate_dataset_difference(len(self.__clusters))
self.__total_wce = 0
for inde... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/kmeans.py#L530-L541 | [
"def",
"__calculate_total_wce",
"(",
"self",
")",
":",
"dataset_differences",
"=",
"self",
".",
"__calculate_dataset_difference",
"(",
"len",
"(",
"self",
".",
"__clusters",
")",
")",
"self",
".",
"__total_wce",
"=",
"0",
"for",
"index_cluster",
"in",
"range",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans.__calculate_dataset_difference | !
@brief Calculate distance from each point to each cluster center. | pyclustering/cluster/kmeans.py | def __calculate_dataset_difference(self, amount_clusters):
"""!
@brief Calculate distance from each point to each cluster center.
"""
dataset_differences = numpy.zeros((amount_clusters, len(self.__pointer_data)))
for index_center in range(amount_clusters):
if ... | def __calculate_dataset_difference(self, amount_clusters):
"""!
@brief Calculate distance from each point to each cluster center.
"""
dataset_differences = numpy.zeros((amount_clusters, len(self.__pointer_data)))
for index_center in range(amount_clusters):
if ... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/kmeans.py#L544-L557 | [
"def",
"__calculate_dataset_difference",
"(",
"self",
",",
"amount_clusters",
")",
":",
"dataset_differences",
"=",
"numpy",
".",
"zeros",
"(",
"(",
"amount_clusters",
",",
"len",
"(",
"self",
".",
"__pointer_data",
")",
")",
")",
"for",
"index_center",
"in",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans.__calculate_changes | !
@brief Calculates changes estimation between previous and current iteration using centers for that purpose.
@param[in] updated_centers (array_like): New cluster centers.
@return (float) Maximum changes between centers. | pyclustering/cluster/kmeans.py | def __calculate_changes(self, updated_centers):
"""!
@brief Calculates changes estimation between previous and current iteration using centers for that purpose.
@param[in] updated_centers (array_like): New cluster centers.
@return (float) Maximum changes between centers.
... | def __calculate_changes(self, updated_centers):
"""!
@brief Calculates changes estimation between previous and current iteration using centers for that purpose.
@param[in] updated_centers (array_like): New cluster centers.
@return (float) Maximum changes between centers.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/kmeans.py#L560-L576 | [
"def",
"__calculate_changes",
"(",
"self",
",",
"updated_centers",
")",
":",
"if",
"len",
"(",
"self",
".",
"__centers",
")",
"!=",
"len",
"(",
"updated_centers",
")",
":",
"maximum_change",
"=",
"float",
"(",
"'inf'",
")",
"else",
":",
"changes",
"=",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | random_center_initializer.initialize | !
@brief Generates random centers in line with input parameters.
@param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'return_index').
<b>Keyword Args:</b><br>
- return_index (bool): If True then returns indexes of points from input data instead of points itself.
... | pyclustering/cluster/center_initializer.py | def initialize(self, **kwargs):
"""!
@brief Generates random centers in line with input parameters.
@param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'return_index').
<b>Keyword Args:</b><br>
- return_index (bool): If True then returns indexes of points... | def initialize(self, **kwargs):
"""!
@brief Generates random centers in line with input parameters.
@param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'return_index').
<b>Keyword Args:</b><br>
- return_index (bool): If True then returns indexes of points... | [
"!",
"@brief",
"Generates",
"random",
"centers",
"in",
"line",
"with",
"input",
"parameters",
"."
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/center_initializer.py#L62-L82 | [
"def",
"initialize",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return_index",
"=",
"kwargs",
".",
"get",
"(",
"'return_index'",
",",
"False",
")",
"if",
"self",
".",
"__amount",
"==",
"len",
"(",
"self",
".",
"__data",
")",
":",
"if",
"return_... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | random_center_initializer.__create_center | !
@brief Generates and returns random center.
@param[in] return_index (bool): If True then returns index of point from input data instead of point itself. | pyclustering/cluster/center_initializer.py | def __create_center(self, return_index):
"""!
@brief Generates and returns random center.
@param[in] return_index (bool): If True then returns index of point from input data instead of point itself.
"""
random_index_point = random.randint(0, len(self.__data[0]))
... | def __create_center(self, return_index):
"""!
@brief Generates and returns random center.
@param[in] return_index (bool): If True then returns index of point from input data instead of point itself.
"""
random_index_point = random.randint(0, len(self.__data[0]))
... | [
"!",
"@brief",
"Generates",
"and",
"returns",
"random",
"center",
"."
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/center_initializer.py#L85-L100 | [
"def",
"__create_center",
"(",
"self",
",",
"return_index",
")",
":",
"random_index_point",
"=",
"random",
".",
"randint",
"(",
"0",
",",
"len",
"(",
"self",
".",
"__data",
"[",
"0",
"]",
")",
")",
"if",
"random_index_point",
"not",
"in",
"self",
".",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans_plusplus_initializer.__check_parameters | !
@brief Checks input parameters of the algorithm and if something wrong then corresponding exception is thrown. | pyclustering/cluster/center_initializer.py | def __check_parameters(self):
"""!
@brief Checks input parameters of the algorithm and if something wrong then corresponding exception is thrown.
"""
if (self.__amount <= 0) or (self.__amount > len(self.__data)):
raise AttributeError("Amount of cluster centers '" + str(self.... | def __check_parameters(self):
"""!
@brief Checks input parameters of the algorithm and if something wrong then corresponding exception is thrown.
"""
if (self.__amount <= 0) or (self.__amount > len(self.__data)):
raise AttributeError("Amount of cluster centers '" + str(self.... | [
"!",
"@brief",
"Checks",
"input",
"parameters",
"of",
"the",
"algorithm",
"and",
"if",
"something",
"wrong",
"then",
"corresponding",
"exception",
"is",
"thrown",
"."
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/center_initializer.py#L194-L209 | [
"def",
"__check_parameters",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"__amount",
"<=",
"0",
")",
"or",
"(",
"self",
".",
"__amount",
">",
"len",
"(",
"self",
".",
"__data",
")",
")",
":",
"raise",
"AttributeError",
"(",
"\"Amount of cluster center... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans_plusplus_initializer.__get_next_center | !
@brief Calculates the next center for the data.
@param[in] centers (array_like): Current initialized centers.
@param[in] return_index (bool): If True then return center's index instead of point.
@return (array_like) Next initialized center.<br>
(uint) Index of next in... | pyclustering/cluster/center_initializer.py | def __get_next_center(self, centers, return_index):
"""!
@brief Calculates the next center for the data.
@param[in] centers (array_like): Current initialized centers.
@param[in] return_index (bool): If True then return center's index instead of point.
@return (array_like) Next ... | def __get_next_center(self, centers, return_index):
"""!
@brief Calculates the next center for the data.
@param[in] centers (array_like): Current initialized centers.
@param[in] return_index (bool): If True then return center's index instead of point.
@return (array_like) Next ... | [
"!",
"@brief",
"Calculates",
"the",
"next",
"center",
"for",
"the",
"data",
"."
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/center_initializer.py#L243-L266 | [
"def",
"__get_next_center",
"(",
"self",
",",
"centers",
",",
"return_index",
")",
":",
"distances",
"=",
"self",
".",
"__calculate_shortest_distances",
"(",
"self",
".",
"__data",
",",
"centers",
",",
"return_index",
")",
"if",
"self",
".",
"__candidates",
"=... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans_plusplus_initializer.__get_initial_center | !
@brief Choose randomly first center.
@param[in] return_index (bool): If True then return center's index instead of point.
@return (array_like) First center.<br>
(uint) Index of first center. | pyclustering/cluster/center_initializer.py | def __get_initial_center(self, return_index):
"""!
@brief Choose randomly first center.
@param[in] return_index (bool): If True then return center's index instead of point.
@return (array_like) First center.<br>
(uint) Index of first center.
"""
index_... | def __get_initial_center(self, return_index):
"""!
@brief Choose randomly first center.
@param[in] return_index (bool): If True then return center's index instead of point.
@return (array_like) First center.<br>
(uint) Index of first center.
"""
index_... | [
"!",
"@brief",
"Choose",
"randomly",
"first",
"center",
"."
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/center_initializer.py#L269-L284 | [
"def",
"__get_initial_center",
"(",
"self",
",",
"return_index",
")",
":",
"index_center",
"=",
"random",
".",
"randint",
"(",
"0",
",",
"len",
"(",
"self",
".",
"__data",
")",
"-",
"1",
")",
"if",
"return_index",
":",
"return",
"index_center",
"return",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans_plusplus_initializer.__calculate_probabilities | !
@brief Calculates cumulative probabilities of being center of each point.
@param[in] distances (array_like): Distances from each point to closest center.
@return (array_like) Cumulative probabilities of being center of each point. | pyclustering/cluster/center_initializer.py | def __calculate_probabilities(self, distances):
"""!
@brief Calculates cumulative probabilities of being center of each point.
@param[in] distances (array_like): Distances from each point to closest center.
@return (array_like) Cumulative probabilities of being center of each point.
... | def __calculate_probabilities(self, distances):
"""!
@brief Calculates cumulative probabilities of being center of each point.
@param[in] distances (array_like): Distances from each point to closest center.
@return (array_like) Cumulative probabilities of being center of each point.
... | [
"!",
"@brief",
"Calculates",
"cumulative",
"probabilities",
"of",
"being",
"center",
"of",
"each",
"point",
"."
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/center_initializer.py#L287-L302 | [
"def",
"__calculate_probabilities",
"(",
"self",
",",
"distances",
")",
":",
"total_distance",
"=",
"numpy",
".",
"sum",
"(",
"distances",
")",
"if",
"total_distance",
"!=",
"0.0",
":",
"probabilities",
"=",
"distances",
"/",
"total_distance",
"return",
"numpy",... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans_plusplus_initializer.__get_probable_center | !
@brief Calculates the next probable center considering amount candidates.
@param[in] distances (array_like): Distances from each point to closest center.
@param[in] probabilities (array_like): Cumulative probabilities of being center of each point.
@return (uint) Index point that is ... | pyclustering/cluster/center_initializer.py | def __get_probable_center(self, distances, probabilities):
"""!
@brief Calculates the next probable center considering amount candidates.
@param[in] distances (array_like): Distances from each point to closest center.
@param[in] probabilities (array_like): Cumulative probabilities of be... | def __get_probable_center(self, distances, probabilities):
"""!
@brief Calculates the next probable center considering amount candidates.
@param[in] distances (array_like): Distances from each point to closest center.
@param[in] probabilities (array_like): Cumulative probabilities of be... | [
"!",
"@brief",
"Calculates",
"the",
"next",
"probable",
"center",
"considering",
"amount",
"candidates",
"."
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/center_initializer.py#L305-L331 | [
"def",
"__get_probable_center",
"(",
"self",
",",
"distances",
",",
"probabilities",
")",
":",
"index_best_candidate",
"=",
"-",
"1",
"for",
"_",
"in",
"range",
"(",
"self",
".",
"__candidates",
")",
":",
"candidate_probability",
"=",
"random",
".",
"random",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmeans_plusplus_initializer.initialize | !
@brief Calculates initial centers using K-Means++ method.
@param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'return_index').
<b>Keyword Args:</b><br>
- return_index (bool): If True then returns indexes of points from input data instead of points itself.
... | pyclustering/cluster/center_initializer.py | def initialize(self, **kwargs):
"""!
@brief Calculates initial centers using K-Means++ method.
@param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'return_index').
<b>Keyword Args:</b><br>
- return_index (bool): If True then returns indexes of points from... | def initialize(self, **kwargs):
"""!
@brief Calculates initial centers using K-Means++ method.
@param[in] **kwargs: Arbitrary keyword arguments (available arguments: 'return_index').
<b>Keyword Args:</b><br>
- return_index (bool): If True then returns indexes of points from... | [
"!",
"@brief",
"Calculates",
"initial",
"centers",
"using",
"K",
"-",
"Means",
"++",
"method",
"."
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/center_initializer.py#L334-L364 | [
"def",
"initialize",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"return_index",
"=",
"kwargs",
".",
"get",
"(",
"'return_index'",
",",
"False",
")",
"index_point",
"=",
"self",
".",
"__get_initial_center",
"(",
"True",
")",
"centers",
"=",
"[",
"ind... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | twenty_five_neurons_mix_stimulated | Object allocation | pyclustering/nnet/examples/pcnn_examples.py | def twenty_five_neurons_mix_stimulated():
"Object allocation"
"If M = 0 then only object will be allocated"
params = pcnn_parameters();
params.AF = 0.1;
params.AL = 0.0;
params.AT = 0.7;
params.VF = 1.0;
params.VL = 1.0;
params.VT = 10.0;
params.M = 0.0;
... | def twenty_five_neurons_mix_stimulated():
"Object allocation"
"If M = 0 then only object will be allocated"
params = pcnn_parameters();
params.AF = 0.1;
params.AL = 0.0;
params.AT = 0.7;
params.VF = 1.0;
params.VL = 1.0;
params.VT = 10.0;
params.M = 0.0;
... | [
"Object",
"allocation"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/examples/pcnn_examples.py#L65-L82 | [
"def",
"twenty_five_neurons_mix_stimulated",
"(",
")",
":",
"\"If M = 0 then only object will be allocated\"",
"params",
"=",
"pcnn_parameters",
"(",
")",
"params",
".",
"AF",
"=",
"0.1",
"params",
".",
"AL",
"=",
"0.0",
"params",
".",
"AT",
"=",
"0.7",
"params",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | hundred_neurons_mix_stimulated | Allocate several clusters: the first contains borders (indexes of oscillators) and the second objects (indexes of oscillators) | pyclustering/nnet/examples/pcnn_examples.py | def hundred_neurons_mix_stimulated():
"Allocate several clusters: the first contains borders (indexes of oscillators) and the second objects (indexes of oscillators)"
params = pcnn_parameters();
params.AF = 0.1;
params.AL = 0.1;
params.AT = 0.8;
params.VF = 1.0;
params.VL = 1.0;... | def hundred_neurons_mix_stimulated():
"Allocate several clusters: the first contains borders (indexes of oscillators) and the second objects (indexes of oscillators)"
params = pcnn_parameters();
params.AF = 0.1;
params.AL = 0.1;
params.AT = 0.8;
params.VF = 1.0;
params.VL = 1.0;... | [
"Allocate",
"several",
"clusters",
":",
"the",
"first",
"contains",
"borders",
"(",
"indexes",
"of",
"oscillators",
")",
"and",
"the",
"second",
"objects",
"(",
"indexes",
"of",
"oscillators",
")"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/examples/pcnn_examples.py#L84-L106 | [
"def",
"hundred_neurons_mix_stimulated",
"(",
")",
":",
"params",
"=",
"pcnn_parameters",
"(",
")",
"params",
".",
"AF",
"=",
"0.1",
"params",
".",
"AL",
"=",
"0.1",
"params",
".",
"AT",
"=",
"0.8",
"params",
".",
"VF",
"=",
"1.0",
"params",
".",
"VL",... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | dynamic_descr.__get_canonical_separate | !
@brief Return unified representation of separation value.
@details It represents list whose size is equal to amount of dynamics, where index of dynamic will show
where it should be displayed.
@param[in] input_separate (bool|list): Input separate representation that shou... | pyclustering/nnet/dynamic_visualizer.py | def __get_canonical_separate(self, input_separate):
"""!
@brief Return unified representation of separation value.
@details It represents list whose size is equal to amount of dynamics, where index of dynamic will show
where it should be displayed.
@param[in] inp... | def __get_canonical_separate(self, input_separate):
"""!
@brief Return unified representation of separation value.
@details It represents list whose size is equal to amount of dynamics, where index of dynamic will show
where it should be displayed.
@param[in] inp... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/dynamic_visualizer.py#L129-L162 | [
"def",
"__get_canonical_separate",
"(",
"self",
",",
"input_separate",
")",
":",
"if",
"(",
"isinstance",
"(",
"input_separate",
",",
"list",
")",
")",
":",
"separate",
"=",
"[",
"0",
"]",
"*",
"len",
"(",
"self",
".",
"dynamics",
"[",
"0",
"]",
")",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | dynamic_visualizer.set_canvas_properties | !
@brief Set properties for specified canvas.
@param[in] canvas (uint): Index of canvas whose properties should changed.
@param[in] x_title (string): Title for X axis, if 'None', then nothing is displayed.
@param[in] y_title (string): Title for Y axis, if 'None', then nothing is di... | pyclustering/nnet/dynamic_visualizer.py | def set_canvas_properties(self, canvas, x_title=None, y_title=None, x_lim=None, y_lim=None, x_labels=True, y_labels=True):
"""!
@brief Set properties for specified canvas.
@param[in] canvas (uint): Index of canvas whose properties should changed.
@param[in] x_title (string): Title ... | def set_canvas_properties(self, canvas, x_title=None, y_title=None, x_lim=None, y_lim=None, x_labels=True, y_labels=True):
"""!
@brief Set properties for specified canvas.
@param[in] canvas (uint): Index of canvas whose properties should changed.
@param[in] x_title (string): Title ... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/dynamic_visualizer.py#L195-L210 | [
"def",
"set_canvas_properties",
"(",
"self",
",",
"canvas",
",",
"x_title",
"=",
"None",
",",
"y_title",
"=",
"None",
",",
"x_lim",
"=",
"None",
",",
"y_lim",
"=",
"None",
",",
"x_labels",
"=",
"True",
",",
"y_labels",
"=",
"True",
")",
":",
"self",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | dynamic_visualizer.append_dynamic | !
@brief Append single dynamic to specified canvas (by default to the first with index '0').
@param[in] t (list): Time points that corresponds to dynamic values and considered on a X axis.
@param[in] dynamic (list): Value points of dynamic that are considered on an Y axis.
@param[i... | pyclustering/nnet/dynamic_visualizer.py | def append_dynamic(self, t, dynamic, canvas=0, color='blue'):
"""!
@brief Append single dynamic to specified canvas (by default to the first with index '0').
@param[in] t (list): Time points that corresponds to dynamic values and considered on a X axis.
@param[in] dynamic (list): V... | def append_dynamic(self, t, dynamic, canvas=0, color='blue'):
"""!
@brief Append single dynamic to specified canvas (by default to the first with index '0').
@param[in] t (list): Time points that corresponds to dynamic values and considered on a X axis.
@param[in] dynamic (list): V... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/dynamic_visualizer.py#L213-L225 | [
"def",
"append_dynamic",
"(",
"self",
",",
"t",
",",
"dynamic",
",",
"canvas",
"=",
"0",
",",
"color",
"=",
"'blue'",
")",
":",
"description",
"=",
"dynamic_descr",
"(",
"canvas",
",",
"t",
",",
"dynamic",
",",
"False",
",",
"color",
")",
"self",
"."... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | dynamic_visualizer.append_dynamics | !
@brief Append several dynamics to canvas or canvases (defined by 'canvas' and 'separate' arguments).
@param[in] t (list): Time points that corresponds to dynamic values and considered on a X axis.
@param[in] dynamics (list): Dynamics where each of them is considered on Y axis.
@p... | pyclustering/nnet/dynamic_visualizer.py | def append_dynamics(self, t, dynamics, canvas=0, separate=False, color='blue'):
"""!
@brief Append several dynamics to canvas or canvases (defined by 'canvas' and 'separate' arguments).
@param[in] t (list): Time points that corresponds to dynamic values and considered on a X axis.
... | def append_dynamics(self, t, dynamics, canvas=0, separate=False, color='blue'):
"""!
@brief Append several dynamics to canvas or canvases (defined by 'canvas' and 'separate' arguments).
@param[in] t (list): Time points that corresponds to dynamic values and considered on a X axis.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/dynamic_visualizer.py#L228-L245 | [
"def",
"append_dynamics",
"(",
"self",
",",
"t",
",",
"dynamics",
",",
"canvas",
"=",
"0",
",",
"separate",
"=",
"False",
",",
"color",
"=",
"'blue'",
")",
":",
"description",
"=",
"dynamic_descr",
"(",
"canvas",
",",
"t",
",",
"dynamics",
",",
"separa... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | dynamic_visualizer.show | !
@brief Draw and show output dynamics.
@param[in] axis (axis): If is not 'None' then user specified axis is used to display output dynamic.
@param[in] display (bool): Whether output dynamic should be displayed or not, if not, then user
should call 'plt.show()' by himse... | pyclustering/nnet/dynamic_visualizer.py | def show(self, axis=None, display=True):
"""!
@brief Draw and show output dynamics.
@param[in] axis (axis): If is not 'None' then user specified axis is used to display output dynamic.
@param[in] display (bool): Whether output dynamic should be displayed or not, if not, then user
... | def show(self, axis=None, display=True):
"""!
@brief Draw and show output dynamics.
@param[in] axis (axis): If is not 'None' then user specified axis is used to display output dynamic.
@param[in] display (bool): Whether output dynamic should be displayed or not, if not, then user
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/dynamic_visualizer.py#L248-L267 | [
"def",
"show",
"(",
"self",
",",
"axis",
"=",
"None",
",",
"display",
"=",
"True",
")",
":",
"if",
"(",
"not",
"axis",
")",
":",
"(",
"_",
",",
"axis",
")",
"=",
"plt",
".",
"subplots",
"(",
"self",
".",
"__size",
",",
"1",
")",
"self",
".",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_dynamic.output | !
@brief (list) Returns oscillato outputs during simulation. | pyclustering/nnet/pcnn.py | def output(self):
"""!
@brief (list) Returns oscillato outputs during simulation.
"""
if self.__ccore_pcnn_dynamic_pointer is not None:
return wrapper.pcnn_dynamic_get_output(self.__ccore_pcnn_dynamic_pointer)
return self.__dynamic | def output(self):
"""!
@brief (list) Returns oscillato outputs during simulation.
"""
if self.__ccore_pcnn_dynamic_pointer is not None:
return wrapper.pcnn_dynamic_get_output(self.__ccore_pcnn_dynamic_pointer)
return self.__dynamic | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L107-L115 | [
"def",
"output",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
"is",
"not",
"None",
":",
"return",
"wrapper",
".",
"pcnn_dynamic_get_output",
"(",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
")",
"return",
"self",
".",
"__dynamic"
] | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_dynamic.time | !
@brief (list) Returns sampling times when dynamic is measured during simulation. | pyclustering/nnet/pcnn.py | def time(self):
"""!
@brief (list) Returns sampling times when dynamic is measured during simulation.
"""
if self.__ccore_pcnn_dynamic_pointer is not None:
return wrapper.pcnn_dynamic_get_time(self.__ccore_pcnn_dynamic_pointer)
return list(ra... | def time(self):
"""!
@brief (list) Returns sampling times when dynamic is measured during simulation.
"""
if self.__ccore_pcnn_dynamic_pointer is not None:
return wrapper.pcnn_dynamic_get_time(self.__ccore_pcnn_dynamic_pointer)
return list(ra... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L119-L127 | [
"def",
"time",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
"is",
"not",
"None",
":",
"return",
"wrapper",
".",
"pcnn_dynamic_get_time",
"(",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
")",
"return",
"list",
"(",
"range",
"(",
"l... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_dynamic.allocate_sync_ensembles | !
@brief Allocate clusters in line with ensembles of synchronous oscillators where each
synchronous ensemble corresponds to only one cluster.
@return (list) Grours (lists) of indexes of synchronous oscillators.
For example, [ [index_osc1, index_osc3], [index... | pyclustering/nnet/pcnn.py | def allocate_sync_ensembles(self):
"""!
@brief Allocate clusters in line with ensembles of synchronous oscillators where each
synchronous ensemble corresponds to only one cluster.
@return (list) Grours (lists) of indexes of synchronous oscillators.
... | def allocate_sync_ensembles(self):
"""!
@brief Allocate clusters in line with ensembles of synchronous oscillators where each
synchronous ensemble corresponds to only one cluster.
@return (list) Grours (lists) of indexes of synchronous oscillators.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L165-L194 | [
"def",
"allocate_sync_ensembles",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
"is",
"not",
"None",
":",
"return",
"wrapper",
".",
"pcnn_dynamic_allocate_sync_ensembles",
"(",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
")",
"sync_ensembles... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_dynamic.allocate_spike_ensembles | !
@brief Analyses output dynamic of network and allocates spikes on each iteration as a list of indexes of oscillators.
@details Each allocated spike ensemble represents list of indexes of oscillators whose output is active.
@return (list) Spike ensembles of oscillators. | pyclustering/nnet/pcnn.py | def allocate_spike_ensembles(self):
"""!
@brief Analyses output dynamic of network and allocates spikes on each iteration as a list of indexes of oscillators.
@details Each allocated spike ensemble represents list of indexes of oscillators whose output is active.
@return (l... | def allocate_spike_ensembles(self):
"""!
@brief Analyses output dynamic of network and allocates spikes on each iteration as a list of indexes of oscillators.
@details Each allocated spike ensemble represents list of indexes of oscillators whose output is active.
@return (l... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L197-L222 | [
"def",
"allocate_spike_ensembles",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
"is",
"not",
"None",
":",
"return",
"wrapper",
".",
"pcnn_dynamic_allocate_spike_ensembles",
"(",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
")",
"spike_ensemb... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_dynamic.allocate_time_signal | !
@brief Analyses output dynamic and calculates time signal (signal vector information) of network output.
@return (list) Time signal of network output. | pyclustering/nnet/pcnn.py | def allocate_time_signal(self):
"""!
@brief Analyses output dynamic and calculates time signal (signal vector information) of network output.
@return (list) Time signal of network output.
"""
if self.__ccore_pcnn_dynamic_pointer is not None:
... | def allocate_time_signal(self):
"""!
@brief Analyses output dynamic and calculates time signal (signal vector information) of network output.
@return (list) Time signal of network output.
"""
if self.__ccore_pcnn_dynamic_pointer is not None:
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L225-L240 | [
"def",
"allocate_time_signal",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
"is",
"not",
"None",
":",
"return",
"wrapper",
".",
"pcnn_dynamic_allocate_time_signal",
"(",
"self",
".",
"__ccore_pcnn_dynamic_pointer",
")",
"signal_vector_inform... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_visualizer.show_time_signal | !
@brief Shows time signal (signal vector information) using network dynamic during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network. | pyclustering/nnet/pcnn.py | def show_time_signal(pcnn_output_dynamic):
"""!
@brief Shows time signal (signal vector information) using network dynamic during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
"""
... | def show_time_signal(pcnn_output_dynamic):
"""!
@brief Shows time signal (signal vector information) using network dynamic during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
"""
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L250-L267 | [
"def",
"show_time_signal",
"(",
"pcnn_output_dynamic",
")",
":",
"time_signal",
"=",
"pcnn_output_dynamic",
".",
"allocate_time_signal",
"(",
")",
"time_axis",
"=",
"range",
"(",
"len",
"(",
"time_signal",
")",
")",
"plt",
".",
"subplot",
"(",
"1",
",",
"1",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_visualizer.show_output_dynamic | !
@brief Shows output dynamic (output of each oscillator) during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
@param[in] separate_representation (list): Consists of lists of oscillators where each such list consists o... | pyclustering/nnet/pcnn.py | def show_output_dynamic(pcnn_output_dynamic, separate_representation = False):
"""!
@brief Shows output dynamic (output of each oscillator) during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
@param[in] separ... | def show_output_dynamic(pcnn_output_dynamic, separate_representation = False):
"""!
@brief Shows output dynamic (output of each oscillator) during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
@param[in] separ... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L270-L279 | [
"def",
"show_output_dynamic",
"(",
"pcnn_output_dynamic",
",",
"separate_representation",
"=",
"False",
")",
":",
"draw_dynamics",
"(",
"pcnn_output_dynamic",
".",
"time",
",",
"pcnn_output_dynamic",
".",
"output",
",",
"x_title",
"=",
"\"t\"",
",",
"y_title",
"=",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_visualizer.animate_spike_ensembles | !
@brief Shows animation of output dynamic (output of each oscillator) during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
@param[in] image_size (tuple): Image size represented as (height, width). | pyclustering/nnet/pcnn.py | def animate_spike_ensembles(pcnn_output_dynamic, image_size):
"""!
@brief Shows animation of output dynamic (output of each oscillator) during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
@param[in] image_siz... | def animate_spike_ensembles(pcnn_output_dynamic, image_size):
"""!
@brief Shows animation of output dynamic (output of each oscillator) during simulation.
@param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
@param[in] image_siz... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L282-L315 | [
"def",
"animate_spike_ensembles",
"(",
"pcnn_output_dynamic",
",",
"image_size",
")",
":",
"figure",
"=",
"plt",
".",
"figure",
"(",
")",
"time_signal",
"=",
"pcnn_output_dynamic",
".",
"allocate_time_signal",
"(",
")",
"spike_ensembles",
"=",
"pcnn_output_dynamic",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_network.simulate | !
@brief Performs static simulation of pulse coupled neural network using.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] stimulus (list): Stimulus for oscillators, number of stimulus should be equal to number of oscillators.
@r... | pyclustering/nnet/pcnn.py | def simulate(self, steps, stimulus):
"""!
@brief Performs static simulation of pulse coupled neural network using.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] stimulus (list): Stimulus for oscillators, number of stimulus should be equa... | def simulate(self, steps, stimulus):
"""!
@brief Performs static simulation of pulse coupled neural network using.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] stimulus (list): Stimulus for oscillators, number of stimulus should be equa... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L427-L453 | [
"def",
"simulate",
"(",
"self",
",",
"steps",
",",
"stimulus",
")",
":",
"if",
"len",
"(",
"stimulus",
")",
"!=",
"len",
"(",
"self",
")",
":",
"raise",
"NameError",
"(",
"'Number of stimulus should be equal to number of oscillators. Each stimulus corresponds to only ... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | pcnn_network._calculate_states | !
@brief Calculates states of oscillators in the network for current step and stored them except outputs of oscillators.
@param[in] stimulus (list): Stimulus for oscillators, number of stimulus should be equal to number of oscillators.
@return (list) New outputs for oscill... | pyclustering/nnet/pcnn.py | def _calculate_states(self, stimulus):
"""!
@brief Calculates states of oscillators in the network for current step and stored them except outputs of oscillators.
@param[in] stimulus (list): Stimulus for oscillators, number of stimulus should be equal to number of oscillators.
... | def _calculate_states(self, stimulus):
"""!
@brief Calculates states of oscillators in the network for current step and stored them except outputs of oscillators.
@param[in] stimulus (list): Stimulus for oscillators, number of stimulus should be equal to number of oscillators.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/pcnn.py#L456-L542 | [
"def",
"_calculate_states",
"(",
"self",
",",
"stimulus",
")",
":",
"feeding",
"=",
"[",
"0.0",
"]",
"*",
"self",
".",
"_num_osc",
"linking",
"=",
"[",
"0.0",
"]",
"*",
"self",
".",
"_num_osc",
"outputs",
"=",
"[",
"0.0",
"]",
"*",
"self",
".",
"_n... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.size | !
@brief Return size of self-organized map that is defined by total number of neurons.
@return (uint) Size of self-organized map (number of neurons). | pyclustering/nnet/som.py | def size(self):
"""!
@brief Return size of self-organized map that is defined by total number of neurons.
@return (uint) Size of self-organized map (number of neurons).
"""
if self.__ccore_som_pointer is not None:
self._size = wrapper.som_g... | def size(self):
"""!
@brief Return size of self-organized map that is defined by total number of neurons.
@return (uint) Size of self-organized map (number of neurons).
"""
if self.__ccore_som_pointer is not None:
self._size = wrapper.som_g... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L183-L194 | [
"def",
"size",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"self",
".",
"_size",
"=",
"wrapper",
".",
"som_get_size",
"(",
"self",
".",
"__ccore_som_pointer",
")",
"return",
"self",
".",
"_size"
] | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.weights | !
@brief Return weight of each neuron.
@return (list) Weights of each neuron. | pyclustering/nnet/som.py | def weights(self):
"""!
@brief Return weight of each neuron.
@return (list) Weights of each neuron.
"""
if self.__ccore_som_pointer is not None:
self._weights = wrapper.som_get_weights(self.__ccore_som_pointer)
return sel... | def weights(self):
"""!
@brief Return weight of each neuron.
@return (list) Weights of each neuron.
"""
if self.__ccore_som_pointer is not None:
self._weights = wrapper.som_get_weights(self.__ccore_som_pointer)
return sel... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L197-L208 | [
"def",
"weights",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"self",
".",
"_weights",
"=",
"wrapper",
".",
"som_get_weights",
"(",
"self",
".",
"__ccore_som_pointer",
")",
"return",
"self",
".",
"_weights"
] | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.awards | !
@brief Return amount of captured objects by each neuron after training.
@return (list) Amount of captured objects by each neuron.
@see train() | pyclustering/nnet/som.py | def awards(self):
"""!
@brief Return amount of captured objects by each neuron after training.
@return (list) Amount of captured objects by each neuron.
@see train()
"""
if self.__ccore_som_pointer is not None:
self._award = wrap... | def awards(self):
"""!
@brief Return amount of captured objects by each neuron after training.
@return (list) Amount of captured objects by each neuron.
@see train()
"""
if self.__ccore_som_pointer is not None:
self._award = wrap... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L211-L224 | [
"def",
"awards",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"self",
".",
"_award",
"=",
"wrapper",
".",
"som_get_awards",
"(",
"self",
".",
"__ccore_som_pointer",
")",
"return",
"self",
".",
"_award"
] | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.capture_objects | !
@brief Returns indexes of captured objects by each neuron.
@details For example, network with size 2x2 has been trained on 5 sample, we neuron #1 has won one object with
index '1', neuron #2 - objects with indexes '0', '3', '4', neuron #3 - nothing, neuron #4 - object
... | pyclustering/nnet/som.py | def capture_objects(self):
"""!
@brief Returns indexes of captured objects by each neuron.
@details For example, network with size 2x2 has been trained on 5 sample, we neuron #1 has won one object with
index '1', neuron #2 - objects with indexes '0', '3', '4', neuron #3 - n... | def capture_objects(self):
"""!
@brief Returns indexes of captured objects by each neuron.
@details For example, network with size 2x2 has been trained on 5 sample, we neuron #1 has won one object with
index '1', neuron #2 - objects with indexes '0', '3', '4', neuron #3 - n... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L227-L241 | [
"def",
"capture_objects",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"self",
".",
"_capture_objects",
"=",
"wrapper",
".",
"som_get_capture_objects",
"(",
"self",
".",
"__ccore_som_pointer",
")",
"return",
"self",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.__initialize_locations | !
@brief Initialize locations (coordinates in SOM grid) of each neurons in the map.
@param[in] rows (uint): Number of neurons in the column (number of rows).
@param[in] cols (uint): Number of neurons in the row (number of columns).
@return (list) List of coordinat... | pyclustering/nnet/som.py | def __initialize_locations(self, rows, cols):
"""!
@brief Initialize locations (coordinates in SOM grid) of each neurons in the map.
@param[in] rows (uint): Number of neurons in the column (number of rows).
@param[in] cols (uint): Number of neurons in the row (number of col... | def __initialize_locations(self, rows, cols):
"""!
@brief Initialize locations (coordinates in SOM grid) of each neurons in the map.
@param[in] rows (uint): Number of neurons in the column (number of rows).
@param[in] cols (uint): Number of neurons in the row (number of col... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L372-L388 | [
"def",
"__initialize_locations",
"(",
"self",
",",
"rows",
",",
"cols",
")",
":",
"location",
"=",
"list",
"(",
")",
"for",
"i",
"in",
"range",
"(",
"rows",
")",
":",
"for",
"j",
"in",
"range",
"(",
"cols",
")",
":",
"location",
".",
"append",
"(",... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.__initialize_distances | !
@brief Initialize distance matrix in SOM grid.
@param[in] size (uint): Amount of neurons in the network.
@param[in] location (list): List of coordinates of each neuron in the network.
@return (list) Distance matrix between neurons in the network. | pyclustering/nnet/som.py | def __initialize_distances(self, size, location):
"""!
@brief Initialize distance matrix in SOM grid.
@param[in] size (uint): Amount of neurons in the network.
@param[in] location (list): List of coordinates of each neuron in the network.
@return (list) D... | def __initialize_distances(self, size, location):
"""!
@brief Initialize distance matrix in SOM grid.
@param[in] size (uint): Amount of neurons in the network.
@param[in] location (list): List of coordinates of each neuron in the network.
@return (list) D... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L391-L408 | [
"def",
"__initialize_distances",
"(",
"self",
",",
"size",
",",
"location",
")",
":",
"sqrt_distances",
"=",
"[",
"[",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"size",
")",
"]",
"for",
"j",
"in",
"range",
"(",
"size",
")",
"]",
"for",
"i",
"in",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som._create_initial_weights | !
@brief Creates initial weights for neurons in line with the specified initialization.
@param[in] init_type (type_init): Type of initialization of initial neuron weights (random, random in center of the input data, random distributed in data, ditributed in line with uniform grid). | pyclustering/nnet/som.py | def _create_initial_weights(self, init_type):
"""!
@brief Creates initial weights for neurons in line with the specified initialization.
@param[in] init_type (type_init): Type of initialization of initial neuron weights (random, random in center of the input data, random distributed... | def _create_initial_weights(self, init_type):
"""!
@brief Creates initial weights for neurons in line with the specified initialization.
@param[in] init_type (type_init): Type of initialization of initial neuron weights (random, random in center of the input data, random distributed... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L411-L463 | [
"def",
"_create_initial_weights",
"(",
"self",
",",
"init_type",
")",
":",
"dim_info",
"=",
"dimension_info",
"(",
"self",
".",
"_data",
")",
"step_x",
"=",
"dim_info",
".",
"get_center",
"(",
")",
"[",
"0",
"]",
"if",
"self",
".",
"_rows",
">",
"1",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som._create_connections | !
@brief Create connections in line with input rule (grid four, grid eight, honeycomb, function neighbour).
@param[in] conn_type (type_conn): Type of connection between oscillators in the network. | pyclustering/nnet/som.py | def _create_connections(self, conn_type):
"""!
@brief Create connections in line with input rule (grid four, grid eight, honeycomb, function neighbour).
@param[in] conn_type (type_conn): Type of connection between oscillators in the network.
"""
... | def _create_connections(self, conn_type):
"""!
@brief Create connections in line with input rule (grid four, grid eight, honeycomb, function neighbour).
@param[in] conn_type (type_conn): Type of connection between oscillators in the network.
"""
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L466-L545 | [
"def",
"_create_connections",
"(",
"self",
",",
"conn_type",
")",
":",
"self",
".",
"_neighbors",
"=",
"[",
"[",
"]",
"for",
"index",
"in",
"range",
"(",
"self",
".",
"_size",
")",
"]",
"for",
"index",
"in",
"range",
"(",
"0",
",",
"self",
".",
"_s... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som._competition | !
@brief Calculates neuron winner (distance, neuron index).
@param[in] x (list): Input pattern from the input data set, for example it can be coordinates of point.
@return (uint) Returns index of neuron that is winner. | pyclustering/nnet/som.py | def _competition(self, x):
"""!
@brief Calculates neuron winner (distance, neuron index).
@param[in] x (list): Input pattern from the input data set, for example it can be coordinates of point.
@return (uint) Returns index of neuron that is winner.
... | def _competition(self, x):
"""!
@brief Calculates neuron winner (distance, neuron index).
@param[in] x (list): Input pattern from the input data set, for example it can be coordinates of point.
@return (uint) Returns index of neuron that is winner.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L548-L567 | [
"def",
"_competition",
"(",
"self",
",",
"x",
")",
":",
"index",
"=",
"0",
"minimum",
"=",
"euclidean_distance_square",
"(",
"self",
".",
"_weights",
"[",
"0",
"]",
",",
"x",
")",
"for",
"i",
"in",
"range",
"(",
"1",
",",
"self",
".",
"_size",
",",... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som._adaptation | !
@brief Change weight of neurons in line with won neuron.
@param[in] index (uint): Index of neuron-winner.
@param[in] x (list): Input pattern from the input data set. | pyclustering/nnet/som.py | def _adaptation(self, index, x):
"""!
@brief Change weight of neurons in line with won neuron.
@param[in] index (uint): Index of neuron-winner.
@param[in] x (list): Input pattern from the input data set.
"""
dimension = len(self._weight... | def _adaptation(self, index, x):
"""!
@brief Change weight of neurons in line with won neuron.
@param[in] index (uint): Index of neuron-winner.
@param[in] x (list): Input pattern from the input data set.
"""
dimension = len(self._weight... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L570-L601 | [
"def",
"_adaptation",
"(",
"self",
",",
"index",
",",
"x",
")",
":",
"dimension",
"=",
"len",
"(",
"self",
".",
"_weights",
"[",
"0",
"]",
")",
"if",
"self",
".",
"_conn_type",
"==",
"type_conn",
".",
"func_neighbor",
":",
"for",
"neuron_index",
"in",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.train | !
@brief Trains self-organized feature map (SOM).
@param[in] data (list): Input data - list of points where each point is represented by list of features, for example coordinates.
@param[in] epochs (uint): Number of epochs for training.
@param[in] autostop (bool): Automatic... | pyclustering/nnet/som.py | def train(self, data, epochs, autostop=False):
"""!
@brief Trains self-organized feature map (SOM).
@param[in] data (list): Input data - list of points where each point is represented by list of features, for example coordinates.
@param[in] epochs (uint): Number of epochs for train... | def train(self, data, epochs, autostop=False):
"""!
@brief Trains self-organized feature map (SOM).
@param[in] data (list): Input data - list of points where each point is represented by list of features, for example coordinates.
@param[in] epochs (uint): Number of epochs for train... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L604-L664 | [
"def",
"train",
"(",
"self",
",",
"data",
",",
"epochs",
",",
"autostop",
"=",
"False",
")",
":",
"self",
".",
"_data",
"=",
"data",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"return",
"wrapper",
".",
"som_train",
"(",
"self",... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.simulate | !
@brief Processes input pattern (no learining) and returns index of neuron-winner.
Using index of neuron winner catched object can be obtained using property capture_objects.
@param[in] input_pattern (list): Input pattern.
@return (uint) Returns ind... | pyclustering/nnet/som.py | def simulate(self, input_pattern):
"""!
@brief Processes input pattern (no learining) and returns index of neuron-winner.
Using index of neuron winner catched object can be obtained using property capture_objects.
@param[in] input_pattern (list): Input pattern... | def simulate(self, input_pattern):
"""!
@brief Processes input pattern (no learining) and returns index of neuron-winner.
Using index of neuron winner catched object can be obtained using property capture_objects.
@param[in] input_pattern (list): Input pattern... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L667-L683 | [
"def",
"simulate",
"(",
"self",
",",
"input_pattern",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"return",
"wrapper",
".",
"som_simulate",
"(",
"self",
".",
"__ccore_som_pointer",
",",
"input_pattern",
")",
"return",
"self",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som._get_maximal_adaptation | !
@brief Calculates maximum changes of weight in line with comparison between previous weights and current weights.
@param[in] previous_weights (list): Weights from the previous step of learning process.
@return (double) Value that represents maximum changes of weight afte... | pyclustering/nnet/som.py | def _get_maximal_adaptation(self, previous_weights):
"""!
@brief Calculates maximum changes of weight in line with comparison between previous weights and current weights.
@param[in] previous_weights (list): Weights from the previous step of learning process.
@ret... | def _get_maximal_adaptation(self, previous_weights):
"""!
@brief Calculates maximum changes of weight in line with comparison between previous weights and current weights.
@param[in] previous_weights (list): Weights from the previous step of learning process.
@ret... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L686-L709 | [
"def",
"_get_maximal_adaptation",
"(",
"self",
",",
"previous_weights",
")",
":",
"dimension",
"=",
"len",
"(",
"self",
".",
"_data",
"[",
"0",
"]",
")",
"maximal_adaptation",
"=",
"0.0",
"for",
"neuron_index",
"in",
"range",
"(",
"self",
".",
"_size",
")"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.get_winner_number | !
@brief Calculates number of winner at the last step of learning process.
@return (uint) Number of winner. | pyclustering/nnet/som.py | def get_winner_number(self):
"""!
@brief Calculates number of winner at the last step of learning process.
@return (uint) Number of winner.
"""
if self.__ccore_som_pointer is not None:
self._award = wrapper.som_get_awards(self.__cco... | def get_winner_number(self):
"""!
@brief Calculates number of winner at the last step of learning process.
@return (uint) Number of winner.
"""
if self.__ccore_som_pointer is not None:
self._award = wrapper.som_get_awards(self.__cco... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L712-L728 | [
"def",
"get_winner_number",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"self",
".",
"_award",
"=",
"wrapper",
".",
"som_get_awards",
"(",
"self",
".",
"__ccore_som_pointer",
")",
"winner_number",
"=",
"0",
"for... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.show_distance_matrix | !
@brief Shows gray visualization of U-matrix (distance matrix).
@see get_distance_matrix() | pyclustering/nnet/som.py | def show_distance_matrix(self):
"""!
@brief Shows gray visualization of U-matrix (distance matrix).
@see get_distance_matrix()
"""
distance_matrix = self.get_distance_matrix()
plt.imshow(distance_matrix, cmap = plt.get_cmap('hot'), inte... | def show_distance_matrix(self):
"""!
@brief Shows gray visualization of U-matrix (distance matrix).
@see get_distance_matrix()
"""
distance_matrix = self.get_distance_matrix()
plt.imshow(distance_matrix, cmap = plt.get_cmap('hot'), inte... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L731-L743 | [
"def",
"show_distance_matrix",
"(",
"self",
")",
":",
"distance_matrix",
"=",
"self",
".",
"get_distance_matrix",
"(",
")",
"plt",
".",
"imshow",
"(",
"distance_matrix",
",",
"cmap",
"=",
"plt",
".",
"get_cmap",
"(",
"'hot'",
")",
",",
"interpolation",
"=",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.get_distance_matrix | !
@brief Calculates distance matrix (U-matrix).
@details The U-Matrix visualizes based on the distance in input space between a weight vector and its neighbors on map.
@return (list) Distance matrix (U-matrix).
@see show_distance_matrix()
@see get_density... | pyclustering/nnet/som.py | def get_distance_matrix(self):
"""!
@brief Calculates distance matrix (U-matrix).
@details The U-Matrix visualizes based on the distance in input space between a weight vector and its neighbors on map.
@return (list) Distance matrix (U-matrix).
@see show_... | def get_distance_matrix(self):
"""!
@brief Calculates distance matrix (U-matrix).
@details The U-Matrix visualizes based on the distance in input space between a weight vector and its neighbors on map.
@return (list) Distance matrix (U-matrix).
@see show_... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L746-L777 | [
"def",
"get_distance_matrix",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"self",
".",
"_weights",
"=",
"wrapper",
".",
"som_get_weights",
"(",
"self",
".",
"__ccore_som_pointer",
")",
"if",
"self",
".",
"_conn_... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.show_density_matrix | !
@brief Show density matrix (P-matrix) using kernel density estimation.
@param[in] surface_divider (double): Divider in each dimension that affect radius for density measurement.
@see show_distance_matrix() | pyclustering/nnet/som.py | def show_density_matrix(self, surface_divider = 20.0):
"""!
@brief Show density matrix (P-matrix) using kernel density estimation.
@param[in] surface_divider (double): Divider in each dimension that affect radius for density measurement.
@see show_distance_matrix(... | def show_density_matrix(self, surface_divider = 20.0):
"""!
@brief Show density matrix (P-matrix) using kernel density estimation.
@param[in] surface_divider (double): Divider in each dimension that affect radius for density measurement.
@see show_distance_matrix(... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L780-L794 | [
"def",
"show_density_matrix",
"(",
"self",
",",
"surface_divider",
"=",
"20.0",
")",
":",
"density_matrix",
"=",
"self",
".",
"get_density_matrix",
"(",
"surface_divider",
")",
"plt",
".",
"imshow",
"(",
"density_matrix",
",",
"cmap",
"=",
"plt",
".",
"get_cma... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.get_density_matrix | !
@brief Calculates density matrix (P-Matrix).
@param[in] surface_divider (double): Divider in each dimension that affect radius for density measurement.
@return (list) Density matrix (P-Matrix).
@see get_distance_matrix() | pyclustering/nnet/som.py | def get_density_matrix(self, surface_divider = 20.0):
"""!
@brief Calculates density matrix (P-Matrix).
@param[in] surface_divider (double): Divider in each dimension that affect radius for density measurement.
@return (list) Density matrix (P-Matrix).
... | def get_density_matrix(self, surface_divider = 20.0):
"""!
@brief Calculates density matrix (P-Matrix).
@param[in] surface_divider (double): Divider in each dimension that affect radius for density measurement.
@return (list) Density matrix (P-Matrix).
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L797-L846 | [
"def",
"get_density_matrix",
"(",
"self",
",",
"surface_divider",
"=",
"20.0",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"self",
".",
"_weights",
"=",
"wrapper",
".",
"som_get_weights",
"(",
"self",
".",
"__ccore_som_pointer... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.show_winner_matrix | !
@brief Show winner matrix where each element corresponds to neuron and value represents
amount of won objects from input dataspace at the last training iteration.
@see show_distance_matrix() | pyclustering/nnet/som.py | def show_winner_matrix(self):
"""!
@brief Show winner matrix where each element corresponds to neuron and value represents
amount of won objects from input dataspace at the last training iteration.
@see show_distance_matrix()
"""
... | def show_winner_matrix(self):
"""!
@brief Show winner matrix where each element corresponds to neuron and value represents
amount of won objects from input dataspace at the last training iteration.
@see show_distance_matrix()
"""
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L849-L875 | [
"def",
"show_winner_matrix",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"None",
":",
"self",
".",
"_award",
"=",
"wrapper",
".",
"som_get_awards",
"(",
"self",
".",
"__ccore_som_pointer",
")",
"(",
"fig",
",",
"ax",
")",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | som.show_network | !
@brief Shows neurons in the dimension of data.
@param[in] awards (bool): If True - displays how many objects won each neuron.
@param[in] belongs (bool): If True - marks each won object by according index of neuron-winner (only when dataset is displayed too).
@param[in] co... | pyclustering/nnet/som.py | def show_network(self, awards = False, belongs = False, coupling = True, dataset = True, marker_type = 'o'):
"""!
@brief Shows neurons in the dimension of data.
@param[in] awards (bool): If True - displays how many objects won each neuron.
@param[in] belongs (bool): If True... | def show_network(self, awards = False, belongs = False, coupling = True, dataset = True, marker_type = 'o'):
"""!
@brief Shows neurons in the dimension of data.
@param[in] awards (bool): If True - displays how many objects won each neuron.
@param[in] belongs (bool): If True... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/som.py#L878-L973 | [
"def",
"show_network",
"(",
"self",
",",
"awards",
"=",
"False",
",",
"belongs",
"=",
"False",
",",
"coupling",
"=",
"True",
",",
"dataset",
"=",
"True",
",",
"marker_type",
"=",
"'o'",
")",
":",
"if",
"self",
".",
"__ccore_som_pointer",
"is",
"not",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | order_estimator.calculate_sync_order | !
@brief Calculates level of global synchronization (order parameter) for input phases.
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
desynchronization is observed in the network.
@param[i... | pyclustering/nnet/sync.py | def calculate_sync_order(oscillator_phases):
"""!
@brief Calculates level of global synchronization (order parameter) for input phases.
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
desynchronizatio... | def calculate_sync_order(oscillator_phases):
"""!
@brief Calculates level of global synchronization (order parameter) for input phases.
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
desynchronizatio... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L56-L80 | [
"def",
"calculate_sync_order",
"(",
"oscillator_phases",
")",
":",
"exp_amount",
"=",
"0.0",
"average_phase",
"=",
"0.0",
"for",
"phase",
"in",
"oscillator_phases",
":",
"exp_amount",
"+=",
"math",
".",
"expm1",
"(",
"abs",
"(",
"1j",
"*",
"phase",
")",
")",... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | order_estimator.calculate_local_sync_order | !
@brief Calculates level of local synchorization (local order parameter) for input phases for the specified network.
@details This parameter is tend 1.0 when the oscillatory network close to local synchronization and it tend to 0.0 when
desynchronization is observed in the network... | pyclustering/nnet/sync.py | def calculate_local_sync_order(oscillator_phases, oscillatory_network):
"""!
@brief Calculates level of local synchorization (local order parameter) for input phases for the specified network.
@details This parameter is tend 1.0 when the oscillatory network close to local synchronization and ... | def calculate_local_sync_order(oscillator_phases, oscillatory_network):
"""!
@brief Calculates level of local synchorization (local order parameter) for input phases for the specified network.
@details This parameter is tend 1.0 when the oscillatory network close to local synchronization and ... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L84-L109 | [
"def",
"calculate_local_sync_order",
"(",
"oscillator_phases",
",",
"oscillatory_network",
")",
":",
"exp_amount",
"=",
"0.0",
"num_neigh",
"=",
"0.0",
"for",
"i",
"in",
"range",
"(",
"0",
",",
"len",
"(",
"oscillatory_network",
")",
",",
"1",
")",
":",
"for... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_dynamic.output | !
@brief (list) Returns output dynamic of the Sync network (phase coordinates of each oscillator in the network) during simulation. | pyclustering/nnet/sync.py | def output(self):
"""!
@brief (list) Returns output dynamic of the Sync network (phase coordinates of each oscillator in the network) during simulation.
"""
if ( (self._ccore_sync_dynamic_pointer is not None) and ( (self._dynamic is None) or (len(self._dynamic) == 0) ) ):
... | def output(self):
"""!
@brief (list) Returns output dynamic of the Sync network (phase coordinates of each oscillator in the network) during simulation.
"""
if ( (self._ccore_sync_dynamic_pointer is not None) and ( (self._dynamic is None) or (len(self._dynamic) == 0) ) ):
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L120-L128 | [
"def",
"output",
"(",
"self",
")",
":",
"if",
"(",
"(",
"self",
".",
"_ccore_sync_dynamic_pointer",
"is",
"not",
"None",
")",
"and",
"(",
"(",
"self",
".",
"_dynamic",
"is",
"None",
")",
"or",
"(",
"len",
"(",
"self",
".",
"_dynamic",
")",
"==",
"0... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_dynamic.time | !
@brief (list) Returns sampling times when dynamic is measured during simulation. | pyclustering/nnet/sync.py | def time(self):
"""!
@brief (list) Returns sampling times when dynamic is measured during simulation.
"""
if ( (self._ccore_sync_dynamic_pointer is not None) and ( (self._time is None) or (len(self._time) == 0) ) ):
self._time = wrapper.sync_dynamic_get_time(se... | def time(self):
"""!
@brief (list) Returns sampling times when dynamic is measured during simulation.
"""
if ( (self._ccore_sync_dynamic_pointer is not None) and ( (self._time is None) or (len(self._time) == 0) ) ):
self._time = wrapper.sync_dynamic_get_time(se... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L132-L140 | [
"def",
"time",
"(",
"self",
")",
":",
"if",
"(",
"(",
"self",
".",
"_ccore_sync_dynamic_pointer",
"is",
"not",
"None",
")",
"and",
"(",
"(",
"self",
".",
"_time",
"is",
"None",
")",
"or",
"(",
"len",
"(",
"self",
".",
"_time",
")",
"==",
"0",
")"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_dynamic.allocate_sync_ensembles | !
@brief Allocate clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster.
@param[in] tolerance (double): Maximum error for allocation of synchronous ensemble oscillators.
@param[in] indexes (list): List of re... | pyclustering/nnet/sync.py | def allocate_sync_ensembles(self, tolerance = 0.01, indexes = None, iteration = None):
"""!
@brief Allocate clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster.
@param[in] tolerance (double): Maximum error... | def allocate_sync_ensembles(self, tolerance = 0.01, indexes = None, iteration = None):
"""!
@brief Allocate clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster.
@param[in] tolerance (double): Maximum error... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L194-L255 | [
"def",
"allocate_sync_ensembles",
"(",
"self",
",",
"tolerance",
"=",
"0.01",
",",
"indexes",
"=",
"None",
",",
"iteration",
"=",
"None",
")",
":",
"if",
"(",
"self",
".",
"_ccore_sync_dynamic_pointer",
"is",
"not",
"None",
")",
":",
"ensembles",
"=",
"wra... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_dynamic.allocate_phase_matrix | !
@brief Returns 2D matrix of phase values of oscillators at the specified iteration of simulation.
@details User should ensure correct matrix sizes in line with following expression grid_width x grid_height that should be equal to
amount of oscillators otherwise exception is throw... | pyclustering/nnet/sync.py | def allocate_phase_matrix(self, grid_width = None, grid_height = None, iteration = None):
"""!
@brief Returns 2D matrix of phase values of oscillators at the specified iteration of simulation.
@details User should ensure correct matrix sizes in line with following expression grid_width x grid... | def allocate_phase_matrix(self, grid_width = None, grid_height = None, iteration = None):
"""!
@brief Returns 2D matrix of phase values of oscillators at the specified iteration of simulation.
@details User should ensure correct matrix sizes in line with following expression grid_width x grid... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L258-L299 | [
"def",
"allocate_phase_matrix",
"(",
"self",
",",
"grid_width",
"=",
"None",
",",
"grid_height",
"=",
"None",
",",
"iteration",
"=",
"None",
")",
":",
"output_dynamic",
"=",
"self",
".",
"output",
"if",
"(",
"(",
"output_dynamic",
"is",
"None",
")",
"or",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_dynamic.allocate_correlation_matrix | !
@brief Allocate correlation matrix between oscillators at the specified step of simulation.
@param[in] iteration (uint): Number of iteration of simulation for which correlation matrix should be allocated.
If iternation number is not specified, the last step of s... | pyclustering/nnet/sync.py | def allocate_correlation_matrix(self, iteration = None):
"""!
@brief Allocate correlation matrix between oscillators at the specified step of simulation.
@param[in] iteration (uint): Number of iteration of simulation for which correlation matrix should be allocated.
... | def allocate_correlation_matrix(self, iteration = None):
"""!
@brief Allocate correlation matrix between oscillators at the specified step of simulation.
@param[in] iteration (uint): Number of iteration of simulation for which correlation matrix should be allocated.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L302-L335 | [
"def",
"allocate_correlation_matrix",
"(",
"self",
",",
"iteration",
"=",
"None",
")",
":",
"if",
"(",
"self",
".",
"_ccore_sync_dynamic_pointer",
"is",
"not",
"None",
")",
":",
"return",
"wrapper",
".",
"sync_dynamic_allocate_correlation_matrix",
"(",
"self",
"."... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_dynamic.calculate_order_parameter | !
@brief Calculates level of global synchorization (order parameter).
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
desynchronization is observed in the network. Order parameter is calculated using following... | pyclustering/nnet/sync.py | def calculate_order_parameter(self, start_iteration = None, stop_iteration = None):
"""!
@brief Calculates level of global synchorization (order parameter).
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
... | def calculate_order_parameter(self, start_iteration = None, stop_iteration = None):
"""!
@brief Calculates level of global synchorization (order parameter).
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L338-L378 | [
"def",
"calculate_order_parameter",
"(",
"self",
",",
"start_iteration",
"=",
"None",
",",
"stop_iteration",
"=",
"None",
")",
":",
"(",
"start_iteration",
",",
"stop_iteration",
")",
"=",
"self",
".",
"__get_start_stop_iterations",
"(",
"start_iteration",
",",
"s... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_dynamic.calculate_local_order_parameter | !
@brief Calculates local order parameter.
@details Local order parameter or so-called level of local or partial synchronization is calculated by following expression:
\f[
r_{c}=\left | \sum_{i=0}^{N} \frac{1}{N_{i}} \sum_{j=0}e^{ \theta_{j} - \theta_{i} } \right |;
... | pyclustering/nnet/sync.py | def calculate_local_order_parameter(self, oscillatory_network, start_iteration = None, stop_iteration = None):
"""!
@brief Calculates local order parameter.
@details Local order parameter or so-called level of local or partial synchronization is calculated by following expression:
... | def calculate_local_order_parameter(self, oscillatory_network, start_iteration = None, stop_iteration = None):
"""!
@brief Calculates local order parameter.
@details Local order parameter or so-called level of local or partial synchronization is calculated by following expression:
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L381-L410 | [
"def",
"calculate_local_order_parameter",
"(",
"self",
",",
"oscillatory_network",
",",
"start_iteration",
"=",
"None",
",",
"stop_iteration",
"=",
"None",
")",
":",
"(",
"start_iteration",
",",
"stop_iteration",
")",
"=",
"self",
".",
"__get_start_stop_iterations",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_dynamic.__get_start_stop_iterations | !
@brief Aplly rules for start_iteration and stop_iteration parameters.
@param[in] start_iteration (uint): The first iteration that is used for calculation.
@param[in] stop_iteration (uint): The last iteration that is used for calculation.
@return (tuple) New the first it... | pyclustering/nnet/sync.py | def __get_start_stop_iterations(self, start_iteration, stop_iteration):
"""!
@brief Aplly rules for start_iteration and stop_iteration parameters.
@param[in] start_iteration (uint): The first iteration that is used for calculation.
@param[in] stop_iteration (uint): The last iterati... | def __get_start_stop_iterations(self, start_iteration, stop_iteration):
"""!
@brief Aplly rules for start_iteration and stop_iteration parameters.
@param[in] start_iteration (uint): The first iteration that is used for calculation.
@param[in] stop_iteration (uint): The last iterati... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L413-L429 | [
"def",
"__get_start_stop_iterations",
"(",
"self",
",",
"start_iteration",
",",
"stop_iteration",
")",
":",
"if",
"(",
"start_iteration",
"is",
"None",
")",
":",
"start_iteration",
"=",
"len",
"(",
"self",
")",
"-",
"1",
"if",
"(",
"stop_iteration",
"is",
"N... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.show_output_dynamic | !
@brief Shows output dynamic (output of each oscillator) during simulation.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@see show_output_dynamics | pyclustering/nnet/sync.py | def show_output_dynamic(sync_output_dynamic):
"""!
@brief Shows output dynamic (output of each oscillator) during simulation.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@see show_output_dynamics
"""
... | def show_output_dynamic(sync_output_dynamic):
"""!
@brief Shows output dynamic (output of each oscillator) during simulation.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@see show_output_dynamics
"""
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L440-L450 | [
"def",
"show_output_dynamic",
"(",
"sync_output_dynamic",
")",
":",
"draw_dynamics",
"(",
"sync_output_dynamic",
".",
"time",
",",
"sync_output_dynamic",
".",
"output",
",",
"x_title",
"=",
"\"t\"",
",",
"y_title",
"=",
"\"phase\"",
",",
"y_lim",
"=",
"[",
"0",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.show_correlation_matrix | !
@brief Shows correlation matrix between oscillators at the specified iteration.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] iteration (uint): Number of interation of simulation for which correlation matrix should be allocated.
... | pyclustering/nnet/sync.py | def show_correlation_matrix(sync_output_dynamic, iteration = None):
"""!
@brief Shows correlation matrix between oscillators at the specified iteration.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] iteration (uint): Number of... | def show_correlation_matrix(sync_output_dynamic, iteration = None):
"""!
@brief Shows correlation matrix between oscillators at the specified iteration.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] iteration (uint): Number of... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L469-L483 | [
"def",
"show_correlation_matrix",
"(",
"sync_output_dynamic",
",",
"iteration",
"=",
"None",
")",
":",
"_",
"=",
"plt",
".",
"figure",
"(",
")",
"correlation_matrix",
"=",
"sync_output_dynamic",
".",
"allocate_correlation_matrix",
"(",
"iteration",
")",
"plt",
"."... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.show_phase_matrix | !
@brief Shows 2D matrix of phase values of oscillators at the specified iteration.
@details User should ensure correct matrix sizes in line with following expression grid_width x grid_height that should be equal to
amount of oscillators otherwise exception is thrown. If grid_width... | pyclustering/nnet/sync.py | def show_phase_matrix(sync_output_dynamic, grid_width = None, grid_height = None, iteration = None):
"""!
@brief Shows 2D matrix of phase values of oscillators at the specified iteration.
@details User should ensure correct matrix sizes in line with following expression grid_width x grid_heig... | def show_phase_matrix(sync_output_dynamic, grid_width = None, grid_height = None, iteration = None):
"""!
@brief Shows 2D matrix of phase values of oscillators at the specified iteration.
@details User should ensure correct matrix sizes in line with following expression grid_width x grid_heig... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L487-L506 | [
"def",
"show_phase_matrix",
"(",
"sync_output_dynamic",
",",
"grid_width",
"=",
"None",
",",
"grid_height",
"=",
"None",
",",
"iteration",
"=",
"None",
")",
":",
"_",
"=",
"plt",
".",
"figure",
"(",
")",
"phase_matrix",
"=",
"sync_output_dynamic",
".",
"allo... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.show_order_parameter | !
@brief Shows evolution of order parameter (level of global synchronization in the network).
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network whose evolution of global synchronization should be visualized.
@param[in] start_iteration (uint): The firs... | pyclustering/nnet/sync.py | def show_order_parameter(sync_output_dynamic, start_iteration = None, stop_iteration = None):
"""!
@brief Shows evolution of order parameter (level of global synchronization in the network).
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network whose evol... | def show_order_parameter(sync_output_dynamic, start_iteration = None, stop_iteration = None):
"""!
@brief Shows evolution of order parameter (level of global synchronization in the network).
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network whose evol... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L510-L527 | [
"def",
"show_order_parameter",
"(",
"sync_output_dynamic",
",",
"start_iteration",
"=",
"None",
",",
"stop_iteration",
"=",
"None",
")",
":",
"(",
"start_iteration",
",",
"stop_iteration",
")",
"=",
"sync_visualizer",
".",
"__get_start_stop_iterations",
"(",
"sync_out... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.show_local_order_parameter | !
@brief Shows evolution of local order parameter (level of local synchronization in the network).
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network whose evolution of global synchronization should be visualized.
@param[in] oscillatory_network (sync):... | pyclustering/nnet/sync.py | def show_local_order_parameter(sync_output_dynamic, oscillatory_network, start_iteration = None, stop_iteration = None):
"""!
@brief Shows evolution of local order parameter (level of local synchronization in the network).
@param[in] sync_output_dynamic (sync_dynamic): Output dynami... | def show_local_order_parameter(sync_output_dynamic, oscillatory_network, start_iteration = None, stop_iteration = None):
"""!
@brief Shows evolution of local order parameter (level of local synchronization in the network).
@param[in] sync_output_dynamic (sync_dynamic): Output dynami... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L531-L548 | [
"def",
"show_local_order_parameter",
"(",
"sync_output_dynamic",
",",
"oscillatory_network",
",",
"start_iteration",
"=",
"None",
",",
"stop_iteration",
"=",
"None",
")",
":",
"(",
"start_iteration",
",",
"stop_iteration",
")",
"=",
"sync_visualizer",
".",
"__get_star... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.animate_output_dynamic | !
@brief Shows animation of output dynamic (output of each oscillator) during simulation on a circle from [0; 2pi].
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] animation_velocity (uint): Interval between frames in milliseconds.
... | pyclustering/nnet/sync.py | def animate_output_dynamic(sync_output_dynamic, animation_velocity = 75, save_movie = None):
"""!
@brief Shows animation of output dynamic (output of each oscillator) during simulation on a circle from [0; 2pi].
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sy... | def animate_output_dynamic(sync_output_dynamic, animation_velocity = 75, save_movie = None):
"""!
@brief Shows animation of output dynamic (output of each oscillator) during simulation on a circle from [0; 2pi].
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sy... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L552-L581 | [
"def",
"animate_output_dynamic",
"(",
"sync_output_dynamic",
",",
"animation_velocity",
"=",
"75",
",",
"save_movie",
"=",
"None",
")",
":",
"figure",
"=",
"plt",
".",
"figure",
"(",
")",
"dynamic",
"=",
"sync_output_dynamic",
".",
"output",
"[",
"0",
"]",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.animate_correlation_matrix | !
@brief Shows animation of correlation matrix between oscillators during simulation.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] animation_velocity (uint): Interval between frames in milliseconds.
@param[in] colormap (strin... | pyclustering/nnet/sync.py | def animate_correlation_matrix(sync_output_dynamic, animation_velocity = 75, colormap = 'cool', save_movie = None):
"""!
@brief Shows animation of correlation matrix between oscillators during simulation.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync netw... | def animate_correlation_matrix(sync_output_dynamic, animation_velocity = 75, colormap = 'cool', save_movie = None):
"""!
@brief Shows animation of correlation matrix between oscillators during simulation.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync netw... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L585-L615 | [
"def",
"animate_correlation_matrix",
"(",
"sync_output_dynamic",
",",
"animation_velocity",
"=",
"75",
",",
"colormap",
"=",
"'cool'",
",",
"save_movie",
"=",
"None",
")",
":",
"figure",
"=",
"plt",
".",
"figure",
"(",
")",
"correlation_matrix",
"=",
"sync_outpu... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.animate_phase_matrix | !
@brief Shows animation of phase matrix between oscillators during simulation on 2D stage.
@details If grid_width or grid_height are not specified than phase matrix size will by calculated automatically by square root.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic o... | pyclustering/nnet/sync.py | def animate_phase_matrix(sync_output_dynamic, grid_width = None, grid_height = None, animation_velocity = 75, colormap = 'jet', save_movie = None):
"""!
@brief Shows animation of phase matrix between oscillators during simulation on 2D stage.
@details If grid_width or grid_height are not spec... | def animate_phase_matrix(sync_output_dynamic, grid_width = None, grid_height = None, animation_velocity = 75, colormap = 'jet', save_movie = None):
"""!
@brief Shows animation of phase matrix between oscillators during simulation on 2D stage.
@details If grid_width or grid_height are not spec... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L619-L653 | [
"def",
"animate_phase_matrix",
"(",
"sync_output_dynamic",
",",
"grid_width",
"=",
"None",
",",
"grid_height",
"=",
"None",
",",
"animation_velocity",
"=",
"75",
",",
"colormap",
"=",
"'jet'",
",",
"save_movie",
"=",
"None",
")",
":",
"figure",
"=",
"plt",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.__get_start_stop_iterations | !
@brief Apply rule of preparation for start iteration and stop iteration values.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] start_iteration (uint): The first iteration that is used for calculation.
@param[in] stop_iteratio... | pyclustering/nnet/sync.py | def __get_start_stop_iterations(sync_output_dynamic, start_iteration, stop_iteration):
"""!
@brief Apply rule of preparation for start iteration and stop iteration values.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] start_it... | def __get_start_stop_iterations(sync_output_dynamic, start_iteration, stop_iteration):
"""!
@brief Apply rule of preparation for start iteration and stop iteration values.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] start_it... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L657-L674 | [
"def",
"__get_start_stop_iterations",
"(",
"sync_output_dynamic",
",",
"start_iteration",
",",
"stop_iteration",
")",
":",
"if",
"(",
"start_iteration",
"is",
"None",
")",
":",
"start_iteration",
"=",
"0",
"if",
"(",
"stop_iteration",
"is",
"None",
")",
":",
"st... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_visualizer.animate | !
@brief Shows animation of phase coordinates and animation of correlation matrix together for the Sync dynamic output on the same figure.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync network.
@param[in] title (string): Title of the animation that is dis... | pyclustering/nnet/sync.py | def animate(sync_output_dynamic, title = None, save_movie = None):
"""!
@brief Shows animation of phase coordinates and animation of correlation matrix together for the Sync dynamic output on the same figure.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync ... | def animate(sync_output_dynamic, title = None, save_movie = None):
"""!
@brief Shows animation of phase coordinates and animation of correlation matrix together for the Sync dynamic output on the same figure.
@param[in] sync_output_dynamic (sync_dynamic): Output dynamic of the Sync ... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L678-L718 | [
"def",
"animate",
"(",
"sync_output_dynamic",
",",
"title",
"=",
"None",
",",
"save_movie",
"=",
"None",
")",
":",
"dynamic",
"=",
"sync_output_dynamic",
".",
"output",
"[",
"0",
"]",
"correlation_matrix",
"=",
"sync_output_dynamic",
".",
"allocate_correlation_mat... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network.sync_order | !
@brief Calculates current level of global synchorization (order parameter) in the network.
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
desynchronization is observed in the network. Order parameter is cal... | pyclustering/nnet/sync.py | def sync_order(self):
"""!
@brief Calculates current level of global synchorization (order parameter) in the network.
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
desynchronization is observed in t... | def sync_order(self):
"""!
@brief Calculates current level of global synchorization (order parameter) in the network.
@details This parameter is tend 1.0 when the oscillatory network close to global synchronization and it tend to 0.0 when
desynchronization is observed in t... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L781-L811 | [
"def",
"sync_order",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"_ccore_network_pointer",
"is",
"not",
"None",
")",
":",
"return",
"wrapper",
".",
"sync_order",
"(",
"self",
".",
"_ccore_network_pointer",
")",
"return",
"order_estimator",
".",
"calculate_s... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network.sync_local_order | !
@brief Calculates current level of local (partial) synchronization in the network.
@return (double) Level of local (partial) synchronization.
@see sync_order() | pyclustering/nnet/sync.py | def sync_local_order(self):
"""!
@brief Calculates current level of local (partial) synchronization in the network.
@return (double) Level of local (partial) synchronization.
@see sync_order()
"""
if (self._ccore_network_point... | def sync_local_order(self):
"""!
@brief Calculates current level of local (partial) synchronization in the network.
@return (double) Level of local (partial) synchronization.
@see sync_order()
"""
if (self._ccore_network_point... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L814-L827 | [
"def",
"sync_local_order",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"_ccore_network_pointer",
"is",
"not",
"None",
")",
":",
"return",
"wrapper",
".",
"sync_local_order",
"(",
"self",
".",
"_ccore_network_pointer",
")",
"return",
"order_estimator",
".",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network._phase_kuramoto | !
@brief Returns result of phase calculation for specified oscillator in the network.
@param[in] teta (double): Phase of the oscillator that is differentiated.
@param[in] t (double): Current time of simulation.
@param[in] argv (tuple): Index of the oscillator in the list.
... | pyclustering/nnet/sync.py | def _phase_kuramoto(self, teta, t, argv):
"""!
@brief Returns result of phase calculation for specified oscillator in the network.
@param[in] teta (double): Phase of the oscillator that is differentiated.
@param[in] t (double): Current time of simulation.
@param[in... | def _phase_kuramoto(self, teta, t, argv):
"""!
@brief Returns result of phase calculation for specified oscillator in the network.
@param[in] teta (double): Phase of the oscillator that is differentiated.
@param[in] t (double): Current time of simulation.
@param[in... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L830-L848 | [
"def",
"_phase_kuramoto",
"(",
"self",
",",
"teta",
",",
"t",
",",
"argv",
")",
":",
"index",
"=",
"argv",
"phase",
"=",
"0",
"for",
"k",
"in",
"range",
"(",
"0",
",",
"self",
".",
"_num_osc",
")",
":",
"if",
"(",
"self",
".",
"has_connection",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network.simulate | !
@brief Performs static simulation of Sync oscillatory network.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] time (double): Time of simulation.
@param[in] solution (solve_type): Type of solution (solving).
@param[in] collect_d... | pyclustering/nnet/sync.py | def simulate(self, steps, time, solution = solve_type.FAST, collect_dynamic = True):
"""!
@brief Performs static simulation of Sync oscillatory network.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] time (double): Time of simulation.
... | def simulate(self, steps, time, solution = solve_type.FAST, collect_dynamic = True):
"""!
@brief Performs static simulation of Sync oscillatory network.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] time (double): Time of simulation.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L851-L868 | [
"def",
"simulate",
"(",
"self",
",",
"steps",
",",
"time",
",",
"solution",
"=",
"solve_type",
".",
"FAST",
",",
"collect_dynamic",
"=",
"True",
")",
":",
"return",
"self",
".",
"simulate_static",
"(",
"steps",
",",
"time",
",",
"solution",
",",
"collect... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network.simulate_dynamic | !
@brief Performs dynamic simulation of the network until stop condition is not reached. Stop condition is defined by input argument 'order'.
@param[in] order (double): Order of process synchronization, distributed 0..1.
@param[in] solution (solve_type): Type of solution.
@... | pyclustering/nnet/sync.py | def simulate_dynamic(self, order = 0.998, solution = solve_type.FAST, collect_dynamic = False, step = 0.1, int_step = 0.01, threshold_changes = 0.0000001):
"""!
@brief Performs dynamic simulation of the network until stop condition is not reached. Stop condition is defined by input argument 'order'.
... | def simulate_dynamic(self, order = 0.998, solution = solve_type.FAST, collect_dynamic = False, step = 0.1, int_step = 0.01, threshold_changes = 0.0000001):
"""!
@brief Performs dynamic simulation of the network until stop condition is not reached. Stop condition is defined by input argument 'order'.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L871-L935 | [
"def",
"simulate_dynamic",
"(",
"self",
",",
"order",
"=",
"0.998",
",",
"solution",
"=",
"solve_type",
".",
"FAST",
",",
"collect_dynamic",
"=",
"False",
",",
"step",
"=",
"0.1",
",",
"int_step",
"=",
"0.01",
",",
"threshold_changes",
"=",
"0.0000001",
")... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network.simulate_static | !
@brief Performs static simulation of oscillatory network.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] time (double): Time of simulation.
@param[in] solution (solve_type): Type of solution.
@param[in] collect_dynamic (bool): ... | pyclustering/nnet/sync.py | def simulate_static(self, steps, time, solution = solve_type.FAST, collect_dynamic = False):
"""!
@brief Performs static simulation of oscillatory network.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] time (double): Time of simulation.
... | def simulate_static(self, steps, time, solution = solve_type.FAST, collect_dynamic = False):
"""!
@brief Performs static simulation of oscillatory network.
@param[in] steps (uint): Number steps of simulations during simulation.
@param[in] time (double): Time of simulation.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L938-L983 | [
"def",
"simulate_static",
"(",
"self",
",",
"steps",
",",
"time",
",",
"solution",
"=",
"solve_type",
".",
"FAST",
",",
"collect_dynamic",
"=",
"False",
")",
":",
"if",
"(",
"self",
".",
"_ccore_network_pointer",
"is",
"not",
"None",
")",
":",
"ccore_insta... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network._calculate_phases | !
@brief Calculates new phases for oscillators in the network in line with current step.
@param[in] solution (solve_type): Type solver of the differential equation.
@param[in] t (double): Time of simulation.
@param[in] step (double): Step of solution at the end of which sta... | pyclustering/nnet/sync.py | def _calculate_phases(self, solution, t, step, int_step):
"""!
@brief Calculates new phases for oscillators in the network in line with current step.
@param[in] solution (solve_type): Type solver of the differential equation.
@param[in] t (double): Time of simulation.
... | def _calculate_phases(self, solution, t, step, int_step):
"""!
@brief Calculates new phases for oscillators in the network in line with current step.
@param[in] solution (solve_type): Type solver of the differential equation.
@param[in] t (double): Time of simulation.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L986-L1013 | [
"def",
"_calculate_phases",
"(",
"self",
",",
"solution",
",",
"t",
",",
"step",
",",
"int_step",
")",
":",
"next_phases",
"=",
"[",
"0.0",
"]",
"*",
"self",
".",
"_num_osc",
"# new oscillator _phases\r",
"for",
"index",
"in",
"range",
"(",
"0",
",",
"se... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network._phase_normalization | !
@brief Normalization of phase of oscillator that should be placed between [0; 2 * pi].
@param[in] teta (double): phase of oscillator.
@return (double) Normalized phase. | pyclustering/nnet/sync.py | def _phase_normalization(self, teta):
"""!
@brief Normalization of phase of oscillator that should be placed between [0; 2 * pi].
@param[in] teta (double): phase of oscillator.
@return (double) Normalized phase.
"""
norm_teta = teta;
... | def _phase_normalization(self, teta):
"""!
@brief Normalization of phase of oscillator that should be placed between [0; 2 * pi].
@param[in] teta (double): phase of oscillator.
@return (double) Normalized phase.
"""
norm_teta = teta;
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L1016-L1033 | [
"def",
"_phase_normalization",
"(",
"self",
",",
"teta",
")",
":",
"norm_teta",
"=",
"teta",
"while",
"(",
"norm_teta",
">",
"(",
"2.0",
"*",
"pi",
")",
")",
"or",
"(",
"norm_teta",
"<",
"0",
")",
":",
"if",
"(",
"norm_teta",
">",
"(",
"2.0",
"*",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network.get_neighbors | !
@brief Finds neighbors of the oscillator with specified index.
@param[in] index (uint): index of oscillator for which neighbors should be found in the network.
@return (list) Indexes of neighbors of the specified oscillator. | pyclustering/nnet/sync.py | def get_neighbors(self, index):
"""!
@brief Finds neighbors of the oscillator with specified index.
@param[in] index (uint): index of oscillator for which neighbors should be found in the network.
@return (list) Indexes of neighbors of the specified oscillator.
... | def get_neighbors(self, index):
"""!
@brief Finds neighbors of the oscillator with specified index.
@param[in] index (uint): index of oscillator for which neighbors should be found in the network.
@return (list) Indexes of neighbors of the specified oscillator.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L1036-L1049 | [
"def",
"get_neighbors",
"(",
"self",
",",
"index",
")",
":",
"if",
"(",
"(",
"self",
".",
"_ccore_network_pointer",
"is",
"not",
"None",
")",
"and",
"(",
"self",
".",
"_osc_conn",
"is",
"None",
")",
")",
":",
"self",
".",
"_osc_conn",
"=",
"wrapper",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | sync_network.has_connection | !
@brief Returns True if there is connection between i and j oscillators and False - if connection doesn't exist.
@param[in] i (uint): index of an oscillator in the network.
@param[in] j (uint): index of an oscillator in the network. | pyclustering/nnet/sync.py | def has_connection(self, i, j):
"""!
@brief Returns True if there is connection between i and j oscillators and False - if connection doesn't exist.
@param[in] i (uint): index of an oscillator in the network.
@param[in] j (uint): index of an oscillator in the network.
... | def has_connection(self, i, j):
"""!
@brief Returns True if there is connection between i and j oscillators and False - if connection doesn't exist.
@param[in] i (uint): index of an oscillator in the network.
@param[in] j (uint): index of an oscillator in the network.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/nnet/sync.py#L1052-L1064 | [
"def",
"has_connection",
"(",
"self",
",",
"i",
",",
"j",
")",
":",
"if",
"(",
"(",
"self",
".",
"_ccore_network_pointer",
"is",
"not",
"None",
")",
"and",
"(",
"self",
".",
"_osc_conn",
"is",
"None",
")",
")",
":",
"self",
".",
"_osc_conn",
"=",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmedoids.process | !
@brief Performs cluster analysis in line with rules of K-Medoids algorithm.
@return (kmedoids) Returns itself (K-Medoids instance).
@remark Results of clustering can be obtained using corresponding get methods.
@see get_clusters()
@see get_medoids() | pyclustering/cluster/kmedoids.py | def process(self):
"""!
@brief Performs cluster analysis in line with rules of K-Medoids algorithm.
@return (kmedoids) Returns itself (K-Medoids instance).
@remark Results of clustering can be obtained using corresponding get methods.
@see get_clusters()
... | def process(self):
"""!
@brief Performs cluster analysis in line with rules of K-Medoids algorithm.
@return (kmedoids) Returns itself (K-Medoids instance).
@remark Results of clustering can be obtained using corresponding get methods.
@see get_clusters()
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/kmedoids.py#L141-L172 | [
"def",
"process",
"(",
"self",
")",
":",
"if",
"self",
".",
"__ccore",
"is",
"True",
":",
"ccore_metric",
"=",
"metric_wrapper",
".",
"create_instance",
"(",
"self",
".",
"__metric",
")",
"self",
".",
"__clusters",
",",
"self",
".",
"__medoid_indexes",
"="... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmedoids.__create_distance_calculator | !
@brief Creates distance calculator in line with algorithms parameters.
@return (callable) Distance calculator. | pyclustering/cluster/kmedoids.py | def __create_distance_calculator(self):
"""!
@brief Creates distance calculator in line with algorithms parameters.
@return (callable) Distance calculator.
"""
if self.__data_type == 'points':
return lambda index1, index2: self.__metric(self.__pointer_data[i... | def __create_distance_calculator(self):
"""!
@brief Creates distance calculator in line with algorithms parameters.
@return (callable) Distance calculator.
"""
if self.__data_type == 'points':
return lambda index1, index2: self.__metric(self.__pointer_data[i... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/kmedoids.py#L212-L229 | [
"def",
"__create_distance_calculator",
"(",
"self",
")",
":",
"if",
"self",
".",
"__data_type",
"==",
"'points'",
":",
"return",
"lambda",
"index1",
",",
"index2",
":",
"self",
".",
"__metric",
"(",
"self",
".",
"__pointer_data",
"[",
"index1",
"]",
",",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmedoids.__update_clusters | !
@brief Calculate distance to each point from the each cluster.
@details Nearest points are captured by according clusters and as a result clusters are updated.
@return (list) updated clusters as list of clusters where each cluster contains indexes of objects from data. | pyclustering/cluster/kmedoids.py | def __update_clusters(self):
"""!
@brief Calculate distance to each point from the each cluster.
@details Nearest points are captured by according clusters and as a result clusters are updated.
@return (list) updated clusters as list of clusters where each cluster contains... | def __update_clusters(self):
"""!
@brief Calculate distance to each point from the each cluster.
@details Nearest points are captured by according clusters and as a result clusters are updated.
@return (list) updated clusters as list of clusters where each cluster contains... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/kmedoids.py#L232-L258 | [
"def",
"__update_clusters",
"(",
"self",
")",
":",
"clusters",
"=",
"[",
"[",
"self",
".",
"__medoid_indexes",
"[",
"i",
"]",
"]",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"__medoid_indexes",
")",
")",
"]",
"for",
"index_point",
"in",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | kmedoids.__update_medoids | !
@brief Find medoids of clusters in line with contained objects.
@return (list) list of medoids for current number of clusters. | pyclustering/cluster/kmedoids.py | def __update_medoids(self):
"""!
@brief Find medoids of clusters in line with contained objects.
@return (list) list of medoids for current number of clusters.
"""
medoid_indexes = [-1] * len(self.__clusters)
for index in range(len(se... | def __update_medoids(self):
"""!
@brief Find medoids of clusters in line with contained objects.
@return (list) list of medoids for current number of clusters.
"""
medoid_indexes = [-1] * len(self.__clusters)
for index in range(len(se... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/kmedoids.py#L261-L275 | [
"def",
"__update_medoids",
"(",
"self",
")",
":",
"medoid_indexes",
"=",
"[",
"-",
"1",
"]",
"*",
"len",
"(",
"self",
".",
"__clusters",
")",
"for",
"index",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"__clusters",
")",
")",
":",
"medoid_index",
"=... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | syncsom.process | !
@brief Performs simulation of the oscillatory network.
@param[in] collect_dynamic (bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
@param[in] order (double): Order of process synchronization that should be considered a... | pyclustering/cluster/syncsom.py | def process(self, collect_dynamic = False, order = 0.999):
"""!
@brief Performs simulation of the oscillatory network.
@param[in] collect_dynamic (bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
@param[in] order... | def process(self, collect_dynamic = False, order = 0.999):
"""!
@brief Performs simulation of the oscillatory network.
@param[in] collect_dynamic (bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
@param[in] order... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/syncsom.py#L111-L140 | [
"def",
"process",
"(",
"self",
",",
"collect_dynamic",
"=",
"False",
",",
"order",
"=",
"0.999",
")",
":",
"# train self-organization map.\r",
"self",
".",
"_som",
".",
"train",
"(",
"self",
".",
"_data",
",",
"100",
")",
"# prepare to build list.\r",
"weights... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | syncsom.__create_sync_layer | !
@brief Creates second layer of the network.
@param[in] weights (list): List of weights of SOM neurons.
@return (syncnet) Second layer of the network. | pyclustering/cluster/syncsom.py | def __create_sync_layer(self, weights):
"""!
@brief Creates second layer of the network.
@param[in] weights (list): List of weights of SOM neurons.
@return (syncnet) Second layer of the network.
"""
sync_layer = syncnet(weights, 0.0, in... | def __create_sync_layer(self, weights):
"""!
@brief Creates second layer of the network.
@param[in] weights (list): List of weights of SOM neurons.
@return (syncnet) Second layer of the network.
"""
sync_layer = syncnet(weights, 0.0, in... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/syncsom.py#L143-L159 | [
"def",
"__create_sync_layer",
"(",
"self",
",",
"weights",
")",
":",
"sync_layer",
"=",
"syncnet",
"(",
"weights",
",",
"0.0",
",",
"initial_phases",
"=",
"initial_type",
".",
"RANDOM_GAUSSIAN",
",",
"ccore",
"=",
"False",
")",
"for",
"oscillator_index1",
"in"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | syncsom.__has_object_connection | !
@brief Searches for pair of objects that are encoded by specified neurons and that are connected in line with connectivity radius.
@param[in] oscillator_index1 (uint): Index of the first oscillator in the second layer.
@param[in] oscillator_index2 (uint): Index of the second oscil... | pyclustering/cluster/syncsom.py | def __has_object_connection(self, oscillator_index1, oscillator_index2):
"""!
@brief Searches for pair of objects that are encoded by specified neurons and that are connected in line with connectivity radius.
@param[in] oscillator_index1 (uint): Index of the first oscillator in the ... | def __has_object_connection(self, oscillator_index1, oscillator_index2):
"""!
@brief Searches for pair of objects that are encoded by specified neurons and that are connected in line with connectivity radius.
@param[in] oscillator_index1 (uint): Index of the first oscillator in the ... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/syncsom.py#L162-L181 | [
"def",
"__has_object_connection",
"(",
"self",
",",
"oscillator_index1",
",",
"oscillator_index2",
")",
":",
"som_neuron_index1",
"=",
"self",
".",
"_som_osc_table",
"[",
"oscillator_index1",
"]",
"som_neuron_index2",
"=",
"self",
".",
"_som_osc_table",
"[",
"oscillat... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | syncsom.get_som_clusters | !
@brief Returns clusters with SOM neurons that encode input features in line with result of synchronization in the second (Sync) layer.
@return (list) List of clusters that are represented by lists of indexes of neurons that encode input data.
@see process()
@see... | pyclustering/cluster/syncsom.py | def get_som_clusters(self):
"""!
@brief Returns clusters with SOM neurons that encode input features in line with result of synchronization in the second (Sync) layer.
@return (list) List of clusters that are represented by lists of indexes of neurons that encode input data.
... | def get_som_clusters(self):
"""!
@brief Returns clusters with SOM neurons that encode input features in line with result of synchronization in the second (Sync) layer.
@return (list) List of clusters that are represented by lists of indexes of neurons that encode input data.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/syncsom.py#L184-L207 | [
"def",
"get_som_clusters",
"(",
"self",
")",
":",
"sync_clusters",
"=",
"self",
".",
"_analyser",
".",
"allocate_clusters",
"(",
")",
"# Decode it to indexes of SOM neurons\r",
"som_clusters",
"=",
"list",
"(",
")",
"for",
"oscillators",
"in",
"sync_clusters",
":",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | syncsom.get_clusters | !
@brief Returns clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster.
@param[in] eps (double): Maximum error for allocation of synchronous ensemble oscillators.
@return (list) List of grours (lists) of ... | pyclustering/cluster/syncsom.py | def get_clusters(self, eps = 0.1):
"""!
@brief Returns clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster.
@param[in] eps (double): Maximum error for allocation of synchronous ensemble oscillators.
... | def get_clusters(self, eps = 0.1):
"""!
@brief Returns clusters in line with ensembles of synchronous oscillators where each synchronous ensemble corresponds to only one cluster.
@param[in] eps (double): Maximum error for allocation of synchronous ensemble oscillators.
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/syncsom.py#L210-L235 | [
"def",
"get_clusters",
"(",
"self",
",",
"eps",
"=",
"0.1",
")",
":",
"sync_clusters",
"=",
"self",
".",
"_analyser",
".",
"allocate_clusters",
"(",
"eps",
")",
"# it isn't indexes of SOM neurons\r",
"clusters",
"=",
"list",
"(",
")",
"for",
"oscillators",
"in... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__process_by_ccore | !
@brief Performs cluster analysis using CCORE (C/C++ part of pyclustering library). | pyclustering/cluster/cure.py | def __process_by_ccore(self):
"""!
@brief Performs cluster analysis using CCORE (C/C++ part of pyclustering library).
"""
cure_data_pointer = wrapper.cure_algorithm(self.__pointer_data, self.__number_cluster,
self.__number_represe... | def __process_by_ccore(self):
"""!
@brief Performs cluster analysis using CCORE (C/C++ part of pyclustering library).
"""
cure_data_pointer = wrapper.cure_algorithm(self.__pointer_data, self.__number_cluster,
self.__number_represe... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L163-L175 | [
"def",
"__process_by_ccore",
"(",
"self",
")",
":",
"cure_data_pointer",
"=",
"wrapper",
".",
"cure_algorithm",
"(",
"self",
".",
"__pointer_data",
",",
"self",
".",
"__number_cluster",
",",
"self",
".",
"__number_represent_points",
",",
"self",
".",
"__compressio... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__process_by_python | !
@brief Performs cluster analysis using python code. | pyclustering/cluster/cure.py | def __process_by_python(self):
"""!
@brief Performs cluster analysis using python code.
"""
self.__create_queue() # queue
self.__create_kdtree() # create k-d tree
while len(self.__queue) > self.__number_cluster:
cluster1 = self.__queue[0] # clust... | def __process_by_python(self):
"""!
@brief Performs cluster analysis using python code.
"""
self.__create_queue() # queue
self.__create_kdtree() # create k-d tree
while len(self.__queue) > self.__number_cluster:
cluster1 = self.__queue[0] # clust... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L178-L243 | [
"def",
"__process_by_python",
"(",
"self",
")",
":",
"self",
".",
"__create_queue",
"(",
")",
"# queue\r",
"self",
".",
"__create_kdtree",
"(",
")",
"# create k-d tree\r",
"while",
"len",
"(",
"self",
".",
"__queue",
")",
">",
"self",
".",
"__number_cluster",
... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__prepare_data_points | !
@brief Prepare data points for clustering.
@details In case of numpy.array there are a lot of overloaded basic operators, such as __contains__, __eq__.
@return (list) Returns sample in list format. | pyclustering/cluster/cure.py | def __prepare_data_points(self, sample):
"""!
@brief Prepare data points for clustering.
@details In case of numpy.array there are a lot of overloaded basic operators, such as __contains__, __eq__.
@return (list) Returns sample in list format.
"""
if isinstance(... | def __prepare_data_points(self, sample):
"""!
@brief Prepare data points for clustering.
@details In case of numpy.array there are a lot of overloaded basic operators, such as __contains__, __eq__.
@return (list) Returns sample in list format.
"""
if isinstance(... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L304-L315 | [
"def",
"__prepare_data_points",
"(",
"self",
",",
"sample",
")",
":",
"if",
"isinstance",
"(",
"sample",
",",
"numpy",
".",
"ndarray",
")",
":",
"return",
"sample",
".",
"tolist",
"(",
")",
"return",
"sample"
] | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__validate_arguments | !
@brief Check input arguments of BANG algorithm and if one of them is not correct then appropriate exception
is thrown. | pyclustering/cluster/cure.py | def __validate_arguments(self):
"""!
@brief Check input arguments of BANG algorithm and if one of them is not correct then appropriate exception
is thrown.
"""
if len(self.__pointer_data) == 0:
raise ValueError("Empty input data. Data should contain ... | def __validate_arguments(self):
"""!
@brief Check input arguments of BANG algorithm and if one of them is not correct then appropriate exception
is thrown.
"""
if len(self.__pointer_data) == 0:
raise ValueError("Empty input data. Data should contain ... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L318-L335 | [
"def",
"__validate_arguments",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"__pointer_data",
")",
"==",
"0",
":",
"raise",
"ValueError",
"(",
"\"Empty input data. Data should contain at least one point.\"",
")",
"if",
"self",
".",
"__number_cluster",
"<=",... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__insert_cluster | !
@brief Insert cluster to the list (sorted queue) in line with sequence order (distance).
@param[in] cluster (cure_cluster): Cluster that should be inserted. | pyclustering/cluster/cure.py | def __insert_cluster(self, cluster):
"""!
@brief Insert cluster to the list (sorted queue) in line with sequence order (distance).
@param[in] cluster (cure_cluster): Cluster that should be inserted.
"""
for index in range(len(self.__queue)):
... | def __insert_cluster(self, cluster):
"""!
@brief Insert cluster to the list (sorted queue) in line with sequence order (distance).
@param[in] cluster (cure_cluster): Cluster that should be inserted.
"""
for index in range(len(self.__queue)):
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L338-L351 | [
"def",
"__insert_cluster",
"(",
"self",
",",
"cluster",
")",
":",
"for",
"index",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"__queue",
")",
")",
":",
"if",
"cluster",
".",
"distance",
"<",
"self",
".",
"__queue",
"[",
"index",
"]",
".",
"distance"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__relocate_cluster | !
@brief Relocate cluster in list in line with distance order.
@param[in] cluster (cure_cluster): Cluster that should be relocated in line with order. | pyclustering/cluster/cure.py | def __relocate_cluster(self, cluster):
"""!
@brief Relocate cluster in list in line with distance order.
@param[in] cluster (cure_cluster): Cluster that should be relocated in line with order.
"""
self.__queue.remove(cluster)
self.__ins... | def __relocate_cluster(self, cluster):
"""!
@brief Relocate cluster in list in line with distance order.
@param[in] cluster (cure_cluster): Cluster that should be relocated in line with order.
"""
self.__queue.remove(cluster)
self.__ins... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L354-L363 | [
"def",
"__relocate_cluster",
"(",
"self",
",",
"cluster",
")",
":",
"self",
".",
"__queue",
".",
"remove",
"(",
"cluster",
")",
"self",
".",
"__insert_cluster",
"(",
"cluster",
")"
] | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__closest_cluster | !
@brief Find closest cluster to the specified cluster in line with distance.
@param[in] cluster (cure_cluster): Cluster for which nearest cluster should be found.
@param[in] distance (double): Closest distance to the previous cluster.
@return (tuple) Pair (neares... | pyclustering/cluster/cure.py | def __closest_cluster(self, cluster, distance):
"""!
@brief Find closest cluster to the specified cluster in line with distance.
@param[in] cluster (cure_cluster): Cluster for which nearest cluster should be found.
@param[in] distance (double): Closest distance to the previ... | def __closest_cluster(self, cluster, distance):
"""!
@brief Find closest cluster to the specified cluster in line with distance.
@param[in] cluster (cure_cluster): Cluster for which nearest cluster should be found.
@param[in] distance (double): Closest distance to the previ... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L366-L390 | [
"def",
"__closest_cluster",
"(",
"self",
",",
"cluster",
",",
"distance",
")",
":",
"nearest_cluster",
"=",
"None",
"nearest_distance",
"=",
"float",
"(",
"'inf'",
")",
"real_euclidean_distance",
"=",
"distance",
"**",
"0.5",
"for",
"point",
"in",
"cluster",
"... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__insert_represented_points | !
@brief Insert representation points to the k-d tree.
@param[in] cluster (cure_cluster): Cluster whose representation points should be inserted. | pyclustering/cluster/cure.py | def __insert_represented_points(self, cluster):
"""!
@brief Insert representation points to the k-d tree.
@param[in] cluster (cure_cluster): Cluster whose representation points should be inserted.
"""
for point in cluster.rep:
self.... | def __insert_represented_points(self, cluster):
"""!
@brief Insert representation points to the k-d tree.
@param[in] cluster (cure_cluster): Cluster whose representation points should be inserted.
"""
for point in cluster.rep:
self.... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L393-L402 | [
"def",
"__insert_represented_points",
"(",
"self",
",",
"cluster",
")",
":",
"for",
"point",
"in",
"cluster",
".",
"rep",
":",
"self",
".",
"__tree",
".",
"insert",
"(",
"point",
",",
"cluster",
")"
] | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__delete_represented_points | !
@brief Remove representation points of clusters from the k-d tree
@param[in] cluster (cure_cluster): Cluster whose representation points should be removed. | pyclustering/cluster/cure.py | def __delete_represented_points(self, cluster):
"""!
@brief Remove representation points of clusters from the k-d tree
@param[in] cluster (cure_cluster): Cluster whose representation points should be removed.
"""
for point in cluster.rep:
... | def __delete_represented_points(self, cluster):
"""!
@brief Remove representation points of clusters from the k-d tree
@param[in] cluster (cure_cluster): Cluster whose representation points should be removed.
"""
for point in cluster.rep:
... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L405-L414 | [
"def",
"__delete_represented_points",
"(",
"self",
",",
"cluster",
")",
":",
"for",
"point",
"in",
"cluster",
".",
"rep",
":",
"self",
".",
"__tree",
".",
"remove",
"(",
"point",
",",
"payload",
"=",
"cluster",
")"
] | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__merge_clusters | !
@brief Merges two clusters and returns new merged cluster. Representation points and mean points are calculated for the new cluster.
@param[in] cluster1 (cure_cluster): Cluster that should be merged.
@param[in] cluster2 (cure_cluster): Cluster that should be merged.
... | pyclustering/cluster/cure.py | def __merge_clusters(self, cluster1, cluster2):
"""!
@brief Merges two clusters and returns new merged cluster. Representation points and mean points are calculated for the new cluster.
@param[in] cluster1 (cure_cluster): Cluster that should be merged.
@param[in] cluster2 (... | def __merge_clusters(self, cluster1, cluster2):
"""!
@brief Merges two clusters and returns new merged cluster. Representation points and mean points are calculated for the new cluster.
@param[in] cluster1 (cure_cluster): Cluster that should be merged.
@param[in] cluster2 (... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L417-L471 | [
"def",
"__merge_clusters",
"(",
"self",
",",
"cluster1",
",",
"cluster2",
")",
":",
"merged_cluster",
"=",
"cure_cluster",
"(",
"None",
",",
"None",
")",
"merged_cluster",
".",
"points",
"=",
"cluster1",
".",
"points",
"+",
"cluster2",
".",
"points",
"merged... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__create_queue | !
@brief Create queue of sorted clusters by distance between them, where first cluster has the nearest neighbor. At the first iteration each cluster contains only one point.
@param[in] data (list): Input data that is presented as list of points (objects), each point should be represented by ... | pyclustering/cluster/cure.py | def __create_queue(self):
"""!
@brief Create queue of sorted clusters by distance between them, where first cluster has the nearest neighbor. At the first iteration each cluster contains only one point.
@param[in] data (list): Input data that is presented as list of points (objects)... | def __create_queue(self):
"""!
@brief Create queue of sorted clusters by distance between them, where first cluster has the nearest neighbor. At the first iteration each cluster contains only one point.
@param[in] data (list): Input data that is presented as list of points (objects)... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L474-L502 | [
"def",
"__create_queue",
"(",
"self",
")",
":",
"self",
".",
"__queue",
"=",
"[",
"cure_cluster",
"(",
"self",
".",
"__pointer_data",
"[",
"index_point",
"]",
",",
"index_point",
")",
"for",
"index_point",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"__... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
valid | cure.__create_kdtree | !
@brief Create k-d tree in line with created clusters. At the first iteration contains all points from the input data set.
@return (kdtree) k-d tree that consist of representative points of CURE clusters. | pyclustering/cluster/cure.py | def __create_kdtree(self):
"""!
@brief Create k-d tree in line with created clusters. At the first iteration contains all points from the input data set.
@return (kdtree) k-d tree that consist of representative points of CURE clusters.
"""
self.... | def __create_kdtree(self):
"""!
@brief Create k-d tree in line with created clusters. At the first iteration contains all points from the input data set.
@return (kdtree) k-d tree that consist of representative points of CURE clusters.
"""
self.... | [
"!"
] | annoviko/pyclustering | python | https://github.com/annoviko/pyclustering/blob/98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0/pyclustering/cluster/cure.py#L505-L516 | [
"def",
"__create_kdtree",
"(",
"self",
")",
":",
"self",
".",
"__tree",
"=",
"kdtree",
"(",
")",
"for",
"current_cluster",
"in",
"self",
".",
"__queue",
":",
"for",
"representative_point",
"in",
"current_cluster",
".",
"rep",
":",
"self",
".",
"__tree",
".... | 98aa0dd89fd36f701668fb1eb29c8fb5662bf7d0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.