pybear 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pybear/__init__.py +24 -0
- pybear/_version.py +38 -0
- pybear/base/_DictMenuPrint.py +342 -0
- pybear/base/__init__.py +99 -0
- pybear/base/__type_aliases.py +45 -0
- pybear/base/_cast_to_ndarray.py +199 -0
- pybear/base/_check_1D_num_sequence.py +194 -0
- pybear/base/_check_1D_str_sequence.py +192 -0
- pybear/base/_check_2D_num_array.py +239 -0
- pybear/base/_check_2D_str_array.py +223 -0
- pybear/base/_check_dtype.py +276 -0
- pybear/base/_check_feature_names.py +232 -0
- pybear/base/_check_is_finite.py +255 -0
- pybear/base/_check_is_fitted.py +165 -0
- pybear/base/_check_n_features.py +133 -0
- pybear/base/_check_scipy_sparse.py +156 -0
- pybear/base/_check_shape.py +267 -0
- pybear/base/_copy_X.py +140 -0
- pybear/base/_ensure_2D.py +166 -0
- pybear/base/_get_feature_names.py +104 -0
- pybear/base/_get_feature_names_out.py +119 -0
- pybear/base/_is_fitted.py +127 -0
- pybear/base/_num_features.py +121 -0
- pybear/base/_num_samples.py +118 -0
- pybear/base/_set_order.py +103 -0
- pybear/base/_validate_data.py +373 -0
- pybear/base/_validate_user_input.py +566 -0
- pybear/base/exceptions/__init__.py +27 -0
- pybear/base/exceptions/_exceptions.py +29 -0
- pybear/base/mixins/_FeatureMixin.py +272 -0
- pybear/base/mixins/_FileDumpMixin.py +225 -0
- pybear/base/mixins/_FitTransformMixin.py +53 -0
- pybear/base/mixins/_GetParamsMixin.py +169 -0
- pybear/base/mixins/_ReprMixin.py +580 -0
- pybear/base/mixins/_SetOutputMixin.py +216 -0
- pybear/base/mixins/_SetParamsMixin.py +182 -0
- pybear/base/mixins/__init__.py +5 -0
- pybear/feature_extraction/__init__.py +0 -0
- pybear/feature_extraction/text/WORDS_TO_DISPOSITION +345 -0
- pybear/feature_extraction/text/_AutoTextCleaner/AutoTextCleaner.py +973 -0
- pybear/feature_extraction/text/_AutoTextCleaner/__init__.py +5 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_type_aliases.py +82 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_validation/_get_statistics.py +74 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_validation/_lexicon_lookup.py +85 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_validation/_ngram_merge.py +73 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_validation/_remove.py +69 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_validation/_replace.py +59 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_validation/_return_dim.py +55 -0
- pybear/feature_extraction/text/_AutoTextCleaner/_validation/_validation.py +137 -0
- pybear/feature_extraction/text/_Lexicon/Lexicon.py +451 -0
- pybear/feature_extraction/text/_Lexicon/__init__.py +5 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/__init__.py +0 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_A.txt +3795 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_B.txt +3935 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_C.txt +6789 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_D.txt +4630 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_E.txt +2968 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_F.txt +2969 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_G.txt +2236 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_H.txt +2425 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_I.txt +2938 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_J.txt +730 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_K.txt +641 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_L.txt +2137 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_M.txt +3901 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_N.txt +1482 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_O.txt +2159 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_P.txt +5315 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_Q.txt +366 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_R.txt +4212 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_S.txt +7571 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_T.txt +3145 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_U.txt +2887 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_V.txt +1090 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_W.txt +1885 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_X.txt +38 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_Y.txt +217 -0
- pybear/feature_extraction/text/_Lexicon/_lexicon/lexicon_Z.txt +146 -0
- pybear/feature_extraction/text/_Lexicon/_methods/__init__.py +5 -0
- pybear/feature_extraction/text/_Lexicon/_methods/_add_words.py +195 -0
- pybear/feature_extraction/text/_Lexicon/_methods/_check_order.py +76 -0
- pybear/feature_extraction/text/_Lexicon/_methods/_delete_words.py +122 -0
- pybear/feature_extraction/text/_Lexicon/_methods/_find_duplicates.py +82 -0
- pybear/feature_extraction/text/_Lexicon/_methods/_identify_sublexicon.py +79 -0
- pybear/feature_extraction/text/_Lexicon/_methods/_validate_word_input.py +123 -0
- pybear/feature_extraction/text/_Lexicon/_stop_words/__init__.py +5 -0
- pybear/feature_extraction/text/_Lexicon/_stop_words/_stop_words.txt +145 -0
- pybear/feature_extraction/text/_NGramMerger/NGramMerger.py +575 -0
- pybear/feature_extraction/text/_NGramMerger/__init__.py +5 -0
- pybear/feature_extraction/text/_NGramMerger/_transform/__init__.py +5 -0
- pybear/feature_extraction/text/_NGramMerger/_transform/_get_wrap_match_idxs.py +123 -0
- pybear/feature_extraction/text/_NGramMerger/_transform/_manage_wrap_idxs.py +108 -0
- pybear/feature_extraction/text/_NGramMerger/_transform/_match_finder.py +76 -0
- pybear/feature_extraction/text/_NGramMerger/_transform/_replacer.py +91 -0
- pybear/feature_extraction/text/_NGramMerger/_transform/_special_param_conditioner.py +96 -0
- pybear/feature_extraction/text/_NGramMerger/_transform/_transform.py +134 -0
- pybear/feature_extraction/text/_NGramMerger/_transform/_wrap_manager.py +190 -0
- pybear/feature_extraction/text/_NGramMerger/_type_aliases.py +62 -0
- pybear/feature_extraction/text/_NGramMerger/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/_NGramMerger/_validation/_ngcallable.py +44 -0
- pybear/feature_extraction/text/_NGramMerger/_validation/_ngrams.py +88 -0
- pybear/feature_extraction/text/_NGramMerger/_validation/_validation.py +117 -0
- pybear/feature_extraction/text/_StopRemover/StopRemover.py +464 -0
- pybear/feature_extraction/text/_StopRemover/__init__.py +5 -0
- pybear/feature_extraction/text/_StopRemover/_transform/__init__.py +5 -0
- pybear/feature_extraction/text/_StopRemover/_transform/_transform.py +120 -0
- pybear/feature_extraction/text/_StopRemover/_type_aliases.py +36 -0
- pybear/feature_extraction/text/_StopRemover/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/_StopRemover/_validation/_exempt.py +43 -0
- pybear/feature_extraction/text/_StopRemover/_validation/_match_callable.py +51 -0
- pybear/feature_extraction/text/_StopRemover/_validation/_supplemental.py +43 -0
- pybear/feature_extraction/text/_StopRemover/_validation/_validation.py +92 -0
- pybear/feature_extraction/text/_TextJoiner/TextJoiner.py +309 -0
- pybear/feature_extraction/text/_TextJoiner/__init__.py +5 -0
- pybear/feature_extraction/text/_TextJoiner/_transform/__init__.py +5 -0
- pybear/feature_extraction/text/_TextJoiner/_transform/_condition_sep.py +51 -0
- pybear/feature_extraction/text/_TextJoiner/_transform/_transform.py +64 -0
- pybear/feature_extraction/text/_TextJoiner/_type_aliases.py +40 -0
- pybear/feature_extraction/text/_TextJoiner/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/_TextJoiner/_validation/_sep.py +63 -0
- pybear/feature_extraction/text/_TextJoiner/_validation/_validation.py +54 -0
- pybear/feature_extraction/text/_TextJustifier/TextJustifier.py +667 -0
- pybear/feature_extraction/text/_TextJustifier/__init__.py +5 -0
- pybear/feature_extraction/text/_TextJustifier/_transform/__init__.py +5 -0
- pybear/feature_extraction/text/_TextJustifier/_transform/_sep_lb_finder.py +153 -0
- pybear/feature_extraction/text/_TextJustifier/_transform/_splitter.py +153 -0
- pybear/feature_extraction/text/_TextJustifier/_transform/_stacker.py +219 -0
- pybear/feature_extraction/text/_TextJustifier/_transform/_transform.py +99 -0
- pybear/feature_extraction/text/_TextJustifier/_type_aliases.py +72 -0
- pybear/feature_extraction/text/_TextJustifier/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/_TextJustifier/_validation/_sep_or_line_break.py +202 -0
- pybear/feature_extraction/text/_TextJustifier/_validation/_validation.py +240 -0
- pybear/feature_extraction/text/_TextLookup/TextLookup.py +928 -0
- pybear/feature_extraction/text/_TextLookup/TextLookupRealTime.py +931 -0
- pybear/feature_extraction/text/_TextLookup/_TextLookupMixin.py +449 -0
- pybear/feature_extraction/text/_TextLookup/__init__.py +5 -0
- pybear/feature_extraction/text/_TextLookup/_shared/__init__.py +5 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_transform/__init__.py +5 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_transform/_auto_word_splitter.py +69 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_transform/_manual_word_splitter.py +96 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_transform/_quasi_auto_word_splitter.py +83 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_transform/_word_editor.py +51 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_type_aliases.py +39 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_validation/_delete_always.py +45 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_validation/_replace_always.py +60 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_validation/_skip_always.py +47 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_validation/_split_always.py +64 -0
- pybear/feature_extraction/text/_TextLookup/_shared/_validation/_validation.py +147 -0
- pybear/feature_extraction/text/_TextNormalizer/TextNormalizer.py +274 -0
- pybear/feature_extraction/text/_TextNormalizer/__init__.py +5 -0
- pybear/feature_extraction/text/_TextNormalizer/_transform.py +66 -0
- pybear/feature_extraction/text/_TextNormalizer/_type_aliases.py +42 -0
- pybear/feature_extraction/text/_TextNormalizer/_validation.py +61 -0
- pybear/feature_extraction/text/_TextPadder/TextPadder.py +427 -0
- pybear/feature_extraction/text/_TextPadder/__init__.py +5 -0
- pybear/feature_extraction/text/_TextPadder/_partial_fit/__init__.py +5 -0
- pybear/feature_extraction/text/_TextPadder/_partial_fit/_partial_fit.py +42 -0
- pybear/feature_extraction/text/_TextPadder/_transform/__init__.py +5 -0
- pybear/feature_extraction/text/_TextPadder/_transform/_transform.py +87 -0
- pybear/feature_extraction/text/_TextPadder/_type_aliases.py +42 -0
- pybear/feature_extraction/text/_TextPadder/_validation.py +79 -0
- pybear/feature_extraction/text/_TextRemover/TextRemover.py +482 -0
- pybear/feature_extraction/text/_TextRemover/__init__.py +5 -0
- pybear/feature_extraction/text/_TextRemover/_regexp_1D_core.py +123 -0
- pybear/feature_extraction/text/_TextRemover/_type_aliases.py +70 -0
- pybear/feature_extraction/text/_TextRemover/_validation.py +140 -0
- pybear/feature_extraction/text/_TextReplacer/TextReplacer.py +438 -0
- pybear/feature_extraction/text/_TextReplacer/__init__.py +5 -0
- pybear/feature_extraction/text/_TextReplacer/_transform/__init__.py +5 -0
- pybear/feature_extraction/text/_TextReplacer/_transform/_regexp_1D_core.py +102 -0
- pybear/feature_extraction/text/_TextReplacer/_transform/_special_param_conditioner.py +290 -0
- pybear/feature_extraction/text/_TextReplacer/_type_aliases.py +69 -0
- pybear/feature_extraction/text/_TextReplacer/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/_TextReplacer/_validation/_replace.py +148 -0
- pybear/feature_extraction/text/_TextReplacer/_validation/_validation.py +75 -0
- pybear/feature_extraction/text/_TextSplitter/TextSplitter.py +414 -0
- pybear/feature_extraction/text/_TextSplitter/__init__.py +5 -0
- pybear/feature_extraction/text/_TextSplitter/_regexp_core.py +182 -0
- pybear/feature_extraction/text/_TextSplitter/_type_aliases.py +79 -0
- pybear/feature_extraction/text/_TextSplitter/_validation.py +115 -0
- pybear/feature_extraction/text/_TextStatistics/TextStatistics.py +941 -0
- pybear/feature_extraction/text/_TextStatistics/__init__.py +5 -0
- pybear/feature_extraction/text/_TextStatistics/_get/__init__.py +5 -0
- pybear/feature_extraction/text/_TextStatistics/_get/_get_longest_strings.py +82 -0
- pybear/feature_extraction/text/_TextStatistics/_get/_get_shortest_strings.py +80 -0
- pybear/feature_extraction/text/_TextStatistics/_lookup/__init__.py +5 -0
- pybear/feature_extraction/text/_TextStatistics/_lookup/_lookup_string.py +142 -0
- pybear/feature_extraction/text/_TextStatistics/_lookup/_lookup_substring.py +134 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/__init__.py +5 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_build_character_frequency.py +54 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_build_overall_statistics.py +100 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_build_overall_statistics_OLD.py +103 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_build_startswith_frequency.py +55 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_build_string_frequency.py +78 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_merge_character_frequency.py +56 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_merge_overall_statistics.py +137 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_merge_startswith_frequency.py +56 -0
- pybear/feature_extraction/text/_TextStatistics/_partial_fit/_merge_string_frequency.py +59 -0
- pybear/feature_extraction/text/_TextStatistics/_print/__init__.py +5 -0
- pybear/feature_extraction/text/_TextStatistics/_print/_character_frequency.py +74 -0
- pybear/feature_extraction/text/_TextStatistics/_print/_longest_strings.py +85 -0
- pybear/feature_extraction/text/_TextStatistics/_print/_overall_statistics.py +47 -0
- pybear/feature_extraction/text/_TextStatistics/_print/_shortest_strings.py +85 -0
- pybear/feature_extraction/text/_TextStatistics/_print/_startswith_frequency.py +74 -0
- pybear/feature_extraction/text/_TextStatistics/_print/_string_frequency.py +88 -0
- pybear/feature_extraction/text/_TextStatistics/_type_aliases.py +52 -0
- pybear/feature_extraction/text/_TextStatistics/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/_TextStatistics/_validation/_character_frequency.py +44 -0
- pybear/feature_extraction/text/_TextStatistics/_validation/_n.py +38 -0
- pybear/feature_extraction/text/_TextStatistics/_validation/_overall_statistics.py +89 -0
- pybear/feature_extraction/text/_TextStatistics/_validation/_startswith_frequency.py +49 -0
- pybear/feature_extraction/text/_TextStatistics/_validation/_string_frequency.py +49 -0
- pybear/feature_extraction/text/_TextStatistics/_validation/_uniques.py +49 -0
- pybear/feature_extraction/text/_TextStatistics/_validation/_validation.py +50 -0
- pybear/feature_extraction/text/_TextStripper/TextStripper.py +242 -0
- pybear/feature_extraction/text/_TextStripper/__init__.py +5 -0
- pybear/feature_extraction/text/_TextStripper/_transform.py +51 -0
- pybear/feature_extraction/text/_TextStripper/_type_aliases.py +35 -0
- pybear/feature_extraction/text/__init__.py +50 -0
- pybear/feature_extraction/text/__shared/__init__.py +5 -0
- pybear/feature_extraction/text/__shared/_param_conditioner/__init__.py +5 -0
- pybear/feature_extraction/text/__shared/_param_conditioner/_compile_maker.py +142 -0
- pybear/feature_extraction/text/__shared/_param_conditioner/_flag_maker.py +122 -0
- pybear/feature_extraction/text/__shared/_param_conditioner/_param_conditioner.py +199 -0
- pybear/feature_extraction/text/__shared/_transform/__init__.py +5 -0
- pybear/feature_extraction/text/__shared/_transform/_map_X_to_list.py +122 -0
- pybear/feature_extraction/text/__shared/_utilities/__init__.py +5 -0
- pybear/feature_extraction/text/__shared/_utilities/_view_text_snippet.py +104 -0
- pybear/feature_extraction/text/__shared/_validation/_1D_2D_X.py +49 -0
- pybear/feature_extraction/text/__shared/_validation/_1D_X.py +47 -0
- pybear/feature_extraction/text/__shared/_validation/_2D_X.py +47 -0
- pybear/feature_extraction/text/__shared/_validation/__init__.py +5 -0
- pybear/feature_extraction/text/__shared/_validation/_any_bool.py +59 -0
- pybear/feature_extraction/text/__shared/_validation/_any_integer.py +181 -0
- pybear/feature_extraction/text/__shared/_validation/_any_string.py +57 -0
- pybear/feature_extraction/text/__shared/_validation/_case_sensitive.py +88 -0
- pybear/feature_extraction/text/__shared/_validation/_compile_holder.py +114 -0
- pybear/feature_extraction/text/__shared/_validation/_flags.py +91 -0
- pybear/feature_extraction/text/__shared/_validation/_pattern_holder.py +145 -0
- pybear/feature_extraction/text/lexicon_appender.py +35 -0
- pybear/feature_extraction/text/variable_finder.py +104 -0
- pybear/model_selection/GSTCV/_GSTCV/GSTCV.py +856 -0
- pybear/model_selection/GSTCV/_GSTCV/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCV/_fit/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCV/_fit/_estimator_fit_params_helper.py +99 -0
- pybear/model_selection/GSTCV/_GSTCV/_fit/_fold_splitter.py +109 -0
- pybear/model_selection/GSTCV/_GSTCV/_fit/_get_kfold.py +108 -0
- pybear/model_selection/GSTCV/_GSTCV/_fit/_parallelized_fit.py +129 -0
- pybear/model_selection/GSTCV/_GSTCV/_fit/_parallelized_scorer.py +227 -0
- pybear/model_selection/GSTCV/_GSTCV/_fit/_parallelized_train_scorer.py +226 -0
- pybear/model_selection/GSTCV/_GSTCV/_type_aliases.py +39 -0
- pybear/model_selection/GSTCV/_GSTCV/_validation/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCV/_validation/_pre_dispatch.py +49 -0
- pybear/model_selection/GSTCV/_GSTCV/_validation/_sk_estimator.py +74 -0
- pybear/model_selection/GSTCV/_GSTCV/_validation/_validation.py +51 -0
- pybear/model_selection/GSTCV/_GSTCV/_validation/_y.py +75 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_GSTCVMixin.py +988 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_fit/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_fit/_cv_results/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_fit/_cv_results/_cv_results_builder.py +412 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_fit/_cv_results/_cv_results_rank_update.py +85 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_fit/_cv_results/_cv_results_score_updater.py +139 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_fit/_cv_results/_cv_results_update.py +191 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_fit/_get_best_thresholds.py +114 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_fit/_verify_refit_callable.py +103 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_param_conditioning/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_param_conditioning/_cv.py +125 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_param_conditioning/_param_grid.py +86 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_param_conditioning/_refit.py +66 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_param_conditioning/_scoring.py +93 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_param_conditioning/_thresholds.py +59 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_param_conditioning/_verbose.py +57 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_cv.py +112 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_error_score.py +62 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_estimator.py +86 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_holders/__init__.py +5 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_holders/_f_s.py +70 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_holders/_f_t_s.py +74 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_n_jobs.py +63 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_param_grid.py +85 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_param_grid_helper.py +85 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_predict_proba.py +104 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_refit.py +115 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_return_train_score.py +37 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_scoring.py +193 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_thresholds.py +149 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_validation.py +114 -0
- pybear/model_selection/GSTCV/_GSTCVMixin/_validation/_verbose.py +63 -0
- pybear/model_selection/GSTCV/__init__.py +5 -0
- pybear/model_selection/GSTCV/_type_aliases.py +118 -0
- pybear/model_selection/__init__.py +25 -0
- pybear/model_selection/autogridsearch/AutoGSTCV.py +69 -0
- pybear/model_selection/autogridsearch/AutoGridSearchCV.py +69 -0
- pybear/model_selection/autogridsearch/__init__.py +19 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_build_first_grid_from_params.py +40 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_build_is_logspace.py +90 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_demo/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_demo/_demo.py +190 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_demo/_display_true_best.py +70 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_demo/_make_true_best.py +84 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_demo/_mock_gscv.py +167 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_demo/_validate_true_best.py +119 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_bool/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_bool/_bool.py +58 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_drill/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_drill/_drill.py +211 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_float/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_float/_float.py +121 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_float/_float_linspace.py +133 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_float/_float_logspace.py +169 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_get_next_param_grid.py +371 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int.py +167 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_grid_mapper.py +109 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_linspace_gap_gt_1.py +142 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_linspace_gap_gt_1_hard.py +87 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_linspace_gap_gt_1_soft.py +79 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_linspace_unit_gap.py +150 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_logspace_core.py +146 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_logspace_gap_gt_1.py +120 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_logspace_gap_gt_1_hard.py +100 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_logspace_gap_gt_1_soft.py +101 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_int/_int_logspace_unit_gap.py +115 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_regap_logspace.py +191 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_shift/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_shift/_shift.py +173 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_shift/_shift_grid.py +146 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_shift/_shift_points_and_passes.py +64 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_string/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_string/_string.py +57 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_update_phlite.py +111 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_validation/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_validation/_validate_best_params.py +94 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_validation/_validate_grids.py +70 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_validation/_validate_int_float_linlogspace.py +290 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_validation/_validate_is_logspace.py +92 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_get_next_param_grid/_validation/_validate_phlite.py +51 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_param_conditioning/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_param_conditioning/_conditioning.py +70 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_param_conditioning/_max_shifts.py +43 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_param_conditioning/_params.py +130 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_param_conditioning/_total_passes.py +34 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_print_results.py +67 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_refit_can_be_skipped.py +111 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_type_aliases.py +92 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_type_aliases_bool.py +44 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_type_aliases_float.py +41 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_type_aliases_int.py +44 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_type_aliases_num.py +52 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_type_aliases_str.py +41 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/__init__.py +5 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_agscv_verbose.py +34 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_max_shifts.py +58 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_params.py +270 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_params_bool.py +75 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_params_numerical.py +178 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_params_string.py +76 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_total_passes.py +51 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_total_passes_is_hard.py +35 -0
- pybear/model_selection/autogridsearch/_autogridsearch_wrapper/_validation/_validation.py +73 -0
- pybear/model_selection/autogridsearch/autogridsearch_docs.py +631 -0
- pybear/model_selection/autogridsearch/autogridsearch_wrapper.py +594 -0
- pybear/new_numpy/__init__.py +19 -0
- pybear/new_numpy/random/__init__.py +26 -0
- pybear/new_numpy/random/_random_.py +969 -0
- pybear/preprocessing/_ColumnDeduplicator/ColumnDeduplicator.py +992 -0
- pybear/preprocessing/_ColumnDeduplicator/__init__.py +5 -0
- pybear/preprocessing/_ColumnDeduplicator/_inverse_transform/__init__.py +5 -0
- pybear/preprocessing/_ColumnDeduplicator/_inverse_transform/_inverse_transform.py +133 -0
- pybear/preprocessing/_ColumnDeduplicator/_partial_fit/__init__.py +5 -0
- pybear/preprocessing/_ColumnDeduplicator/_partial_fit/_columns_getter.py +129 -0
- pybear/preprocessing/_ColumnDeduplicator/_partial_fit/_find_duplicates.py +188 -0
- pybear/preprocessing/_ColumnDeduplicator/_partial_fit/_identify_idxs_to_delete.py +266 -0
- pybear/preprocessing/_ColumnDeduplicator/_partial_fit/_lock_in_random_idxs.py +185 -0
- pybear/preprocessing/_ColumnDeduplicator/_partial_fit/_merge_dupls.py +117 -0
- pybear/preprocessing/_ColumnDeduplicator/_partial_fit/_parallel_chunk_comparer.py +125 -0
- pybear/preprocessing/_ColumnDeduplicator/_partial_fit/_parallel_column_comparer.py +165 -0
- pybear/preprocessing/_ColumnDeduplicator/_transform/__init__.py +5 -0
- pybear/preprocessing/_ColumnDeduplicator/_transform/_transform.py +67 -0
- pybear/preprocessing/_ColumnDeduplicator/_type_aliases.py +49 -0
- pybear/preprocessing/_ColumnDeduplicator/_validation/__init__.py +5 -0
- pybear/preprocessing/_ColumnDeduplicator/_validation/_conflict.py +62 -0
- pybear/preprocessing/_ColumnDeduplicator/_validation/_do_not_drop.py +121 -0
- pybear/preprocessing/_ColumnDeduplicator/_validation/_keep.py +46 -0
- pybear/preprocessing/_ColumnDeduplicator/_validation/_validation.py +106 -0
- pybear/preprocessing/_InterceptManager/InterceptManager.py +1172 -0
- pybear/preprocessing/_InterceptManager/__init__.py +5 -0
- pybear/preprocessing/_InterceptManager/_inverse_transform/__init__.py +5 -0
- pybear/preprocessing/_InterceptManager/_inverse_transform/_inverse_transform.py +118 -0
- pybear/preprocessing/_InterceptManager/_inverse_transform/_remove_intercept.py +114 -0
- pybear/preprocessing/_InterceptManager/_partial_fit/__init__.py +5 -0
- pybear/preprocessing/_InterceptManager/_partial_fit/_columns_getter.py +124 -0
- pybear/preprocessing/_InterceptManager/_partial_fit/_find_constants.py +143 -0
- pybear/preprocessing/_InterceptManager/_partial_fit/_merge_constants.py +140 -0
- pybear/preprocessing/_InterceptManager/_partial_fit/_parallel_constant_finder.py +193 -0
- pybear/preprocessing/_InterceptManager/_shared/__init__.py +5 -0
- pybear/preprocessing/_InterceptManager/_shared/_make_instructions.py +156 -0
- pybear/preprocessing/_InterceptManager/_shared/_manage_keep.py +224 -0
- pybear/preprocessing/_InterceptManager/_shared/_set_attributes.py +98 -0
- pybear/preprocessing/_InterceptManager/_transform/__init__.py +5 -0
- pybear/preprocessing/_InterceptManager/_transform/_transform.py +133 -0
- pybear/preprocessing/_InterceptManager/_type_aliases.py +71 -0
- pybear/preprocessing/_InterceptManager/_validation/__init__.py +5 -0
- pybear/preprocessing/_InterceptManager/_validation/_instructions.py +95 -0
- pybear/preprocessing/_InterceptManager/_validation/_keep_and_columns.py +257 -0
- pybear/preprocessing/_InterceptManager/_validation/_validation.py +82 -0
- pybear/preprocessing/_MinCountTransformer/MinCountTransformer.py +1685 -0
- pybear/preprocessing/_MinCountTransformer/__init__.py +5 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/__init__.py +5 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_make_instructions.py +343 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_one_unique.py +80 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_three_or_more_uniques_hab.py +178 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_three_or_more_uniques_not_hab.py +114 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_threshold_listifier.py +74 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_two_uniques_hab.py +158 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_two_uniques_not_hab.py +105 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_validation/__init__.py +5 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_validation/_delete_instr.py +107 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_validation/_make_instructions_validation.py +133 -0
- pybear/preprocessing/_MinCountTransformer/_make_instructions/_validation/_total_counts_by_column.py +121 -0
- pybear/preprocessing/_MinCountTransformer/_partial_fit/__init__.py +5 -0
- pybear/preprocessing/_MinCountTransformer/_partial_fit/_columns_getter.py +96 -0
- pybear/preprocessing/_MinCountTransformer/_partial_fit/_get_dtypes_unqs_cts.py +100 -0
- pybear/preprocessing/_MinCountTransformer/_partial_fit/_original_dtypes_merger.py +105 -0
- pybear/preprocessing/_MinCountTransformer/_partial_fit/_parallel_dtypes_unqs_cts.py +161 -0
- pybear/preprocessing/_MinCountTransformer/_partial_fit/_tcbc_merger.py +155 -0
- pybear/preprocessing/_MinCountTransformer/_print_instructions/__init__.py +5 -0
- pybear/preprocessing/_MinCountTransformer/_print_instructions/_repr_instructions.py +377 -0
- pybear/preprocessing/_MinCountTransformer/_transform/__init__.py +5 -0
- pybear/preprocessing/_MinCountTransformer/_transform/_ic_hab_condition.py +384 -0
- pybear/preprocessing/_MinCountTransformer/_transform/_make_row_and_column_masks.py +161 -0
- pybear/preprocessing/_MinCountTransformer/_transform/_parallelized_row_masks.py +196 -0
- pybear/preprocessing/_MinCountTransformer/_transform/_tcbc_update.py +188 -0
- pybear/preprocessing/_MinCountTransformer/_type_aliases.py +82 -0
- pybear/preprocessing/_MinCountTransformer/_validation/__init__.py +5 -0
- pybear/preprocessing/_MinCountTransformer/_validation/_count_threshold.py +178 -0
- pybear/preprocessing/_MinCountTransformer/_validation/_feature_names_in.py +81 -0
- pybear/preprocessing/_MinCountTransformer/_validation/_ign_cols_hab_callable.py +208 -0
- pybear/preprocessing/_MinCountTransformer/_validation/_ignore_columns_handle_as_bool.py +276 -0
- pybear/preprocessing/_MinCountTransformer/_validation/_original_dtypes.py +76 -0
- pybear/preprocessing/_MinCountTransformer/_validation/_validation.py +158 -0
- pybear/preprocessing/_MinCountTransformer/_validation/_y.py +62 -0
- pybear/preprocessing/_NanStandardizer/NanStandardizer.py +287 -0
- pybear/preprocessing/_NanStandardizer/__init__.py +5 -0
- pybear/preprocessing/_NanStandardizer/_transform/__init__.py +5 -0
- pybear/preprocessing/_NanStandardizer/_transform/_transform.py +83 -0
- pybear/preprocessing/_NanStandardizer/_type_aliases.py +44 -0
- pybear/preprocessing/_NanStandardizer/_validation/_X.py +66 -0
- pybear/preprocessing/_NanStandardizer/_validation/__init__.py +5 -0
- pybear/preprocessing/_SlimPolyFeatures/SlimPolyFeatures.py +1580 -0
- pybear/preprocessing/_SlimPolyFeatures/__init__.py +5 -0
- pybear/preprocessing/_SlimPolyFeatures/_attributes/__init__.py +5 -0
- pybear/preprocessing/_SlimPolyFeatures/_attributes/_build_dropped_poly_duplicates.py +106 -0
- pybear/preprocessing/_SlimPolyFeatures/_attributes/_build_kept_poly_duplicates.py +107 -0
- pybear/preprocessing/_SlimPolyFeatures/_get_feature_names_out/__init__.py +5 -0
- pybear/preprocessing/_SlimPolyFeatures/_get_feature_names_out/_gfno_poly.py +181 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/__init__.py +5 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_columns_getter.py +168 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_combination_builder.py +112 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_deconstant_poly_dupls.py +101 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_get_dupls_for_combo_in_X_and_poly.py +255 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_is_constant.py +148 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_lock_in_random_combos.py +147 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_merge_constants.py +146 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_merge_partialfit_dupls.py +162 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_num_combinations.py +95 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_parallel_chunk_comparer.py +136 -0
- pybear/preprocessing/_SlimPolyFeatures/_partial_fit/_parallel_column_comparer.py +122 -0
- pybear/preprocessing/_SlimPolyFeatures/_shared/__init__.py +5 -0
- pybear/preprocessing/_SlimPolyFeatures/_shared/_check_X_constants_dupls.py +80 -0
- pybear/preprocessing/_SlimPolyFeatures/_shared/_get_active_combos.py +103 -0
- pybear/preprocessing/_SlimPolyFeatures/_shared/_identify_combos_to_keep.py +178 -0
- pybear/preprocessing/_SlimPolyFeatures/_transform/__init__.py +5 -0
- pybear/preprocessing/_SlimPolyFeatures/_transform/_build_poly.py +96 -0
- pybear/preprocessing/_SlimPolyFeatures/_type_aliases.py +61 -0
- pybear/preprocessing/_SlimPolyFeatures/_validation/_X_supplemental.py +66 -0
- pybear/preprocessing/_SlimPolyFeatures/_validation/__init__.py +5 -0
- pybear/preprocessing/_SlimPolyFeatures/_validation/_degree__min_degree.py +66 -0
- pybear/preprocessing/_SlimPolyFeatures/_validation/_feature_name_combiner.py +86 -0
- pybear/preprocessing/_SlimPolyFeatures/_validation/_keep.py +55 -0
- pybear/preprocessing/_SlimPolyFeatures/_validation/_validation.py +142 -0
- pybear/preprocessing/__init__.py +26 -0
- pybear/preprocessing/__shared/__init__.py +5 -0
- pybear/preprocessing/__shared/_type_aliases.py +43 -0
- pybear/preprocessing/__shared/_validation/_X.py +63 -0
- pybear/preprocessing/__shared/_validation/__init__.py +5 -0
- pybear/preprocessing/__shared/_validation/_any_bool.py +60 -0
- pybear/preprocessing/__shared/_validation/_any_integer.py +181 -0
- pybear/preprocessing/__shared/_validation/_atol.py +53 -0
- pybear/preprocessing/__shared/_validation/_equal_nan.py +35 -0
- pybear/preprocessing/__shared/_validation/_n_jobs.py +55 -0
- pybear/preprocessing/__shared/_validation/_rtol.py +53 -0
- pybear/utilities/__init__.py +70 -0
- pybear/utilities/__type_aliases.py +45 -0
- pybear/utilities/_array_sparsity.py +158 -0
- pybear/utilities/_benchmarking.py +317 -0
- pybear/utilities/_check_pipeline.py +102 -0
- pybear/utilities/_feature_name_mapper.py +265 -0
- pybear/utilities/_get_methods_out_of_class.py +53 -0
- pybear/utilities/_get_module_name.py +62 -0
- pybear/utilities/_inf_masking.py +298 -0
- pybear/utilities/_logger.py +56 -0
- pybear/utilities/_nan_masking.py +513 -0
- pybear/utilities/_permuter.py +106 -0
- pybear/utilities/_print_inspect_stack.py +56 -0
- pybear/utilities/_remove_characters.py +167 -0
- pybear/utilities/_serial_index_mapper.py +149 -0
- pybear/utilities/_union_find.py +91 -0
- pybear-0.2.0.dist-info/LICENSE +28 -0
- pybear-0.2.0.dist-info/METADATA +367 -0
- pybear-0.2.0.dist-info/RECORD +518 -0
- pybear-0.2.0.dist-info/WHEEL +4 -0
pybear/__init__.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Author:
|
|
2
|
+
# Bill Sousa
|
|
3
|
+
#
|
|
4
|
+
# License: BSD 3 clause
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from ._version import __version__
|
|
10
|
+
from ._version import __version_tuple__
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"base",
|
|
14
|
+
"feature_extraction",
|
|
15
|
+
"model_selection",
|
|
16
|
+
"new_numpy",
|
|
17
|
+
"preprocessing",
|
|
18
|
+
"utilities",
|
|
19
|
+
"__version__"
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
pybear/_version.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Author:
|
|
2
|
+
# Bill Sousa
|
|
3
|
+
#
|
|
4
|
+
# License: BSD 3 clause
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing_extensions import Union
|
|
10
|
+
import numpy as np
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
from importlib.metadata import version as get_version
|
|
15
|
+
except ImportError:
|
|
16
|
+
# For older Python versions, use importlib-metadata package
|
|
17
|
+
from importlib_metadata import version as get_version
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
version: str
|
|
21
|
+
__version__: str
|
|
22
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
23
|
+
version_tuple: VERSION_TUPLE
|
|
24
|
+
__version_tuple__: VERSION_TUPLE
|
|
25
|
+
|
|
26
|
+
__version__ = version = get_version('pybear')
|
|
27
|
+
dot_idxs = np.arange(len(__version__))[np.array(list(__version__)) == '.']
|
|
28
|
+
dot_idxs = list(map(int, dot_idxs))
|
|
29
|
+
__version_tuple__ = version_tuple = (
|
|
30
|
+
int(__version__[:dot_idxs[0]]),
|
|
31
|
+
int(__version__[dot_idxs[0]+1:dot_idxs[1]]),
|
|
32
|
+
int(__version__[dot_idxs[1]+1:])
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# Author:
|
|
2
|
+
# Bill Sousa
|
|
3
|
+
#
|
|
4
|
+
# License: BSD 3 clause
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from typing import Optional
|
|
10
|
+
from typing_extensions import Union
|
|
11
|
+
|
|
12
|
+
import numbers
|
|
13
|
+
|
|
14
|
+
from ._validate_user_input import validate_user_str_cs
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DictMenuPrint:
|
|
19
|
+
"""Manage the display and operation of an interactive user menu.
|
|
20
|
+
|
|
21
|
+
Display the allowed sub-menu options from a full menu to the screen.
|
|
22
|
+
|
|
23
|
+
The :meth:`choose` method displays the allowed menu options and
|
|
24
|
+
offers a validated prompt to select one of the options.
|
|
25
|
+
|
|
26
|
+
Parameters
|
|
27
|
+
----------
|
|
28
|
+
MENU_DICT : dict[str, str]
|
|
29
|
+
Required. A Dictionary of unit-length alpha characters as keys
|
|
30
|
+
and the descriptions of their associated actions as values. Keys
|
|
31
|
+
are case-sensitive.
|
|
32
|
+
disp_width : Optional[numbers.Integral], default=80
|
|
33
|
+
The maximum number of characters to display per line.
|
|
34
|
+
fixed_col_width : Optional[Union[numbers.Integral, None]], default=None
|
|
35
|
+
Set a fixed width for each column of menu items in the display.
|
|
36
|
+
DMP will determine a number of columns that causes the overall
|
|
37
|
+
width of the display to be less than or equal to `disp_width`.
|
|
38
|
+
allowed : Optional[Union[str, None]], default=None
|
|
39
|
+
Can only enter this if `disallowed` is not entered, cannot enter
|
|
40
|
+
both. The action keys that are allowed to be selected from the
|
|
41
|
+
full selection available in `MENU_DICT`. case-sensitive. Enter
|
|
42
|
+
as a contiguous sequence of characters.
|
|
43
|
+
disallowed : Optional[Union[str, None]], default=None
|
|
44
|
+
Can only enter this if `allowed` is not entered, cannot enter
|
|
45
|
+
both. The action keys that are not allowed to be selected from
|
|
46
|
+
`MENU_DICT`. `allowed` becomes the space of action keys that are
|
|
47
|
+
not disallowed. Case-sensitive. Enter as a contiguous sequence
|
|
48
|
+
of characters.
|
|
49
|
+
|
|
50
|
+
Attributes
|
|
51
|
+
----------
|
|
52
|
+
allowed : str
|
|
53
|
+
The positive space out of `MENU_DICT` that the user is allowed
|
|
54
|
+
to select from. This attribute is always the set of allowed
|
|
55
|
+
options determined at instantiation. The instance attribute IS
|
|
56
|
+
NOT overwritten by any `allowed` or `disallowed` passed to the
|
|
57
|
+
methods. The `allowed` passed to or determined by the methods
|
|
58
|
+
is used only temporarily in place of the permanent `allowed`
|
|
59
|
+
attribute. The menu associated with the stored `allowed`
|
|
60
|
+
attribute is always available as the default menu.
|
|
61
|
+
all_allowed_str : str
|
|
62
|
+
The full set of possible options taken from the keys of
|
|
63
|
+
`MENU_DICT`.
|
|
64
|
+
disp_width : numbers.Integral
|
|
65
|
+
The maximum character display width passed at instantiation or
|
|
66
|
+
the default if not passed.
|
|
67
|
+
fixed_col_width : numbers.Integral
|
|
68
|
+
The fixed column width within the full display width passed at
|
|
69
|
+
instantiation or the default if not passed.
|
|
70
|
+
MENU_DICT : dict[str, str]
|
|
71
|
+
The `MENU_DICT` passed at instantiation.
|
|
72
|
+
|
|
73
|
+
Examples
|
|
74
|
+
--------
|
|
75
|
+
>>> MENU_DICT = {
|
|
76
|
+
... 'a': 'Apply Option 1', 'b': 'Apply Option 2',
|
|
77
|
+
... 'c': 'Apply Option 3', 'd': 'Apply Option 4'
|
|
78
|
+
... }
|
|
79
|
+
>>> DMP = DictMenuPrint(
|
|
80
|
+
... MENU_DICT,
|
|
81
|
+
... disp_width = 80,
|
|
82
|
+
... fixed_col_width = None,
|
|
83
|
+
... allowed = 'abcd',
|
|
84
|
+
... disallowed = None
|
|
85
|
+
... )
|
|
86
|
+
>>> DMP.choose(allowed='ab', prompt='pick one') # doctest:+SKIP
|
|
87
|
+
a) Apply Option 1 b) Apply Option 2
|
|
88
|
+
pick one >
|
|
89
|
+
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def __init__(
|
|
94
|
+
self,
|
|
95
|
+
MENU_DICT:dict[str, str],
|
|
96
|
+
*,
|
|
97
|
+
disp_width:Optional[numbers.Integral] = 80,
|
|
98
|
+
fixed_col_width:Optional[Union[numbers.Integral, None]] = None,
|
|
99
|
+
allowed:Optional[Union[str, None]] = None,
|
|
100
|
+
disallowed:Optional[Union[str, None]] = None
|
|
101
|
+
) -> None:
|
|
102
|
+
"""Initialize the DictMenuPrint instance."""
|
|
103
|
+
|
|
104
|
+
# validation v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
|
|
105
|
+
|
|
106
|
+
# MENU_DICT -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
107
|
+
if not isinstance(MENU_DICT, dict):
|
|
108
|
+
raise TypeError(f"'MENU_DICT' must be a dictionary")
|
|
109
|
+
|
|
110
|
+
if len(MENU_DICT) == 0:
|
|
111
|
+
raise ValueError(f"'MENU_DICT' cannot be empty")
|
|
112
|
+
|
|
113
|
+
if not all(map(isinstance, MENU_DICT, (str for _ in MENU_DICT))):
|
|
114
|
+
raise TypeError(f"MENU_DICT keys must be str.")
|
|
115
|
+
|
|
116
|
+
if not all(map(
|
|
117
|
+
isinstance, MENU_DICT.values(), (str for _ in MENU_DICT)
|
|
118
|
+
)):
|
|
119
|
+
raise TypeError(f"MENU_DICT values must be str.")
|
|
120
|
+
|
|
121
|
+
if max(map(len, MENU_DICT.keys())) != 1:
|
|
122
|
+
raise ValueError(f"Illegal key in MENU_DICT, len must be 1.")
|
|
123
|
+
|
|
124
|
+
self.MENU_DICT = MENU_DICT
|
|
125
|
+
# END MENU_DICT -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
126
|
+
|
|
127
|
+
# MENU_DICT cant have duplicate keys, its a dictionary
|
|
128
|
+
self.all_allowed_str = ''.join(MENU_DICT.keys())
|
|
129
|
+
|
|
130
|
+
# disp_width -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
131
|
+
if not isinstance(disp_width, numbers.Integral):
|
|
132
|
+
raise TypeError(f"'disp_width' must be a non-boolean integer")
|
|
133
|
+
if isinstance(disp_width, bool):
|
|
134
|
+
raise TypeError(f"'disp_width' must be a non-boolean integer")
|
|
135
|
+
if disp_width < 10:
|
|
136
|
+
raise ValueError(f"'disp_width' must be >=10")
|
|
137
|
+
|
|
138
|
+
self.disp_width = disp_width
|
|
139
|
+
# END disp_width -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
140
|
+
|
|
141
|
+
# fixed_column_width -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
142
|
+
if not isinstance(fixed_col_width, (numbers.Integral, type(None))):
|
|
143
|
+
raise TypeError(f"'fixed_col_width' must be an integer or None")
|
|
144
|
+
if isinstance(fixed_col_width, bool):
|
|
145
|
+
raise TypeError(f"'fixed_col_width' must be a non-boolean integer")
|
|
146
|
+
if fixed_col_width is not None and fixed_col_width < 10:
|
|
147
|
+
raise ValueError(f"'disp_width' must be >=10")
|
|
148
|
+
if fixed_col_width and fixed_col_width > disp_width:
|
|
149
|
+
raise ValueError(f"'fixed_col_width' must be <= 'disp_width'")
|
|
150
|
+
|
|
151
|
+
self.fixed_col_width = fixed_col_width
|
|
152
|
+
# END fixed_column_width -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
153
|
+
|
|
154
|
+
self.allowed = self._val_allowed_disallowed_and_get_allowed(
|
|
155
|
+
allowed,
|
|
156
|
+
disallowed
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
# END allowed / disallowed -- -- -- -- -- -- -- -- -- -- -- --
|
|
160
|
+
|
|
161
|
+
# END validation v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def _val_allowed_disallowed_and_get_allowed(
|
|
165
|
+
self,
|
|
166
|
+
_allowed:Optional[Union[str, None]] = None,
|
|
167
|
+
_disallowed:Optional[Union[str, None]] = None
|
|
168
|
+
) -> str:
|
|
169
|
+
"""Validate `allowed` & `disallowed`, determine allowed, and
|
|
170
|
+
return it.
|
|
171
|
+
|
|
172
|
+
Parameters
|
|
173
|
+
----------
|
|
174
|
+
_allowed : Optional[Union[str, None]], default = None
|
|
175
|
+
Options in the full menu that the user is allowed to choose.
|
|
176
|
+
_disallowed : Optional[Union[str, None]], default = None
|
|
177
|
+
Options in the full menu that the user is not allowed to
|
|
178
|
+
choose.
|
|
179
|
+
|
|
180
|
+
Returns
|
|
181
|
+
-------
|
|
182
|
+
__ : str
|
|
183
|
+
The allowed subset from `all_allowed_str`, arrived at by
|
|
184
|
+
applying the characters in `allowed` and `disallowed` against
|
|
185
|
+
the characters in `all_allowed_str`.
|
|
186
|
+
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
# allowed / disallowed -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
|
190
|
+
|
|
191
|
+
if not isinstance(_allowed, (str, type(None))):
|
|
192
|
+
raise TypeError(f"'allowed' must be a str or None")
|
|
193
|
+
|
|
194
|
+
if not isinstance(_disallowed, (str, type(None))):
|
|
195
|
+
raise TypeError(f"'disallowed' must be a str or None")
|
|
196
|
+
|
|
197
|
+
_allowed = None if _allowed == '' else _allowed
|
|
198
|
+
_disallowed = None if _disallowed == '' else _disallowed
|
|
199
|
+
|
|
200
|
+
if _allowed is not None and _disallowed is not None:
|
|
201
|
+
raise ValueError(
|
|
202
|
+
f"cannot enter both 'allowed' and 'disallowed', must be "
|
|
203
|
+
f"one or the other or neither."
|
|
204
|
+
)
|
|
205
|
+
elif _allowed is None and _disallowed is None:
|
|
206
|
+
_allowed = self.all_allowed_str
|
|
207
|
+
|
|
208
|
+
elif _allowed is not None: # _disallowed is None
|
|
209
|
+
|
|
210
|
+
# CLEAR OUT ANY DUPLICATES THAT MAY BE IN ALLOWED
|
|
211
|
+
_allowed = ''.join(list(set(_allowed)))
|
|
212
|
+
|
|
213
|
+
if not all(map(lambda x: x in self.all_allowed_str, _allowed)):
|
|
214
|
+
raise ValueError(
|
|
215
|
+
f"Invalid key in 'allowed' ({_allowed}), must be in "
|
|
216
|
+
f"{self.all_allowed_str}."
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
elif _disallowed is not None: # _allowed is None
|
|
220
|
+
|
|
221
|
+
# CLEAR OUT ANY DUPLICATES THAT MAY BE IN disallowed
|
|
222
|
+
_disallowed = ''.join(list(set(_disallowed)))
|
|
223
|
+
|
|
224
|
+
if not all(map(lambda x: x in self.all_allowed_str, _disallowed)):
|
|
225
|
+
raise ValueError(
|
|
226
|
+
f"Invalid key in 'disallowed' ({_disallowed}), must "
|
|
227
|
+
f"be in {self.all_allowed_str}."
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
_allowed = ''.join(set(self.all_allowed_str) - set(_disallowed))
|
|
231
|
+
|
|
232
|
+
if len(_allowed) == 0:
|
|
233
|
+
raise ValueError(
|
|
234
|
+
f"the given values for 'allowed' or 'disallowed' have left "
|
|
235
|
+
f"no allowed menu choices."
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
return _allowed
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
def _generate_subdict_and_print(self, _allowed: str):
|
|
242
|
+
"""Print the allowed menu options to screen.
|
|
243
|
+
|
|
244
|
+
Parameters
|
|
245
|
+
----------
|
|
246
|
+
allowed : str
|
|
247
|
+
The subset of the fullset of menu options that are to be
|
|
248
|
+
printed to screen.
|
|
249
|
+
|
|
250
|
+
Returns
|
|
251
|
+
-------
|
|
252
|
+
None
|
|
253
|
+
|
|
254
|
+
"""
|
|
255
|
+
|
|
256
|
+
SUB_DICT = {
|
|
257
|
+
k: v for k, v in self.MENU_DICT.items() if k in _allowed
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if self.fixed_col_width is not None:
|
|
261
|
+
num_cols = self.disp_width // int(self.fixed_col_width)
|
|
262
|
+
ljust = int(self.fixed_col_width)
|
|
263
|
+
else: # fixed_col_width is None
|
|
264
|
+
# +3 FOR '(' + <the menu option> + ')' +2 FOR BUFFER
|
|
265
|
+
_max_desc_len = max(map(len, SUB_DICT.values())) + 3 + 2
|
|
266
|
+
num_cols = max(1, self.disp_width // _max_desc_len)
|
|
267
|
+
ljust = self.disp_width // num_cols
|
|
268
|
+
del _max_desc_len
|
|
269
|
+
|
|
270
|
+
# attrs are MENU_DICT, SUB_DICT, all_allowed_str, fixed_column_width,
|
|
271
|
+
# allowed, num_cols, ljust
|
|
272
|
+
|
|
273
|
+
for itr, (k, v) in enumerate(SUB_DICT.items()):
|
|
274
|
+
print_line = f'{v[:ljust-5]}({k})'.ljust(ljust)
|
|
275
|
+
if itr % num_cols < num_cols - 1:
|
|
276
|
+
print(print_line, end='')
|
|
277
|
+
else:
|
|
278
|
+
print(print_line)
|
|
279
|
+
|
|
280
|
+
del print_line
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
def choose(
|
|
284
|
+
self,
|
|
285
|
+
prompt:str,
|
|
286
|
+
*,
|
|
287
|
+
allowed:Optional[Union[str, None]] = None,
|
|
288
|
+
disallowed:Optional[Union[str, None]] = None
|
|
289
|
+
) -> str:
|
|
290
|
+
"""Displays the allowed menu options to the screen.
|
|
291
|
+
|
|
292
|
+
Prompts the user for a case-sensitive selection. Returns the
|
|
293
|
+
single-character action command selected by the user. The default
|
|
294
|
+
menu associated with the `allowed` action keys that were passed
|
|
295
|
+
at instantiation is available by passing no kwargs, or pass
|
|
296
|
+
custom `allowed` or `disallowed` to generate a different menu
|
|
297
|
+
for the one time. The custom `allowed` or `disallowed` that are
|
|
298
|
+
passed here DO NOT overwrite the `allowed` attribute of the
|
|
299
|
+
instance, that will always be available as the default menu.
|
|
300
|
+
|
|
301
|
+
Parameters
|
|
302
|
+
----------
|
|
303
|
+
allowed : Optional[Union[str, None]], default=None
|
|
304
|
+
Can only enter this if `disallowed` is not entered,
|
|
305
|
+
cannot enter both. The action keys that are allowed to be
|
|
306
|
+
selected from the full section available in `MENU_DICT`.
|
|
307
|
+
Case-sensitive. Enter as a contiguous sequence of characters.
|
|
308
|
+
disallowed : Optional[Union[str, None]], default=None
|
|
309
|
+
Can only enter this if `allowed` is not entered, cannot
|
|
310
|
+
enter both. The action keys that are not allowed to be
|
|
311
|
+
selected from `MENU_DICT`. `allowed` becomes the space of
|
|
312
|
+
action keys that are not disallowed. Case-sensitive. Enter
|
|
313
|
+
as a contiguous sequence of characters.
|
|
314
|
+
|
|
315
|
+
Returns
|
|
316
|
+
-------
|
|
317
|
+
char : str
|
|
318
|
+
The value of the menu item selected by the user.
|
|
319
|
+
|
|
320
|
+
"""
|
|
321
|
+
|
|
322
|
+
if not isinstance(prompt, str):
|
|
323
|
+
raise TypeError(f"'prompt' must be a string")
|
|
324
|
+
|
|
325
|
+
if allowed is None and disallowed is None:
|
|
326
|
+
_allowed = self.allowed
|
|
327
|
+
else:
|
|
328
|
+
_allowed = \
|
|
329
|
+
self._val_allowed_disallowed_and_get_allowed(
|
|
330
|
+
allowed,
|
|
331
|
+
disallowed
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
self._generate_subdict_and_print(_allowed)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
return validate_user_str_cs(f'\n{prompt} > ', _allowed)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
pybear/base/__init__.py
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Author:
|
|
2
|
+
# Bill Sousa
|
|
3
|
+
#
|
|
4
|
+
# License: BSD 3 clause
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from ._cast_to_ndarray import cast_to_ndarray
|
|
10
|
+
from ._check_1D_num_sequence import check_1D_num_sequence
|
|
11
|
+
from ._check_1D_str_sequence import check_1D_str_sequence
|
|
12
|
+
from ._check_2D_num_array import check_2D_num_array
|
|
13
|
+
from ._check_2D_str_array import check_2D_str_array
|
|
14
|
+
from ._check_dtype import check_dtype
|
|
15
|
+
from ._check_feature_names import check_feature_names
|
|
16
|
+
from ._check_n_features import check_n_features
|
|
17
|
+
from ._check_is_finite import check_is_finite
|
|
18
|
+
from ._check_is_fitted import check_is_fitted
|
|
19
|
+
from ._check_scipy_sparse import check_scipy_sparse
|
|
20
|
+
from ._check_shape import check_shape
|
|
21
|
+
from ._copy_X import copy_X
|
|
22
|
+
from ._DictMenuPrint import DictMenuPrint
|
|
23
|
+
from ._ensure_2D import ensure_2D
|
|
24
|
+
from ._get_feature_names import get_feature_names
|
|
25
|
+
from ._get_feature_names_out import get_feature_names_out
|
|
26
|
+
from ._is_fitted import is_fitted
|
|
27
|
+
from ._num_features import num_features
|
|
28
|
+
from ._num_samples import num_samples
|
|
29
|
+
from ._set_order import set_order
|
|
30
|
+
from ._validate_data import validate_data
|
|
31
|
+
from ._validate_user_input import (
|
|
32
|
+
validate_user_str,
|
|
33
|
+
validate_user_str_cs,
|
|
34
|
+
validate_user_mstr,
|
|
35
|
+
validate_user_int,
|
|
36
|
+
validate_user_float,
|
|
37
|
+
user_entry,
|
|
38
|
+
ValidateUserDate
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
from .mixins._FeatureMixin import FeatureMixin
|
|
43
|
+
from .mixins._FileDumpMixin import FileDumpMixin
|
|
44
|
+
from .mixins._FitTransformMixin import FitTransformMixin
|
|
45
|
+
from .mixins._GetParamsMixin import GetParamsMixin
|
|
46
|
+
from .mixins._ReprMixin import ReprMixin
|
|
47
|
+
from .mixins._SetOutputMixin import SetOutputMixin
|
|
48
|
+
from .mixins._SetParamsMixin import SetParamsMixin
|
|
49
|
+
|
|
50
|
+
from .exceptions._exceptions import NotFittedError
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
__all__ = [
|
|
55
|
+
'cast_to_ndarray',
|
|
56
|
+
'check_1D_num_sequence',
|
|
57
|
+
'check_1D_str_sequence',
|
|
58
|
+
'check_2D_num_array',
|
|
59
|
+
'check_2D_str_array',
|
|
60
|
+
'check_dtype',
|
|
61
|
+
'check_feature_names',
|
|
62
|
+
'check_n_features',
|
|
63
|
+
'check_is_finite',
|
|
64
|
+
'check_is_fitted',
|
|
65
|
+
'check_scipy_sparse',
|
|
66
|
+
'check_shape',
|
|
67
|
+
'copy_X',
|
|
68
|
+
'DictMenuPrint',
|
|
69
|
+
'ensure_2D',
|
|
70
|
+
'get_feature_names',
|
|
71
|
+
'get_feature_names_out',
|
|
72
|
+
'is_fitted',
|
|
73
|
+
'num_features',
|
|
74
|
+
'num_samples',
|
|
75
|
+
'set_order',
|
|
76
|
+
'user_entry',
|
|
77
|
+
'validate_data',
|
|
78
|
+
'validate_user_float',
|
|
79
|
+
'validate_user_int',
|
|
80
|
+
'validate_user_mstr',
|
|
81
|
+
'validate_user_str',
|
|
82
|
+
'validate_user_str_cs',
|
|
83
|
+
'ValidateUserDate',
|
|
84
|
+
'FeatureMixin',
|
|
85
|
+
'FileDumpMixin',
|
|
86
|
+
'FitTransformMixin',
|
|
87
|
+
'GetParamsMixin',
|
|
88
|
+
'ReprMixin',
|
|
89
|
+
'SetOutputMixin',
|
|
90
|
+
'SetParamsMixin',
|
|
91
|
+
'NotFittedError'
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Author:
|
|
2
|
+
# Bill Sousa
|
|
3
|
+
#
|
|
4
|
+
# License: BSD 3 clause
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
from typing_extensions import (
|
|
10
|
+
TypeAlias,
|
|
11
|
+
Union
|
|
12
|
+
)
|
|
13
|
+
import numpy.typing as npt
|
|
14
|
+
|
|
15
|
+
import pandas as pd
|
|
16
|
+
import polars as pl
|
|
17
|
+
import scipy.sparse as ss
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Python1DTypes: TypeAlias = Union[list, tuple, set]
|
|
22
|
+
Python2DTypes: TypeAlias = Union[list[list], tuple[tuple]]
|
|
23
|
+
PythonTypes: TypeAlias = Union[list, tuple, set, list[list], tuple[tuple]]
|
|
24
|
+
|
|
25
|
+
Numpy1DTypes: TypeAlias = npt.NDArray
|
|
26
|
+
Numpy2DTypes: TypeAlias = npt.NDArray
|
|
27
|
+
NumpyTypes: TypeAlias = npt.NDArray
|
|
28
|
+
|
|
29
|
+
Pandas1DTypes: TypeAlias = pd.core.series.Series
|
|
30
|
+
Pandas2DTypes: TypeAlias = pd.core.frame.DataFrame
|
|
31
|
+
PandasTypes: TypeAlias = Union[pd.core.series.Series, pd.core.frame.DataFrame]
|
|
32
|
+
|
|
33
|
+
Polars1DTypes: TypeAlias = pl.series.Series
|
|
34
|
+
Polars2DTypes: TypeAlias = pl.dataframe.DataFrame
|
|
35
|
+
PolarsTypes: TypeAlias = Union[pl.series.Series, pl.dataframe.DataFrame]
|
|
36
|
+
|
|
37
|
+
ScipySparseTypes: TypeAlias = Union[
|
|
38
|
+
ss.csc_matrix, ss.csc_array, ss.csr_matrix, ss.csr_array,
|
|
39
|
+
ss.coo_matrix, ss.coo_array, ss.dia_matrix, ss.dia_array,
|
|
40
|
+
ss.lil_matrix, ss.lil_array, ss.dok_matrix, ss.dok_array,
|
|
41
|
+
ss.bsr_matrix, ss.bsr_array
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|