Documentation of internals

Modules

# PredictMD.PredictMDModule.

source

# PredictMD.CleaningModule.

source

# PredictMD.CompilationModule.

source

# PredictMD.GPUModule.

source

# PredictMD.ServerModule.

source

Constants

Types

# PredictMD.AbstractEstimatorType.

AbstractEstimator

source

# PredictMD.AbstractFeatureContrastsType.

AbstractFeatureContrasts

source

# PredictMD.AbstractPipelineType.

AbstractPipeline

source

# PredictMD.AbstractPlotType.

AbstractPlot{T}

source

# PredictMD.AbstractTransformerType.

AbstractTransformer

source

# PredictMD.DataFrameFeatureContrastsType.

source

# PredictMD.DataFrameFeatureContrastsMethod.

source

# PredictMD.DecisionTreeModelType.

source

# PredictMD.GLMModelType.

source

# PredictMD.ImmutableDataFrame2GLMSingleLabelBinaryClassTransformerType.

source

# PredictMD.ImmutableFeatureArrayTransposerTransformerType.

source

# PredictMD.ImmutablePackageMultiLabelPredictionTransformerType.

source

# PredictMD.ImmutablePackageSingleLabelPredictProbaTransformerType.

source

# PredictMD.ImmutablePackageSingleLabelPredictionTransformerType.

source

# PredictMD.ImmutablePredictProbaSingleLabelInt2StringTransformerType.

source

# PredictMD.ImmutablePredictionsSingleLabelInt2StringTransformerType.

source

# PredictMD.KnetModelType.

source

# PredictMD.LIBSVMModelType.

source

# PredictMD.MutableDataFrame2ClassificationKnetTransformerType.

source

# PredictMD.MutableDataFrame2DecisionTreeTransformerType.

source

# PredictMD.MutableDataFrame2RegressionKnetTransformerType.

source

# PredictMD.SimplePipelineType.

source

# PredictMD.SimplePipelineMethod.

source

Functions

# PredictMD.DataFrame2LIBSVMTransformerMethod.

source

# PredictMD.accuracyMethod.

source

# PredictMD.auprcMethod.

source

# PredictMD.auroccMethod.

source

# PredictMD.averageprecisionscoreMethod.

source

# PredictMD.avg_precisionMethod.

source

# PredictMD.binary_brier_scoreMethod.

binary_brier_score(ytrue, yscore)

Computes the binary formulation of the Brier score, defined as:

Lower values are better. Best value is 0.

source

# PredictMD.calculate_smote_pct_underMethod.

source

# PredictMD.check_column_typesMethod.

source

# PredictMD.cohen_kappaMethod.

source

# PredictMD.cohen_kappaMethod.

source

# PredictMD.cohen_kappaMethod.

source

# PredictMD.compute_contingency_tableMethod.

source

# PredictMD.compute_contingency_tableMethod.

source

# PredictMD.convert_value_to_missing!Function.

source

# PredictMD.delete_nothings!Method.

source

# PredictMD.f1scoreMethod.

source

# PredictMD.false_negative_rateMethod.

source

# PredictMD.false_positive_rateMethod.

source

# PredictMD.fbetascoreMethod.

source

# PredictMD.filename_extensionMethod.

source

# PredictMD.fit!Function.

source

# PredictMD.fit!Function.

source

# PredictMD.fit!Function.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fit!Method.

source

# PredictMD.fix_column_types!Method.

source

# PredictMD.fix_typeFunction.

source

# PredictMD.generate_feature_contrastsMethod.

source

# PredictMD.generate_formulaMethod.

source

# PredictMD.generate_formulaMethod.

source

# PredictMD.generate_formulaMethod.

source

# PredictMD.generate_formulaMethod.

source

# PredictMD.generate_interaction_termsMethod.

source

# PredictMD.get_binary_thresholdsMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_historyMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.get_underlyingMethod.

source

# PredictMD.getallrocnumsMethod.

source

# PredictMD.getlabelint2stringmapMethod.

source

# PredictMD.getlabelstring2intmapMethod.

source

# PredictMD.icd9_code_to_single_level_dx_ccsMethod.

source

# PredictMD.inverseMethod.

source

# PredictMD.is_appveyor_ciFunction.

source

# PredictMD.is_ciFunction.

source

# PredictMD.is_ci_or_runtestsFunction.

source

# PredictMD.is_ci_or_runtests_or_docs_or_examplesFunction.

source

# PredictMD.is_deploy_docsFunction.

source

# PredictMD.is_docs_or_examplesFunction.

source

# PredictMD.is_make_docsFunction.

source

# PredictMD.is_make_examplesFunction.

source

# PredictMD.is_nothingFunction.

source

# PredictMD.is_one_to_oneMethod.

source

# PredictMD.is_runtestsFunction.

source

# PredictMD.is_squareMethod.

source

# PredictMD.is_travis_ciFunction.

source

# PredictMD.is_travis_ci_on_appleFunction.

source

# PredictMD.is_travis_ci_on_linuxFunction.

source

# PredictMD.load_modelMethod.

source

# PredictMD.mean_square_errorMethod.

mean_square_error(ytrue, ypred)

source

# PredictMD.multilabelprobabilitiestopredictionsMethod.

source

# PredictMD.negative_predictive_valueMethod.

source

# PredictMD.open_plots_during_testsFunction.

source

# PredictMD.package_directoryMethod.

package_directory(parts...)::String

Equivalent to abspath(joinpath(abspath(package_directory()), parts...)).

source

# PredictMD.package_directoryMethod.

package_directory(f::Function, types::Tuple)::String

If function f with type signature types is part of a Julia package, returns the package root directory.

If function f with type signature types is not part of a Julia package, throws an error.

source

# PredictMD.package_directoryMethod.

package_directory(f::Function)::String

If function f is part of a Julia package, returns the package root directory.

If function f is not part of a Julia package, throws an error.

source

# PredictMD.package_directoryMethod.

package_directory(m::Method)::String

If method m is part of a Julia package, returns the package root directory.

If method m is not part of a Julia package, throws an error.

source

# PredictMD.package_directoryMethod.

package_directory(m::Module, parts...)::String

Equivalent to result = abspath(joinpath(abspath(package_directory(m)), parts...)).

source

# PredictMD.package_directoryMethod.

package_directory(m::Module)::String

If module m is part of a Julia package, returns the package root directory.

If module m is not part of a Julia package, throws an error.

source

# PredictMD.package_directoryMethod.

package_directory()::String

Return the PredictMD package directory.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.parse_functions!Method.

source

# PredictMD.plot_probability_calibration_curveMethod.

source

# PredictMD.plot_probability_calibration_curveMethod.

source

# PredictMD.plotlearningcurvesFunction.

source

# PredictMD.plotlearningcurvesFunction.

source

# PredictMD.plotlearningcurvesMethod.

source

# PredictMD.plotprcurvesMethod.

source

# PredictMD.plotprcurvesMethod.

source

# PredictMD.plotroccurvesMethod.

source

# PredictMD.plotroccurvesMethod.

source

# PredictMD.plotsinglelabelbinaryclassifierhistogramMethod.

source

# PredictMD.plotsinglelabelregressiontrueversuspredictedMethod.

source

# PredictMD.positive_predictive_valueMethod.

source

# PredictMD.prcurveMethod.

source

# PredictMD.prcurveMethod.

source

# PredictMD.precisionMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predictMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predict_probaMethod.

source

# PredictMD.predictionsassoctodataframeFunction.

source

# PredictMD.probability_calibration_metricsFunction.

source

# PredictMD.probability_calibration_metricsMethod.

source

# PredictMD.probability_calibration_scores_and_fractionsMethod.

source

# PredictMD.probability_calibration_scores_and_fractionsMethod.

source

# PredictMD.r2_scoreMethod.

r2_score(ytrue, ypred)

Computes coefficient of determination. Higher values are better. Best value is 1.

source

# PredictMD.recallMethod.

source

