Pair Best Similarity/Distance.

This module contains classes to find the best similarity/distance equation based on the target match.

class measurenary.pair_best.PairBestMeasure(show_result: bool = False, result_count: int = 5)[source]

Class to get the best similarity and distance based on target pairs.

Parameters
  • show_result (bool, optional) – Set True to show result. The default is False.

  • result_count (int, optional) – Set the number of result to show. The default is 5.

fit(df: pandas.core.frame.DataFrame, use_seed: bool = False, num_sample: int = 20, **kwargs)[source]

Train data to generate a suitable similarity/distance equation.

Parameters
  • df (pandas.DataFrame) – dataframe source

  • use_seed (bool, optional) – Set True to use seed. The default is False.

  • num_sample (int, optional) – Set the number of sample to generate. The default is 20.

Returns

Return type

None

get_result(csv: bool = False) pandas.core.frame.DataFrame[source]

Get result of training.

Parameters

csv (bool, optional) – Set True to get result in csv format. The default is False.

Returns

dataframe result

Return type

pandas.DataFrame

Raises

Exception – If method fit() is not called before this function.