def __init__(self, project_name):
     model = LogisticEstimator()
     super().__init__(project_name, model)
Пример #2
0
from src.data.data_repository import DataRepository
from src.domain.models.delayed_s_shaped.delayed_s_shaped_estimator import DelayedSShapedEstimator
from src.domain.models.logistic.logistic_estimator import LogisticEstimator
from src.domain.fitters.model_fitter import ModelFitter

fpd_fitter = ModelFitter()

data = DataRepository.provide_project_data('mixed-waterfall-agile')
x_axis_data = data.get_formated_times()
cumulative_failures = data.get_cumulative_failures()

ds = DelayedSShapedEstimator()
log = LogisticEstimator()
'''

ds_fit = fpd_fitter.fit('delayed-s-shaped', 'mixed-waterfall-agile')
log_fit = fpd_fitter.fit('logistic', 'mixed-waterfall-agile')

ds_lsq_a = ds_fit.get_lsq_parameters()[0]
ds_lsq_b = ds_fit.get_lsq_parameters()[1]

log_lsq_a = log_fit.get_lsq_parameters()[0]
log_lsq_b = log_fit.get_lsq_parameters()[1]
log_lsq_c = log_fit.get_lsq_parameters()[2]

fig, axes = plt.subplots()
axes.set_xlabel('Tiempo (días)')
axes.set_ylabel('Numero esperado de fallas')
axes.set_xlim(left=0, auto=True)
axes.set_ylim(auto=True)
axes.patch.set_facecolor("#ffffff")
Пример #3
0
from src.data.data_repository import DataRepository
from src.domain.models.barraza_contagion.barraza_contagion_estimator import BarrazaContagionEstimator
from src.domain.models.delayed_s_shaped.delayed_s_shaped_estimator import DelayedSShapedEstimator
from src.domain.models.goel_okumoto.goel_okumoto_estimator import GoelOkumotoEstimator
from src.domain.models.logistic.logistic_estimator import LogisticEstimator

from matplotlib import pyplot as plt

go = GoelOkumotoEstimator()
ds = DelayedSShapedEstimator()
log = LogisticEstimator()
bc = BarrazaContagionEstimator()

mixed = DataRepository.provide_project_data('mixed-waterfall-agile')
mixed_times = mixed.get_times()

a_go = 1416.9139
b_go = 0.0048

a_ds = 893.6389
b_ds = 0.0218

a_log = 835.4106
b_log = 0.0307
c_log = 75.8011

a_bc = 21.0424
b_bc = 0.7869

mean_values_go = go.calculate_mean_failure_numbers(mixed_times, a_go, b_go)
mean_values_ds = ds.calculate_mean_failure_numbers(mixed_times, a_ds, b_ds)
import numpy as np
from matplotlib import pyplot as plt

from src.data.data_repository import DataRepository
from src.domain.models.barraza_contagion.barraza_contagion_estimator import BarrazaContagionEstimator
from src.domain.models.delayed_s_shaped.delayed_s_shaped_estimator import DelayedSShapedEstimator
from src.domain.models.goel_okumoto.goel_okumoto_estimator import GoelOkumotoEstimator
from src.domain.models.logistic.logistic_estimator import LogisticEstimator

go = GoelOkumotoEstimator()
ds = DelayedSShapedEstimator()
log = LogisticEstimator()
bc = BarrazaContagionEstimator()

ntds = DataRepository.provide_project_data('ntds')
ntds_data = ntds.get_data()
ntds_cumfailures = ntds.get_cumulative_failures()
n = ntds_cumfailures[-1]
tbf = ntds.get_time_between_failures()

a_go = 33.5994
b_go = 0.0063

a_ds = 26.7155
b_ds = 0.0212

a_log = 24.6114
b_log = 0.0413
c_log = 76.4858

a_bc = 0.3799
Пример #5
0
from src.data.data_repository import DataRepository
from src.domain.models.delayed_s_shaped.delayed_s_shaped_estimator import DelayedSShapedEstimator
from src.domain.models.logistic.logistic_estimator import LogisticEstimator
from src.domain.fitters.model_fitter import ModelFitter
from matplotlib import pyplot as plt

ttf_fitter = ModelFitter()

data = DataRepository.provide_project_data('agile-n1')
x_axis_data = data.get_formated_times()
cumulative_failures = data.get_cumulative_failures()

ds = DelayedSShapedEstimator()
log = LogisticEstimator()

ds_fit = ttf_fitter.fit('delayed-s-shaped', 'agile-n1')
log_fit = ttf_fitter.fit('logistic', 'agile-n1')

ds_lsq_a = ds_fit.get_lsq_parameters()[0]
ds_lsq_b = ds_fit.get_lsq_parameters()[1]

log_lsq_a = log_fit.get_lsq_parameters()[0]
log_lsq_b = log_fit.get_lsq_parameters()[1]
log_lsq_c = log_fit.get_lsq_parameters()[2]

fig, axes = plt.subplots()
axes.set_xlabel('Tiempo (días)')
axes.set_ylabel('Numero esperado de fallas')
axes.set_xlim(left=0, auto=True)
axes.set_ylim(auto=True)
axes.patch.set_facecolor("#ffffff")
Пример #6
0
 def plot(self, axes, times, cumulative_failures, lsq_params, ml_params,
          **kwargs):
     self.estimator = LogisticEstimator()
     super().plot(axes, times, cumulative_failures, lsq_params, ml_params,
                  **kwargs)
 def test_logistic_mttf_saddlepoint_approx_for_k_900_mixed_dataset_is_194(self):
     k = 900
     logistic = LogisticEstimator()
     calculator = LogisticSaddlepointCalculator(logistic.calculate_mean, logistic.calculate_lambda)
     saddlepoint_approx = calculator.calculate_saddlepoint_mttf_approximation(k, self.a, self.a, self.b, self.c)
     self.assertAlmostEqual(194, saddlepoint_approx, delta=1)