# PredictMD.risk_score_cutoff_valuesMethod.

source

# PredictMD.risk_score_cutoff_valuesMethod.

source

# PredictMD.roccurveMethod.

source

# PredictMD.roccurveMethod.

source

# PredictMD.root_mean_square_errorMethod.

root_mean_square_error(ytrue, ypred)

source

# PredictMD.save_modelMethod.

source

# PredictMD.sensitivityMethod.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_feature_contrasts!Method.

source

# PredictMD.set_max_epochs!Method.

source

# PredictMD.set_max_epochs!Method.

source

# PredictMD.set_max_epochs!Method.

source

# PredictMD.shuffle_rows!Method.

source

# PredictMD.shuffle_rows!Method.

source

# PredictMD.simple_linear_regressionMethod.

simple_linear_regression(x::AbstractVector, y::AbstractVector)

Simple linear regression - given a set of two-dimensional points (x, y), use the ordinary least squares method to find the best fit line of the form y = a + b*x (where a and b are real numbers) and return the tuple (a, b).

source

# PredictMD.simple_moving_averageMethod.

source

# PredictMD.single_labeldataframeknetregressionMethod.

source

# PredictMD.single_labeldataframeknetregression_KnetMethod.

source

# PredictMD.single_labeldataframelinearregressionMethod.

source

# PredictMD.single_labeldataframelinearregression_GLMMethod.

source

# PredictMD.single_labeldataframerandomforestregressionMethod.

source

# PredictMD.single_labeldataframerandomforestregression_DecisionTreeMethod.

source

# PredictMD.single_labeldataframesvmregressionMethod.

source

# PredictMD.single_labeldataframesvmregression_LIBSVMMethod.

source

# PredictMD.single_labelmulticlassdataframeknetclassifierMethod.

source

# PredictMD.single_labelmulticlassdataframeknetclassifier_KnetMethod.

source

# PredictMD.single_labelmulticlassdataframerandomforestclassifierMethod.

source

# PredictMD.single_labelmulticlassdataframesvmclassifierMethod.

source

# PredictMD.single_labelmulticlassdataframesvmclassifier_LIBSVMMethod.

source

# PredictMD.single_labelmulticlassdfrandomforestclassifier_DecisionTreeMethod.

source

# PredictMD.single_labelprobabilitiestopredictionsMethod.

source

# PredictMD.singlelabelbinaryclassdataframelogisticclassifierMethod.

source

# PredictMD.singlelabelbinaryclassdataframelogisticclassifier_GLMMethod.

source

# PredictMD.singlelabelbinaryclassdataframeprobitclassifierMethod.

source

# PredictMD.singlelabelbinaryclassdataframeprobitclassifier_GLMMethod.

source

# PredictMD.singlelabelbinaryclassificationmetricsMethod.

source

# PredictMD.singlelabelbinaryclassificationmetricsMethod.

source

# PredictMD.singlelabelbinaryclassificationmetrics_resultdictMethod.

source

# PredictMD.singlelabelbinaryclassificationmetrics_tunableparamMethod.

source

# PredictMD.singlelabelbinaryyscoreMethod.

source

# PredictMD.singlelabelbinaryytrueMethod.

source

# PredictMD.singlelabelregressionmetricsMethod.

source

# PredictMD.singlelabelregressionmetricsMethod.

source

# PredictMD.singlelabelregressionmetrics_resultdictMethod.

source

# PredictMD.singlelabelregressionypredMethod.

source

# PredictMD.singlelabelregressionytrueMethod.

source

# PredictMD.smoteMethod.

source

# PredictMD.smoteMethod.

source

# PredictMD.specificityMethod.

source

# PredictMD.split_dataMethod.

source

# PredictMD.split_dataMethod.

source

# PredictMD.transformFunction.

source

# PredictMD.transformFunction.

source

# PredictMD.transformMethod.

source

# PredictMD.transformMethod.

source

# PredictMD.transformMethod.

source

# PredictMD.transformMethod.

source

# PredictMD.transformMethod.

source

# PredictMD.transformMethod.

