Documentation of internals
Modules
PredictMD.PredictMD
— ModulePredictMD.Cleaning
— ModulePredictMD.Compilation
— ModulePredictMD.GPU
— ModulePredictMD.Server
— ModuleConstants
Types
PredictMD.CrossValidation
— TypePredictMD.DataFrameFeatureContrasts
— TypePredictMD.DataFrameFeatureContrasts
— MethodPredictMD.DecisionTreeModel
— TypePredictMD.GLMModel
— TypePredictMD.ImmutableDataFrame2GLMSingleLabelBinaryClassTransformer
— TypePredictMD.ImmutableFeatureArrayTransposerTransformer
— TypePredictMD.ImmutablePackageMultiLabelPredictionTransformer
— TypePredictMD.ImmutablePackageSingleLabelPredictProbaTransformer
— TypePredictMD.ImmutablePackageSingleLabelPredictionTransformer
— TypePredictMD.ImmutablePredictProbaSingleLabelInt2StringTransformer
— TypePredictMD.ImmutablePredictionsSingleLabelInt2StringTransformer
— TypePredictMD.KnetModel
— TypePredictMD.LIBSVMModel
— TypePredictMD.MutableDataFrame2ClassificationKnetTransformer
— TypePredictMD.MutableDataFrame2DecisionTreeTransformer
— TypePredictMD.MutableDataFrame2RegressionKnetTransformer
— TypePredictMD.SimplePipeline
— TypePredictMD.SimplePipeline
— MethodFunctions
PredictMD.DataFrame2LIBSVMTransformer
— MethodPredictMD.accuracy
— MethodPredictMD.auprc
— MethodPredictMD.aurocc
— MethodPredictMD.averageprecisionscore
— MethodPredictMD.avg_precision
— MethodPredictMD.binary_brier_score
— Methodbinary_brier_score(ytrue, yscore)
Computes the binary formulation of the Brier score, defined as:
Lower values are better. Best value is 0.
PredictMD.calculate_smote_pct_under
— MethodPredictMD.check_column_types
— MethodPredictMD.cohen_kappa
— MethodPredictMD.cohen_kappa
— MethodPredictMD.cohen_kappa
— MethodPredictMD.compute_contingency_table
— MethodPredictMD.compute_contingency_table
— MethodPredictMD.convert_value_to_missing!
— FunctionPredictMD.delete_nothings!
— MethodPredictMD.f1score
— MethodPredictMD.false_negative_rate
— MethodPredictMD.false_positive_rate
— MethodPredictMD.fbetascore
— MethodPredictMD.filename_extension
— MethodPredictMD.fit!
— FunctionPredictMD.fit!
— FunctionPredictMD.fit!
— FunctionPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fit!
— MethodPredictMD.fix_column_types!
— MethodPredictMD.fix_type
— FunctionPredictMD.flatten
— MethodPredictMD.generate_feature_contrasts
— MethodPredictMD.generate_formula
— MethodPredictMD.generate_formula
— MethodPredictMD.generate_formula
— MethodPredictMD.get_binary_thresholds
— MethodPredictMD.get_history
— MethodPredictMD.get_history
— MethodPredictMD.get_underlying
— MethodPredictMD.get_underlying
— MethodPredictMD.get_underlying
— MethodPredictMD.get_underlying
— MethodPredictMD.get_underlying
— MethodPredictMD.get_underlying
— MethodPredictMD.get_underlying
— MethodPredictMD.get_underlying
— MethodPredictMD.getallrocnums
— MethodPredictMD.getlabelint2stringmap
— MethodPredictMD.getlabelstring2intmap
— MethodPredictMD.icd9_code_to_single_level_dx_ccs
— MethodPredictMD.inverse
— MethodPredictMD.is_ci
— FunctionPredictMD.is_ci_or_runtests
— FunctionPredictMD.is_ci_or_runtests_or_docs_or_examples
— FunctionPredictMD.is_deploy_docs
— FunctionPredictMD.is_docs_or_examples
— FunctionPredictMD.is_make_docs
— FunctionPredictMD.is_make_examples
— FunctionPredictMD.is_nothing
— FunctionPredictMD.is_one_to_one
— MethodPredictMD.is_runtests
— FunctionPredictMD.is_square
— MethodPredictMD.is_travis_ci
— FunctionPredictMD.is_travis_ci_on_linux
— FunctionPredictMD.isflat
— FunctionPredictMD.ispipeline
— FunctionPredictMD.load_model
— MethodPredictMD.mean_square_error
— Methodmean_square_error(ytrue, ypred)
PredictMD.multilabelprobabilitiestopredictions
— MethodPredictMD.multilabelprobabilitiestopredictions
— MethodPredictMD.negative_predictive_value
— MethodPredictMD.open_plots_during_tests
— FunctionPredictMD.package_directory
— Methodpackage_directory(parts...)::String
Equivalent to abspath(joinpath(abspath(package_directory()), parts...))
.
PredictMD.package_directory
— Methodpackage_directory()::String
Return the PredictMD package directory.
PredictMD.parse_functions!
— MethodPredictMD.plot_probability_calibration_curve
— MethodPredictMD.plot_probability_calibration_curve
— MethodPredictMD.plotlearningcurve
— FunctionPredictMD.plotlearningcurve
— FunctionPredictMD.plotlearningcurve
— MethodPredictMD.plotprcurve
— MethodPredictMD.plotprcurve
— MethodPredictMD.plotroccurve
— MethodPredictMD.plotroccurve
— MethodPredictMD.plotsinglelabelbinaryclassifierhistogram
— MethodPredictMD.plotsinglelabelregressiontrueversuspredicted
— MethodPredictMD.positive_predictive_value
— MethodPredictMD.prcurve
— MethodPredictMD.prcurve
— MethodPredictMD.precision
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predict_proba
— MethodPredictMD.predictionsassoctodataframe
— FunctionPredictMD.probability_calibration_metrics
— FunctionPredictMD.probability_calibration_metrics
— MethodPredictMD.probability_calibration_scores_and_fractions
— MethodPredictMD.probability_calibration_scores_and_fractions
— MethodPredictMD.r2_score
— Methodr2_score(ytrue, ypred)
Computes coefficient of determination. Higher values are better. Best value is 1.
PredictMD.recall
— MethodPredictMD.risk_score_cutoff_values
— MethodPredictMD.risk_score_cutoff_values
— MethodPredictMD.roccurve
— MethodPredictMD.roccurve
— MethodPredictMD.root_mean_square_error
— Methodroot_mean_square_error(ytrue, ypred)
PredictMD.save_model
— MethodPredictMD.sensitivity
— MethodPredictMD.set_feature_contrasts!
— MethodPredictMD.set_feature_contrasts!
— MethodPredictMD.set_feature_contrasts!
— MethodPredictMD.set_feature_contrasts!
— MethodPredictMD.set_max_epochs!
— MethodPredictMD.set_max_epochs!
— MethodPredictMD.shuffle_rows!
— MethodPredictMD.shuffle_rows!
— MethodPredictMD.simple_linear_regression
— Methodsimple_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).
PredictMD.simple_moving_average
— MethodPredictMD.single_labeldataframeknetregression
— MethodPredictMD.single_labeldataframeknetregression_Knet
— MethodPredictMD.single_labeldataframelinearregression
— MethodPredictMD.single_labeldataframelinearregression_GLM
— MethodPredictMD.single_labeldataframerandomforestregression
— MethodPredictMD.single_labeldataframerandomforestregression_DecisionTree
— MethodPredictMD.single_labeldataframesvmregression
— MethodPredictMD.single_labeldataframesvmregression_LIBSVM
— MethodPredictMD.single_labelmulticlassdataframeknetclassifier
— MethodPredictMD.single_labelmulticlassdataframeknetclassifier_Knet
— MethodPredictMD.single_labelmulticlassdataframerandomforestclassifier
— MethodPredictMD.single_labelmulticlassdataframesvmclassifier
— MethodPredictMD.single_labelmulticlassdataframesvmclassifier_LIBSVM
— MethodPredictMD.single_labelmulticlassdfrandomforestclassifier_DecisionTree
— MethodPredictMD.single_labelprobabilitiestopredictions
— MethodPredictMD.singlelabelbinaryclassdataframelogisticclassifier
— MethodPredictMD.singlelabelbinaryclassdataframelogisticclassifier_GLM
— MethodPredictMD.singlelabelbinaryclassificationmetrics
— MethodPredictMD.singlelabelbinaryclassificationmetrics
— MethodPredictMD.singlelabelbinaryclassificationmetrics_resultdict
— MethodPredictMD.singlelabelbinaryclassificationmetrics_tunableparam
— MethodPredictMD.singlelabelbinaryyscore
— MethodPredictMD.singlelabelbinaryytrue
— MethodPredictMD.singlelabelregressionmetrics
— MethodPredictMD.singlelabelregressionmetrics
— MethodPredictMD.singlelabelregressionmetrics_resultdict
— MethodPredictMD.singlelabelregressionypred
— MethodPredictMD.singlelabelregressionytrue
— MethodPredictMD.smote
— MethodPredictMD.smote
— MethodPredictMD.specificity
— MethodPredictMD.split_data
— MethodPredictMD.split_data
— MethodPredictMD.transform
— FunctionPredictMD.transform
— FunctionPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform
— MethodPredictMD.transform_columns!
— FunctionPredictMD.trapz
— Functiontrapz(x, y)
Compute the area under the curve of 2-dimensional points (x, y) using the trapezoidal method.
PredictMD.true_negative_rate
— MethodPredictMD.true_positive_rate
— MethodPredictMD.tuplify
— FunctionPredictMD.version
— Methodversion()::VersionNumber
Return the version number of PredictMD.
PredictMD.Cleaning.ccs_onehot_names
— FunctionGiven 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_"))
PredictMD.Cleaning.clean_hcup_nis_csv_icd9
— MethodGiven 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))
PredictMD.Cleaning.column_names_with_prefix
— MethodPredictMD.Cleaning.symbol_begins_with
— MethodPredictMD.Cleaning.x_contains_y
— MethodMacros
Index
PredictMD.Cleaning
PredictMD.Compilation
PredictMD.GPU
PredictMD.PredictMD
PredictMD.Server
PredictMD.CrossValidation
PredictMD.DataFrameFeatureContrasts
PredictMD.DataFrameFeatureContrasts
PredictMD.DecisionTreeModel
PredictMD.GLMModel
PredictMD.ImmutableDataFrame2GLMSingleLabelBinaryClassTransformer
PredictMD.ImmutableFeatureArrayTransposerTransformer
PredictMD.ImmutablePackageMultiLabelPredictionTransformer
PredictMD.ImmutablePackageSingleLabelPredictProbaTransformer
PredictMD.ImmutablePackageSingleLabelPredictionTransformer
PredictMD.ImmutablePredictProbaSingleLabelInt2StringTransformer
PredictMD.ImmutablePredictionsSingleLabelInt2StringTransformer
PredictMD.KnetModel
PredictMD.LIBSVMModel
PredictMD.MutableDataFrame2ClassificationKnetTransformer
PredictMD.MutableDataFrame2DecisionTreeTransformer
PredictMD.MutableDataFrame2RegressionKnetTransformer
PredictMD.SimplePipeline
PredictMD.SimplePipeline
PredictMD.Cleaning.ccs_onehot_names
PredictMD.Cleaning.clean_hcup_nis_csv_icd9
PredictMD.Cleaning.column_names_with_prefix
PredictMD.Cleaning.symbol_begins_with
PredictMD.Cleaning.x_contains_y
PredictMD.DataFrame2LIBSVMTransformer
PredictMD.accuracy
PredictMD.auprc
PredictMD.aurocc
PredictMD.averageprecisionscore
PredictMD.avg_precision
PredictMD.binary_brier_score
PredictMD.calculate_smote_pct_under
PredictMD.check_column_types
PredictMD.cohen_kappa
PredictMD.cohen_kappa
PredictMD.cohen_kappa
PredictMD.compute_contingency_table
PredictMD.compute_contingency_table
PredictMD.convert_value_to_missing!
PredictMD.delete_nothings!
PredictMD.f1score
PredictMD.false_negative_rate
PredictMD.false_positive_rate
PredictMD.fbetascore
PredictMD.filename_extension
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fit!
PredictMD.fix_column_types!
PredictMD.fix_type
PredictMD.flatten
PredictMD.generate_feature_contrasts
PredictMD.generate_formula
PredictMD.generate_formula
PredictMD.generate_formula
PredictMD.get_binary_thresholds
PredictMD.get_history
PredictMD.get_history
PredictMD.get_underlying
PredictMD.get_underlying
PredictMD.get_underlying
PredictMD.get_underlying
PredictMD.get_underlying
PredictMD.get_underlying
PredictMD.get_underlying
PredictMD.get_underlying
PredictMD.getallrocnums
PredictMD.getlabelint2stringmap
PredictMD.getlabelstring2intmap
PredictMD.icd9_code_to_single_level_dx_ccs
PredictMD.inverse
PredictMD.is_ci
PredictMD.is_ci_or_runtests
PredictMD.is_ci_or_runtests_or_docs_or_examples
PredictMD.is_deploy_docs
PredictMD.is_docs_or_examples
PredictMD.is_make_docs
PredictMD.is_make_examples
PredictMD.is_nothing
PredictMD.is_one_to_one
PredictMD.is_runtests
PredictMD.is_square
PredictMD.is_travis_ci
PredictMD.is_travis_ci_on_linux
PredictMD.isflat
PredictMD.ispipeline
PredictMD.load_model
PredictMD.mean_square_error
PredictMD.multilabelprobabilitiestopredictions
PredictMD.multilabelprobabilitiestopredictions
PredictMD.negative_predictive_value
PredictMD.open_plots_during_tests
PredictMD.package_directory
PredictMD.package_directory
PredictMD.parse_functions!
PredictMD.plot_probability_calibration_curve
PredictMD.plot_probability_calibration_curve
PredictMD.plotlearningcurve
PredictMD.plotlearningcurve
PredictMD.plotlearningcurve
PredictMD.plotprcurve
PredictMD.plotprcurve
PredictMD.plotroccurve
PredictMD.plotroccurve
PredictMD.plotsinglelabelbinaryclassifierhistogram
PredictMD.plotsinglelabelregressiontrueversuspredicted
PredictMD.positive_predictive_value
PredictMD.prcurve
PredictMD.prcurve
PredictMD.precision
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predict_proba
PredictMD.predictionsassoctodataframe
PredictMD.probability_calibration_metrics
PredictMD.probability_calibration_metrics
PredictMD.probability_calibration_scores_and_fractions
PredictMD.probability_calibration_scores_and_fractions
PredictMD.r2_score
PredictMD.recall
PredictMD.risk_score_cutoff_values
PredictMD.risk_score_cutoff_values
PredictMD.roccurve
PredictMD.roccurve
PredictMD.root_mean_square_error
PredictMD.save_model
PredictMD.sensitivity
PredictMD.set_feature_contrasts!
PredictMD.set_feature_contrasts!
PredictMD.set_feature_contrasts!
PredictMD.set_feature_contrasts!
PredictMD.set_max_epochs!
PredictMD.set_max_epochs!
PredictMD.shuffle_rows!
PredictMD.shuffle_rows!
PredictMD.simple_linear_regression
PredictMD.simple_moving_average
PredictMD.single_labeldataframeknetregression
PredictMD.single_labeldataframeknetregression_Knet
PredictMD.single_labeldataframelinearregression
PredictMD.single_labeldataframelinearregression_GLM
PredictMD.single_labeldataframerandomforestregression
PredictMD.single_labeldataframerandomforestregression_DecisionTree
PredictMD.single_labeldataframesvmregression
PredictMD.single_labeldataframesvmregression_LIBSVM
PredictMD.single_labelmulticlassdataframeknetclassifier
PredictMD.single_labelmulticlassdataframeknetclassifier_Knet
PredictMD.single_labelmulticlassdataframerandomforestclassifier
PredictMD.single_labelmulticlassdataframesvmclassifier
PredictMD.single_labelmulticlassdataframesvmclassifier_LIBSVM
PredictMD.single_labelmulticlassdfrandomforestclassifier_DecisionTree
PredictMD.single_labelprobabilitiestopredictions
PredictMD.singlelabelbinaryclassdataframelogisticclassifier
PredictMD.singlelabelbinaryclassdataframelogisticclassifier_GLM
PredictMD.singlelabelbinaryclassificationmetrics
PredictMD.singlelabelbinaryclassificationmetrics
PredictMD.singlelabelbinaryclassificationmetrics_resultdict
PredictMD.singlelabelbinaryclassificationmetrics_tunableparam
PredictMD.singlelabelbinaryyscore
PredictMD.singlelabelbinaryytrue
PredictMD.singlelabelregressionmetrics
PredictMD.singlelabelregressionmetrics
PredictMD.singlelabelregressionmetrics_resultdict
PredictMD.singlelabelregressionypred
PredictMD.singlelabelregressionytrue
PredictMD.smote
PredictMD.smote
PredictMD.specificity
PredictMD.split_data
PredictMD.split_data
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform
PredictMD.transform_columns!
PredictMD.trapz
PredictMD.true_negative_rate
PredictMD.true_positive_rate
PredictMD.tuplify
PredictMD.version