Hazard Function (Hazard)¶
A Hazard object represents a mapping from a quantity, t, to a conditional probability: of all values in the distribution that are at least t, what fraction are exactly t?
Hazard is a subclass of a Pandas Series, so it has all Series methods, although some are overridden to change their behavior.
Bases: Distribution
Represents a Hazard function.
Source code in empiricaldist/empiricaldist.py
1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 | |
copy(deep=True)
¶
Make a copy.
| Parameters: |
|
|---|
Returns: new Pmf
Source code in empiricaldist/empiricaldist.py
1277 1278 1279 1280 1281 1282 1283 1284 1285 | |
from_seq(seq, **kwargs)
staticmethod
¶
Make a Hazard from a sequence of values.
| Parameters: |
|
|---|
Returns: Hazard object
Source code in empiricaldist/empiricaldist.py
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 | |
make_cdf(**kwargs)
¶
Make a Cdf from the Hazard.
| Parameters: |
|
|---|
Returns: Cdf
Source code in empiricaldist/empiricaldist.py
1316 1317 1318 1319 1320 1321 1322 1323 1324 | |
make_pmf(**kwargs)
¶
Make a Pmf from the Hazard.
| Parameters: |
|
|---|
Returns: Pmf
Source code in empiricaldist/empiricaldist.py
1326 1327 1328 1329 1330 1331 1332 1333 1334 | |
make_same(dist)
¶
Convert the given dist to Hazard.
| Parameters: |
|
|---|
Returns: Hazard
Source code in empiricaldist/empiricaldist.py
1336 1337 1338 1339 1340 1341 1342 1343 1344 | |
make_surv(**kwargs)
¶
Make a Surv from the Hazard.
| Parameters: |
|
|---|
Returns: Surv
Source code in empiricaldist/empiricaldist.py
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 | |
normalize()
¶
Normalize the hazard function (modifies self).
Returns: normalizing constant
Source code in empiricaldist/empiricaldist.py
1289 1290 1291 1292 1293 1294 1295 1296 | |