source

# PredictMD.transformMethod.

source

# PredictMD.transformMethod.

source

# PredictMD.transform_columns!Function.

source

# PredictMD.trapzMethod.

trapz(x, y)

Compute the area under the curve of 2-dimensional points (x, y) using the trapezoidal method.

source

# PredictMD.true_negative_rateMethod.

source

# PredictMD.true_positive_rateMethod.

source

# PredictMD.tuplifyFunction.

source

# PredictMD.underlyingMethod.

source

# PredictMD.versionMethod.

version(f::Function, types::Tuple)::VersionNumber

If function f with type signature types is part of a Julia package, returns the version number of that package.

If function f with type signature types is not part of a Julia package, throws an error.

source

# PredictMD.versionMethod.

version(f::Function)::VersionNumber

If function f is part of a Julia package, returns the version number of that package.

If function f is not part of a Julia package, throws an error.

source

# PredictMD.versionMethod.

version(m::Method)::VersionNumber

If method m is part of a Julia package, returns the version number of that package.

If method m is not part of a Julia package, throws an error.

source

# PredictMD.versionMethod.

version(m::Module)::VersionNumber

If module m is part of a Julia package, returns the version number of that package.

If module m is not part of a Julia package, throws an error.

source

# PredictMD.versionMethod.

version()::VersionNumber

Return the version number of PredictMD.

source

# PredictMD.version_codenameMethod.

version_codename(f::Function, types::Tuple)::String

If function f with type signature types is part of a Julia package, returns the version code name of that package.

If function f with type signature types is not part of a Julia package, throws an error.

source

# PredictMD.version_codenameMethod.

version_codename(f::Function)::String

If function f is part of a Julia package, returns the version code name of that package.

If function f is not part of a Julia package, throws an error.

source

# PredictMD.version_codenameMethod.

version_codename(m::Method)::String

If method m is part of a Julia package, returns the version code name of that package.

If method m is not part of a Julia package, throws an error.

source

# PredictMD.version_codenameMethod.

version_codename(m::Module)::String

If module m is part of a Julia package, returns the version code name of that package.

If module m is not part of a Julia package, throws an error.

source

# PredictMD.version_codenameMethod.

version_codename()::String

Return the version code name of PredictMD.

source

# PredictMD.Cleaning.ccs_onehot_namesFunction.

Given a dataframe, return the column names corresponding to CCS "one-hot" columns.

Examples

import CSVFiles
import FileIO
import PredictMD

df = DataFrames.DataFrame(
    FileIO.load(
        MY_CSV_FILE_NAME;
        type_detect_rows = 30_000,
        )
    )

@info(PredictMD.Cleaning.ccs_onehot_names(df))
@info(PredictMD.Cleaning.ccs_onehot_names(df, "ccs_onehot_"))

source

# PredictMD.Cleaning.clean_hcup_nis_csv_icd9Method.

Given a single ICD 9 code, import the relevant patients from the Health Care Utilization Project (HCUP) National Inpatient Sample (NIS) database.

Examples:

import CSVFiles
import FileIO
import PredictMD

icd_code_list = ["8841"]
icd_code_type=:procedure
input_file_name_list = [
    "./data/nis_2012_core.csv",
    "./data/nis_2013_core.csv",
    "./data/nis_2014_core.csv",
    ]
output_file_name = "./output/hcup_nis_pr_8841.csv"

PredictMD.Cleaning.clean_hcup_nis_csv_icd9(
    icd_code_list,
    input_file_name_list,
    output_file_name;
    icd_code_type=icd_code_type,
    rows_for_type_detect = 30_000,
    )

df = DataFrames.DataFrame(
    FileIO.load(
        output_file_name;
        type_detect_rows = 30_000,
        )
    )

@info(PredictMD.Cleaning.ccs_onehot_names(df))

source

# PredictMD.Cleaning.column_names_with_prefixMethod.

source

# PredictMD.Cleaning.symbol_begins_withMethod.

source

# PredictMD.Cleaning.x_contains_yMethod.

source

Macros

Index