Skip to main content
Ctrl+K

Tangles documentation

  • API reference
  • Tutorials
  • Tangles Website
  • GitHub
  • API reference
  • Tutorials
  • Tangles Website
  • GitHub

Section Navigation

  • tangles
    • tangles.agreement
      • AdvancedAgreementFunc
      • AgreementFunc
      • AgreementFuncBitarray
      • AgreementFuncBitarrayBips
      • CalculateAgreement
    • tangles.analysis
      • coherence_levels
      • complexity_levels
      • hard_clustering_tuebingen
      • soft_clustering_tuebingen
      • tangle_score
      • visibility
    • tangles.convenience
      • tangles.convenience.convenience_features
        • append_corner_features
        • compute_corner_features
      • NominalVariableValues
        • invert_op
        • possible_values_representation
        • update_values_for_specification
      • NumericalVariableValues
        • invert_op
        • possible_values_representation
        • update_values_for_specification
      • OrderFunctionO1
      • OrderFunctionO1biased
      • OrderFunctionO2
      • OrderFunctionO3
      • OrderFunctionO4
      • OrdinalVariableValues
        • invert_op
        • possible_values_representation
        • update_values_for_specification
      • SimpleSurveyFeatureFactory
        • create_features
        • create_features_for_single_col
      • SimpleSurveyFeatureFactoryMissingValuesBothSides
        • create_features
        • create_features_for_single_col
      • SimpleSurveyFeatureFactoryMissingValuesImplicit
        • create_features
        • create_features_for_single_col
      • SimpleSurveyFeatureFactoryMissingValuesOwnFeatures
        • create_features
        • create_features_for_single_col
      • Survey
        • num_questions
        • num_respondents
        • shape
        • __getitem__
        • check_variables
        • complete_rows
        • copy
        • count_number_of_unique_answers
        • count_valid_answers_per_respondent
        • guess_variable_types
        • guess_variable_value_lists
        • interpret_column_selection
        • load
        • replace_variable_value_labels
        • replace_variable_values
        • save
        • select_questions
        • select_respondents
        • set_pyreadstat_meta_data
        • set_valid_and_invalid_variable_values
        • set_variable_labels
        • set_variable_names
        • set_variable_types
        • summarize
        • variable_info
      • SurveyFeatureFactory
        • create_features
        • create_features_for_single_col
      • SurveyFeatureFactoryCherryPicker
        • create_features
        • create_features_for_single_col
        • set_factoryfunc
      • SurveyFeatureFactoryDecorator
        • create_features
        • create_features_for_single_col
      • SurveyTangles
        • feature_system
        • valid_agreement_lower_bound
        • change_agreement
        • explain_feature
        • initialize_search
        • load
        • ordered_metadata
        • search
        • specified_features
        • tangle_matrix
        • typical_answers
      • SurveyVariable
        • add_values
        • all_values_as_list
        • create_values
        • invalid_values_as_list
        • is_nominal_type
        • is_numeric_type
        • is_ordinal_type
        • is_valid_type
        • is_valid_type_name
        • replace_values
        • set_value_labels
        • set_values
        • to_row
        • valid_values_as_list
        • value_class
      • SurveyVariableValues
        • invert_op
        • possible_values_representation
        • update_values_for_specification
      • TangleSweepFeatureSys
        • all_oriented_feature_ids
        • original_feature_ids
        • search_object
        • sep_sys
        • tree
        • lower_agreement
        • oriented_feature_ids_for_agreement
        • tangle_matrix
        • tangle_score
      • UnionOfIntervals
      • binary_unique_value_features
      • create_features_all_unique_values
      • create_features_split_regular_bins
      • create_features_split_regular_ge
      • create_order_function
      • feats2seps_invalids_to_both_sides
      • feature_factory_all_splits_ge
      • nominalvar_features_all_cats
      • order_works_on_features
      • search_tangles
      • search_tangles_uncrossed
    • tangles.guiding
      • get_tangle_by_path
      • guided_tangle
      • is_guiding
    • tangles.search
      • tangles.search.extending_tangles
        • ExtendingTangles
      • tangles.search.progress
        • DefaultProgressCallback
        • SimpleProgressCallback
    • tangles.separations
      • tangles.separations.atomic_sets
        • atomic_set_indicators
        • atomic_sets
        • atomic_to_seps
        • seps_to_atomic
      • tangles.separations.finding
        • OrderFuncDerivative
        • add_all_corners_of_features
        • min_S_T_cut
        • minimize_cut
        • nodal_domains
        • pca_features
        • random_features
        • spectral_features
        • spectral_features_splitted
      • tangles.separations.util
        • order_func_balance
        • order_func_min_side_size
      • AdvancedFeatureSystem
        • __getitem__
        • add_corner
        • add_features
        • add_seps
        • all_feature_ids
        • all_sep_ids
        • assemble_meta_info
        • compute_infimum
        • copy
        • count_big_side
        • crossing_seps
        • feature_and_complement_size
        • feature_metadata
        • feature_size
        • get_corners
        • get_feature_ids
        • get_sep_ids
        • is_le
        • is_nested
        • is_subset
        • metadata_matrix
        • separation_metadata
        • side_counts
        • with_array
        • with_sparse_array
      • FeatureSystem
        • __getitem__
        • add_corner
        • add_features
        • add_seps
        • all_feature_ids
        • all_sep_ids
        • assemble_meta_info
        • compute_infimum
        • count_big_side
        • crossing_seps
        • feature_and_complement_size
        • feature_metadata
        • feature_size
        • get_corners
        • get_feature_ids
        • get_sep_ids
        • is_le
        • is_nested
        • is_subset
        • metadata_matrix
        • separation_metadata
        • side_counts
        • with_array
        • with_sparse_array
      • MetaData
        • append
      • SetSeparationSystem
        • __getitem__
        • add_corner
        • add_seps
        • all_sep_ids
        • assemble_meta_info
        • compute_infimum
        • count_big_side
        • crossing_seps
        • get_corners
        • get_sep_ids
        • is_le
        • is_nested
        • metadata_matrix
        • separation_metadata
        • side_counts
        • with_array
        • with_sparse_array
      • SetSeparationSystemBase
        • __getitem__
        • add_corner
        • add_seps
        • all_sep_ids
        • assemble_meta_info
        • compute_infimum
        • count_big_side
        • crossing_seps
        • get_corners
        • get_sep_ids
        • is_le
        • is_nested
        • metadata_matrix
        • separation_metadata
        • side_counts
        • with_array
        • with_sparse_array
      • SetSeparationSystemOrderFunc
    • tangles.util
      • tangles.util.entropy
        • colsplit_mutual_information
        • datapointwise_information_gains
        • entropy
        • information_gain
        • joint_entropy
        • pairwise_mutual_information
      • tangles.util.graph
        • tangles.util.graph.cut_weight
        • tangles.util.graph.minor
        • tangles.util.graph.similarity
        • connected_component_indicators
        • greedy_neighborhood
        • greedy_neighborhood_old
        • laplacian
        • modularity_matrix
        • normalized_laplacian
      • tangles.util.logic
        • tangles.util.logic.sep_to_term
        • tangles.util.logic.term
        • ConjunctiveNormalForm
        • DisjunctiveNormalForm
        • LogicTerm
        • TextTerm
        • append
        • distribute
        • simplify
      • tangles.util.matrix_order
        • MatrixOrderSVD
        • covariance_order
        • linear_similarity_from_dist_matrix
        • linear_similarity_from_distances
        • logdet_order
        • matrix_order
        • o_five
        • o_seven
      • tangles.util.preprocessing
        • balance
        • normalize_length
        • standardize
      • tangles.util.tree
        • BinTreeNetworkX
        • BinTreeNode
        • GraphNode
        • TreeNode
        • plot_tree
        • print_node_label
      • tangles.util.ui
        • SplitGraph
        • XYPicker
        • plot_annotated
        • wrap_annotation_func_ax
    • FTreeNode
      • children
      • copy
      • copy_subtree
      • copy_subtree_into_children
      • detach
      • from_indicator_matrix
      • is_leaf
      • leaves_in_subtree
      • level
      • level_in_subtree
      • path_from_root_indicator
      • set_left_child
      • set_right_child
      • to_indicator_matrix
    • Tangle
      • children
      • copy
      • copy_subtree
      • copy_subtree_into_children
      • detach
      • equal_data
      • from_indicator_matrix
      • is_leaf
      • leaves_in_subtree
      • level
      • level_in_subtree
      • open
      • path_from_root_indicator
      • set_left_child
      • set_right_child
      • to_indicator_matrix
    • TangleSearchTree
      • limit
      • number_of_separations
      • root
      • sep_ids
      • get_efficient_distinguishers
      • k_tangles
      • load
      • maximal_tangles
      • save
      • search_tree
      • tangle_matrix
      • tree_height_for_agreement
    • TangleSearchWidget
      • all_oriented_feature_ids
      • original_feature_ids
      • search_object
      • sep_sys
      • tree
      • lower_agreement
      • oriented_feature_ids_for_agreement
      • tangle_matrix
      • tangle_score
    • TangleSweep
      • tree
      • append_separation
      • greedy_search
      • insert_separation
      • sweep_below
      • sweep_one
    • ToTEdge
      • other_end
    • ToTNode
      • neighbours
      • degree
      • is_leaf
      • set_label
    • TreeOfTangles
      • any_node
    • UncrossingSweep
      • all_oriented_feature_ids
      • original_feature_ids
      • search_object
      • sep_sys
      • tree
      • create_tot
      • lower_agreement
      • oriented_feature_ids_for_agreement
      • sweep_below
      • sweep_one
      • tangle_matrix
      • tangle_score
    • agreement_func
    • create_tot
    • uncross_distinguishers
  • API reference
  • SurveyTangles
  • search

search#

classmethod SurveyTangles.search(survey: ~tangles.convenience.survey.Survey, agreement: int, features_or_separations: ~numpy.ndarray | None = None, metadata: list | ~numpy.ndarray | None = None, order: list | ~numpy.ndarray | ~typing.Callable[[~numpy.ndarray], ~numpy.ndarray] | str | None = None, similarity_matrix: ~numpy.ndarray | ~scipy.sparse._matrix.spmatrix = None, feature_factory: ~tangles.convenience.survey_feature_factory.SurveyFeatureFactory | None = None, uncross: bool = False, progress_callback=<tangles.search.progress.DefaultProgressCallback object>) → SurveyTangles#

Search tangles.

Returns a SurveyTangles object managing a tangle search on survey data.

Parameters#

surveySurvey

A survey object.

agreementint

The currently valid agreement lower bound.

features_or_separationsnp.ndarray or None

A matrix containing the features in its columns.

metadatanp.ndarray or None

A list of metadata corresponding to features_or_separations.

orderlist, np.ndarray, SetSeparationOrderFunction, str or None

A list or np.ndarray of indices, an order function or the name of an order function, indicating the order in which the features are used for building a tangle search tree.

similarity_matrixnp.ndarray or None

A similarity matrix possibly used by the order function.

feature_factorySurveyFeatureFactory or None

An object turning questions (i.e. the rows of survey) into features (or separations). See also SurveyFeatureFactory.

uncrossbool

If True, uncross the features (or separations) that distinguish at least two tangles.

progress_callbackDefaultProgressCallback or callable

A callable providing a progress indication (see DefaultProgressCallback for reference).

Returns#

SurveyTangles

An object managing a tangle search on survey data.

previous

ordered_metadata

next

specified_features

On this page
  • SurveyTangles.search()
Show Source

© Copyright 2024, Tangle Software Contributors.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.2.