In [85]:
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression, Ridge, Lasso
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import NMF
import matplotlib.pyplot as plt
%matplotlib inline
In [2]:
for b in range(1, 30):
for r in range(1, 20):
if 1-(1-0.95**r)**b >= 0.99 and 1-(1-0.80**r)**b <= 0.15:
print('r=', r, 'b=', b, 'k=', r*b)
In [5]:
from ipywidgets import interact
%matplotlib notebook
import numpy as np
t = np.linspace(0, 1, 100)
r = 100
s = 1-(1-t**r)**(np.log(1-0.9)/np.log(1-0.9**r))
f = 1 - (1-t**r)**b
import matplotlib.pyplot as plt
%matplotlib notebook
plt.plot(t, s)
print(s)
In [ ]: