dcekit 2.17.1__tar.gz → 2.18.1__tar.gz

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.
Files changed (43) hide show
  1. {dcekit-2.17.1/dcekit.egg-info → dcekit-2.18.1}/PKG-INFO +1 -1
  2. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/generative_model/gmr.py +13 -14
  3. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/generative_model/vbgmr.py +12 -14
  4. {dcekit-2.17.1 → dcekit-2.18.1/dcekit.egg-info}/PKG-INFO +1 -1
  5. {dcekit-2.17.1 → dcekit-2.18.1}/setup.py +1 -1
  6. {dcekit-2.17.1 → dcekit-2.18.1}/LICENSE +0 -0
  7. {dcekit-2.17.1 → dcekit-2.18.1}/LICENSE.txt +0 -0
  8. {dcekit-2.17.1 → dcekit-2.18.1}/MANIFEST.in +0 -0
  9. {dcekit-2.17.1 → dcekit-2.18.1}/README.md +0 -0
  10. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/__init__.py +0 -0
  11. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/design_of_exmeriments/__init__.py +0 -0
  12. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/design_of_exmeriments/bayesian_optimization.py +0 -0
  13. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/generative_model/__init__.py +0 -0
  14. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/generative_model/gtm.py +0 -0
  15. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/generative_model/ssgmr_xgmm.py +0 -0
  16. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/generative_model/ssgmr_xgmm_xma.py +0 -0
  17. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/just_in_time/__init__.py +0 -0
  18. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/just_in_time/jitpls.py +0 -0
  19. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/just_in_time/lwpls.py +0 -0
  20. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/learning/__init__.py +0 -0
  21. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/learning/ensemble_learning.py +0 -0
  22. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/learning/semi_supervised_learning.py +0 -0
  23. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/learning/transfer_learning.py +0 -0
  24. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/optimization/__init__.py +0 -0
  25. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/optimization/fast_opt_svr_hyperparams.py +0 -0
  26. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/optimization/iot.py +0 -0
  27. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/optimization/opt_dnn_hyperparams.py +0 -0
  28. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/optimization/opt_dnn_hyperparams_class.py +0 -0
  29. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/sampling/__init__.py +0 -0
  30. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/sampling/kennard_stone.py +0 -0
  31. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/validation/__init__.py +0 -0
  32. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/validation/applicability_domain.py +0 -0
  33. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/validation/metrics.py +0 -0
  34. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/validation/validation.py +0 -0
  35. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/variable_selection/__init__.py +0 -0
  36. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/variable_selection/basic_variable_selection.py +0 -0
  37. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/variable_selection/local_interpretation.py +0 -0
  38. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit/variable_selection/variable_importance.py +0 -0
  39. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit.egg-info/SOURCES.txt +0 -0
  40. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit.egg-info/dependency_links.txt +0 -0
  41. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit.egg-info/requires.txt +0 -0
  42. {dcekit-2.17.1 → dcekit-2.18.1}/dcekit.egg-info/top_level.txt +0 -0
  43. {dcekit-2.17.1 → dcekit-2.18.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcekit
3
- Version: 2.17.1
3
+ Version: 2.18.1
4
4
  Summary: Data Chemical Engineering toolkit
5
5
  Home-page: https://github.com/hkaneko1985/dcekit/
6
6
  Author: Hiromasa Kaneko
@@ -416,13 +416,12 @@ class GMR(GaussianMixture):
416
416
  except:
417
417
  print('assignment of weights is failed, and zero is assigned')
418
418
 
419
- if len(np.where(weights.sum(axis=0)==0)[0]) > 0:
420
- weights = np.ones(weights.shape)
421
- if np.isnan(weights.sum(axis=0)).any():
422
- weights = np.ones(weights.shape)
423
- if np.isinf(weights.sum(axis=0)).any():
424
- weights = np.ones(weights.shape)
425
- weights = weights / weights.sum(axis=0)
419
+ weights_sum = weights.sum(axis=0)
420
+ invalid_samples = (weights_sum <= 0) | (~np.isfinite(weights_sum))
421
+ if invalid_samples.any():
422
+ weights[:, invalid_samples] = 1.0
423
+ weights_sum = weights.sum(axis=0)
424
+ weights = weights / weights_sum
426
425
 
427
426
  return estimated_means, estimated_covariances, weights
428
427
 
@@ -519,13 +518,13 @@ class GMR(GaussianMixture):
519
518
  except:
520
519
  print('assignment of weights is failed, and zero is assigned')
521
520
 
522
- if len(np.where(weights.sum(axis=0)==0)[0]) > 0:
523
- weights = np.ones(weights.shape)
524
- if np.isnan(weights.sum(axis=0)).any():
525
- weights = np.ones(weights.shape)
526
- if np.isinf(weights.sum(axis=0)).any():
527
- weights = np.ones(weights.shape)
528
- weights = weights / weights.sum(axis=0)
521
+ weights_sum = weights.sum(axis=0)
522
+ invalid_samples = (weights_sum <= 0) | (~np.isfinite(weights_sum))
523
+ if invalid_samples.any():
524
+ weights[:, invalid_samples] = 1.0
525
+ weights_sum = weights.sum(axis=0)
526
+ weights = weights / weights_sum
527
+
529
528
  ioe = -logsumexp(logpdfs, axis=0, b=weights)
530
529
 
531
530
  return estimated_means, estimated_covariances, weights, pdfs, logpdfs, ioe
@@ -317,13 +317,12 @@ class VBGMR(BayesianGaussianMixture):
317
317
  except:
318
318
  print('assignment of weights is failed, and zero is assigned')
319
319
 
320
- if len(np.where(weights.sum(axis=0)==0)[0]) > 0:
321
- weights = np.ones(weights.shape)
322
- if np.isnan(weights.sum(axis=0)).any():
323
- weights = np.ones(weights.shape)
324
- if np.isinf(weights.sum(axis=0)).any():
325
- weights = np.ones(weights.shape)
326
- weights = weights / weights.sum(axis=0)
320
+ weights_sum = weights.sum(axis=0)
321
+ invalid_samples = (weights_sum <= 0) | (~np.isfinite(weights_sum))
322
+ if invalid_samples.any():
323
+ weights[:, invalid_samples] = 1.0
324
+ weights_sum = weights.sum(axis=0)
325
+ weights = weights / weights_sum
327
326
 
328
327
  return estimated_means, estimated_covariances, weights
329
328
 
@@ -419,13 +418,12 @@ class VBGMR(BayesianGaussianMixture):
419
418
  except:
420
419
  print('assignment of weights is failed, and zero is assigned')
421
420
 
422
- if len(np.where(weights.sum(axis=0)==0)[0]) > 0:
423
- weights = np.ones(weights.shape)
424
- if np.isnan(weights.sum(axis=0)).any():
425
- weights = np.ones(weights.shape)
426
- if np.isinf(weights.sum(axis=0)).any():
427
- weights = np.ones(weights.shape)
428
- weights = weights / weights.sum(axis=0)
421
+ weights_sum = weights.sum(axis=0)
422
+ invalid_samples = (weights_sum <= 0) | (~np.isfinite(weights_sum))
423
+ if invalid_samples.any():
424
+ weights[:, invalid_samples] = 1.0
425
+ weights_sum = weights.sum(axis=0)
426
+ weights = weights / weights_sum
429
427
  ioe = -logsumexp(logpdfs, axis=0, b=weights)
430
428
 
431
429
  return estimated_means, estimated_covariances, weights, pdfs, logpdfs, ioe
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dcekit
3
- Version: 2.17.1
3
+ Version: 2.18.1
4
4
  Summary: Data Chemical Engineering toolkit
5
5
  Home-page: https://github.com/hkaneko1985/dcekit/
6
6
  Author: Hiromasa Kaneko
@@ -13,7 +13,7 @@ with open('LICENSE.txt') as f:
13
13
 
14
14
  setup(
15
15
  name='dcekit',
16
- version='2.17.1',
16
+ version='2.18.1',
17
17
  description='Data Chemical Engineering toolkit',
18
18
  long_description=readme,
19
19
  author='Hiromasa Kaneko',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes