From 72ffde06ade57a0008e7c4c2d75836999610b994 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 10 May 2023 06:57:44 +0000 Subject: automatic import of python-pandas-ml --- .gitignore | 1 + python-pandas-ml.spec | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 256 insertions(+) create mode 100644 python-pandas-ml.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..ec14067 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pandas_ml-0.6.1.tar.gz diff --git a/python-pandas-ml.spec b/python-pandas-ml.spec new file mode 100644 index 0000000..84d699a --- /dev/null +++ b/python-pandas-ml.spec @@ -0,0 +1,254 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pandas-ml +Version: 0.6.1 +Release: 1 +Summary: pandas, scikit-learn and xgboost integration +License: BSD +URL: http://pandas-ml.readthedocs.org/en/stable +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ac/69/f63b234546e39558e8121980daaf7389e52554a608da50005f52dc14f53f/pandas_ml-0.6.1.tar.gz +BuildArch: noarch + +Requires: python3-pandas +Requires: python3-enum34 + +%description +Overview +~~~~~~~~ +`pandas `_, `scikit-learn `_ +and `xgboost `_ integration. +Installation +~~~~~~~~~~~~ + $ pip install pandas_ml +Documentation +~~~~~~~~~~~~~ +http://pandas-ml.readthedocs.org/en/stable/ +Example +~~~~~~~ + >>> import pandas_ml as pdml + >>> import sklearn.datasets as datasets + # create ModelFrame instance from sklearn.datasets + >>> df = pdml.ModelFrame(datasets.load_digits()) + >>> type(df) + + # binarize data (features), not touching target + >>> df.data = df.data.preprocessing.binarize() + >>> df.head() + .target 0 1 2 3 4 5 6 7 8 ... 54 55 56 57 58 59 60 61 62 63 + 0 0 0 0 1 1 1 1 0 0 0 ... 0 0 0 0 1 1 1 0 0 0 + 1 1 0 0 0 1 1 1 0 0 0 ... 0 0 0 0 0 1 1 1 0 0 + 2 2 0 0 0 1 1 1 0 0 0 ... 1 0 0 0 0 1 1 1 1 0 + 3 3 0 0 1 1 1 1 0 0 0 ... 1 0 0 0 1 1 1 1 0 0 + 4 4 0 0 0 1 1 0 0 0 0 ... 0 0 0 0 0 1 1 1 0 0 + [5 rows x 65 columns] + # split to training and test data + >>> train_df, test_df = df.model_selection.train_test_split() + # create estimator (accessor is mapped to sklearn namespace) + >>> estimator = df.svm.LinearSVC() + # fit to training data + >>> train_df.fit(estimator) + # predict test data + >>> test_df.predict(estimator) + 0 4 + 1 2 + 2 7 + 448 5 + 449 8 + Length: 450, dtype: int64 + # Evaluate the result + >>> test_df.metrics.confusion_matrix() + Predicted 0 1 2 3 4 5 6 7 8 9 + Target + 0 52 0 0 0 0 0 0 0 0 0 + 1 0 37 1 0 0 1 0 0 3 3 + 2 0 2 48 1 0 0 0 1 1 0 + 3 1 1 0 44 0 1 0 0 3 1 + 4 1 0 0 0 43 0 1 0 0 0 + 5 0 1 0 0 0 39 0 0 0 0 + 6 0 1 0 0 1 0 35 0 0 0 + 7 0 0 0 0 2 0 0 42 1 0 + 8 0 2 1 0 1 0 0 0 33 1 + 9 0 2 1 2 0 0 0 0 1 38 +Supported Packages +~~~~~~~~~~~~~~~~~~ +- ``scikit-learn`` +- ``patsy`` +- ``xgboost`` + +%package -n python3-pandas-ml +Summary: pandas, scikit-learn and xgboost integration +Provides: python-pandas-ml +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pandas-ml +Overview +~~~~~~~~ +`pandas `_, `scikit-learn `_ +and `xgboost `_ integration. +Installation +~~~~~~~~~~~~ + $ pip install pandas_ml +Documentation +~~~~~~~~~~~~~ +http://pandas-ml.readthedocs.org/en/stable/ +Example +~~~~~~~ + >>> import pandas_ml as pdml + >>> import sklearn.datasets as datasets + # create ModelFrame instance from sklearn.datasets + >>> df = pdml.ModelFrame(datasets.load_digits()) + >>> type(df) + + # binarize data (features), not touching target + >>> df.data = df.data.preprocessing.binarize() + >>> df.head() + .target 0 1 2 3 4 5 6 7 8 ... 54 55 56 57 58 59 60 61 62 63 + 0 0 0 0 1 1 1 1 0 0 0 ... 0 0 0 0 1 1 1 0 0 0 + 1 1 0 0 0 1 1 1 0 0 0 ... 0 0 0 0 0 1 1 1 0 0 + 2 2 0 0 0 1 1 1 0 0 0 ... 1 0 0 0 0 1 1 1 1 0 + 3 3 0 0 1 1 1 1 0 0 0 ... 1 0 0 0 1 1 1 1 0 0 + 4 4 0 0 0 1 1 0 0 0 0 ... 0 0 0 0 0 1 1 1 0 0 + [5 rows x 65 columns] + # split to training and test data + >>> train_df, test_df = df.model_selection.train_test_split() + # create estimator (accessor is mapped to sklearn namespace) + >>> estimator = df.svm.LinearSVC() + # fit to training data + >>> train_df.fit(estimator) + # predict test data + >>> test_df.predict(estimator) + 0 4 + 1 2 + 2 7 + 448 5 + 449 8 + Length: 450, dtype: int64 + # Evaluate the result + >>> test_df.metrics.confusion_matrix() + Predicted 0 1 2 3 4 5 6 7 8 9 + Target + 0 52 0 0 0 0 0 0 0 0 0 + 1 0 37 1 0 0 1 0 0 3 3 + 2 0 2 48 1 0 0 0 1 1 0 + 3 1 1 0 44 0 1 0 0 3 1 + 4 1 0 0 0 43 0 1 0 0 0 + 5 0 1 0 0 0 39 0 0 0 0 + 6 0 1 0 0 1 0 35 0 0 0 + 7 0 0 0 0 2 0 0 42 1 0 + 8 0 2 1 0 1 0 0 0 33 1 + 9 0 2 1 2 0 0 0 0 1 38 +Supported Packages +~~~~~~~~~~~~~~~~~~ +- ``scikit-learn`` +- ``patsy`` +- ``xgboost`` + +%package help +Summary: Development documents and examples for pandas-ml +Provides: python3-pandas-ml-doc +%description help +Overview +~~~~~~~~ +`pandas `_, `scikit-learn `_ +and `xgboost `_ integration. +Installation +~~~~~~~~~~~~ + $ pip install pandas_ml +Documentation +~~~~~~~~~~~~~ +http://pandas-ml.readthedocs.org/en/stable/ +Example +~~~~~~~ + >>> import pandas_ml as pdml + >>> import sklearn.datasets as datasets + # create ModelFrame instance from sklearn.datasets + >>> df = pdml.ModelFrame(datasets.load_digits()) + >>> type(df) + + # binarize data (features), not touching target + >>> df.data = df.data.preprocessing.binarize() + >>> df.head() + .target 0 1 2 3 4 5 6 7 8 ... 54 55 56 57 58 59 60 61 62 63 + 0 0 0 0 1 1 1 1 0 0 0 ... 0 0 0 0 1 1 1 0 0 0 + 1 1 0 0 0 1 1 1 0 0 0 ... 0 0 0 0 0 1 1 1 0 0 + 2 2 0 0 0 1 1 1 0 0 0 ... 1 0 0 0 0 1 1 1 1 0 + 3 3 0 0 1 1 1 1 0 0 0 ... 1 0 0 0 1 1 1 1 0 0 + 4 4 0 0 0 1 1 0 0 0 0 ... 0 0 0 0 0 1 1 1 0 0 + [5 rows x 65 columns] + # split to training and test data + >>> train_df, test_df = df.model_selection.train_test_split() + # create estimator (accessor is mapped to sklearn namespace) + >>> estimator = df.svm.LinearSVC() + # fit to training data + >>> train_df.fit(estimator) + # predict test data + >>> test_df.predict(estimator) + 0 4 + 1 2 + 2 7 + 448 5 + 449 8 + Length: 450, dtype: int64 + # Evaluate the result + >>> test_df.metrics.confusion_matrix() + Predicted 0 1 2 3 4 5 6 7 8 9 + Target + 0 52 0 0 0 0 0 0 0 0 0 + 1 0 37 1 0 0 1 0 0 3 3 + 2 0 2 48 1 0 0 0 1 1 0 + 3 1 1 0 44 0 1 0 0 3 1 + 4 1 0 0 0 43 0 1 0 0 0 + 5 0 1 0 0 0 39 0 0 0 0 + 6 0 1 0 0 1 0 35 0 0 0 + 7 0 0 0 0 2 0 0 42 1 0 + 8 0 2 1 0 1 0 0 0 33 1 + 9 0 2 1 2 0 0 0 0 1 38 +Supported Packages +~~~~~~~~~~~~~~~~~~ +- ``scikit-learn`` +- ``patsy`` +- ``xgboost`` + +%prep +%autosetup -n pandas-ml-0.6.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-pandas-ml -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot - 0.6.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..1cf644e --- /dev/null +++ b/sources @@ -0,0 +1 @@ +02bd005d22954f682388621ea131b475 pandas_ml-0.6.1.tar.gz -- cgit v1.2.3