distclassipy 0.0.8__py3-none-any.whl → 0.0.9__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.
- distclassipy/classifier.py +2 -3
- {distclassipy-0.0.8.dist-info → distclassipy-0.0.9.dist-info}/METADATA +3 -3
- distclassipy-0.0.9.dist-info/RECORD +8 -0
- {distclassipy-0.0.8.dist-info → distclassipy-0.0.9.dist-info}/WHEEL +1 -1
- distclassipy-0.0.8.dist-info/RECORD +0 -8
- {distclassipy-0.0.8.dist-info → distclassipy-0.0.9.dist-info}/LICENSE +0 -0
- {distclassipy-0.0.8.dist-info → distclassipy-0.0.9.dist-info}/top_level.txt +0 -0
distclassipy/classifier.py
CHANGED
|
@@ -51,7 +51,6 @@ class DistanceMetricClassifier(BaseEstimator, ClassifierMixin):
|
|
|
51
51
|
self.calculate_kde = calculate_kde
|
|
52
52
|
self.calculate_1d_dist = calculate_1d_dist
|
|
53
53
|
self.n_jobs = n_jobs
|
|
54
|
-
self.distance_calculator = Distance()
|
|
55
54
|
|
|
56
55
|
def fit(self, X: np.array, y: np.array, feat_labels: list[str] = None):
|
|
57
56
|
"""Fit the classifier to the data.
|
|
@@ -163,8 +162,8 @@ class DistanceMetricClassifier(BaseEstimator, ClassifierMixin):
|
|
|
163
162
|
if not callable(self.metric) or isinstance(self.metric, str):
|
|
164
163
|
if hasattr(distance, self.metric):
|
|
165
164
|
self.metric_fn_ = getattr(distance, self.metric)
|
|
166
|
-
elif hasattr(
|
|
167
|
-
self.metric_fn_ = getattr(
|
|
165
|
+
elif hasattr(Distance(), self.metric):
|
|
166
|
+
self.metric_fn_ = getattr(Distance(), self.metric)
|
|
168
167
|
else:
|
|
169
168
|
raise ValueError(
|
|
170
169
|
f"{self.metric} metric not found. Either pass a string of the name of a metric in scipy.spatial.distance or distances.Distance, or, pass a metric function directly."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: distclassipy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.9
|
|
4
4
|
Summary: A python package for a distance-based classifier which can use several different distance metrics.
|
|
5
5
|
Author-email: Siddharth Chaini <sidchaini@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -725,7 +725,7 @@ predictions = clf.predict(new_data)
|
|
|
725
725
|
|
|
726
726
|
## Documentation
|
|
727
727
|
|
|
728
|
-
For more detailed information about the package and its functionalities, please refer to the [official documentation](https://github.
|
|
728
|
+
For more detailed information about the package and its functionalities, please refer to the [official documentation](https://sidchaini.github.io/DistClassiPy/).
|
|
729
729
|
|
|
730
730
|
## Contributing
|
|
731
731
|
Contributions are welcome! If you have suggestions for improvements or bug fixes, please feel free to open an [issue](https://github.com/sidchaini/DistClassiPy/issues) or submit a [pull request](https://github.com/sidchaini/DistClassiPy/pulls).
|
|
@@ -735,7 +735,7 @@ DistClassiPy is released under the [GNU General Public License v3.0](https://www
|
|
|
735
735
|
|
|
736
736
|
## Citation
|
|
737
737
|
|
|
738
|
-
If you use DistClassiPy in your research or project, please consider citing the package. You can find citation information in the [CITATION.
|
|
738
|
+
If you use DistClassiPy in your research or project, please consider citing the package. You can find citation information in the [CITATION.cff](https://github.com/sidchaini/DistClassiPy/CITATION.cff) file.
|
|
739
739
|
|
|
740
740
|
|
|
741
741
|
## Contact
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
distclassipy/__init__.py,sha256=ddjymjO9E7ZilGC85dJZtLwNb46Yo11I_-yV6A5FUfo,492
|
|
2
|
+
distclassipy/classifier.py,sha256=zgA11Tm3lHqINtbem82CfudAUN5pn38GCSIk0ZBIQzw,12257
|
|
3
|
+
distclassipy/distances.py,sha256=SBH92YwH2hI-d777xnbQL6HVOGYje2M4lp19MX4HVEA,46878
|
|
4
|
+
distclassipy-0.0.9.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
5
|
+
distclassipy-0.0.9.dist-info/METADATA,sha256=gxQkBnhtIx_bXkcFtAsyWgBeVcGPc0bWjPnpnwbrY-M,43159
|
|
6
|
+
distclassipy-0.0.9.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
7
|
+
distclassipy-0.0.9.dist-info/top_level.txt,sha256=jiwqhSkq7CMCjV_Zar2dSDBO63o5C_Dp2tpGiVV6COE,13
|
|
8
|
+
distclassipy-0.0.9.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
distclassipy/__init__.py,sha256=ddjymjO9E7ZilGC85dJZtLwNb46Yo11I_-yV6A5FUfo,492
|
|
2
|
-
distclassipy/classifier.py,sha256=-neLPf1uiwg8I2hxmS-2fUL9702i51GtlIugSRC2_Pc,12331
|
|
3
|
-
distclassipy/distances.py,sha256=SBH92YwH2hI-d777xnbQL6HVOGYje2M4lp19MX4HVEA,46878
|
|
4
|
-
distclassipy-0.0.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
5
|
-
distclassipy-0.0.8.dist-info/METADATA,sha256=znJzUf_jgyuVgw_veSI0Nk1WoBrptV2ClymTkkentHE,43157
|
|
6
|
-
distclassipy-0.0.8.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
7
|
-
distclassipy-0.0.8.dist-info/top_level.txt,sha256=jiwqhSkq7CMCjV_Zar2dSDBO63o5C_Dp2tpGiVV6COE,13
|
|
8
|
-
distclassipy-0.0.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|