Esempio n. 1
0
    def test_algorithms_for_target_depression(self):
        print("precision score")
        print("\n\n\n depression_cutoff \n")
        target = "depression_cutoff"
        multiple_features_eda = EDAMultiFeatureBackend(
            self.df, self.features + self.features_2, target)
        print("\n depression_cutoff with resample\nn=10")
        multiple_features_eda.model_checking(10, scoring='precision')
        print("\n depression_cutoff without resample\nn=10")
        multiple_features_eda.model_checking_without_resampling(
            10, scoring='precision')

        print("\n depression_cutoff with resample\nn=20")
        multiple_features_eda.model_checking(20, scoring='precision')
        print("\n depression_cutoff without resample\nn=20")
        multiple_features_eda.model_checking_without_resampling(
            20, scoring='precision')

        print("\n depression_cutoff with resample\nn=30")
        multiple_features_eda.model_checking(30, scoring='precision')
        print("\n depression_cutoff without resample\nn=30")
        multiple_features_eda.model_checking_without_resampling(
            30, scoring='precision')

        print("depression_cutoff logreg f1 score")
        multiple_features_eda.logistic_regression_grid_search()
        print("depression_cutoff logreg precision score")
        multiple_features_eda.logistic_regression_grid_search(
            scoring='precision')
Esempio n. 2
0
    def test_algorithms_for_target_diagnosis(self):
        print("precision score")
        print("\n\n\n diagnosis \n")
        target = "diagnosis"
        multiple_features_eda = EDAMultiFeatureBackend(self.df, self.features + self.features_2, target)
        print("\n diagnosis with resample\nn=10")
        multiple_features_eda.model_checking(10, scoring='precision')
        print("\n diagnosis without resample\nn=10")
        multiple_features_eda.model_checking_without_resampling(10, scoring='precision')

        print("\n diagnosis with resample\nn=20")
        multiple_features_eda.model_checking(20, scoring='precision')
        print("\n diagnosis without resample\nn=20")
        multiple_features_eda.model_checking_without_resampling(20, scoring='precision')

        print("\n diagnosis with resample\nn=30")
        multiple_features_eda.model_checking(30, scoring='precision')
        print("\n diagnosis without resample\nn=30")
        multiple_features_eda.model_checking_without_resampling(30, scoring='precision')
Esempio n. 3
0
    def test_algorithms_for_target_diagnosis(self):
        print("precision score")
        print("\n\n\n diagnosis \n")
        target = "diagnosis"
        multiple_features_eda = EDAMultiFeatureBackend(
            self.df, self.features + self.features_2, target)
        print("\n diagnosis with resample\nn=10")
        multiple_features_eda.model_checking(10, scoring='precision')
        print("\n diagnosis without resample\nn=10")
        multiple_features_eda.model_checking_without_resampling(
            10, scoring='precision')

        print("\n diagnosis with resample\nn=20")
        multiple_features_eda.model_checking(20, scoring='precision')
        print("\n diagnosis without resample\nn=20")
        multiple_features_eda.model_checking_without_resampling(
            20, scoring='precision')

        print("\n diagnosis with resample\nn=30")
        multiple_features_eda.model_checking(30, scoring='precision')
        print("\n diagnosis without resample\nn=30")
        multiple_features_eda.model_checking_without_resampling(
            30, scoring='precision')
Esempio n. 4
0
    def test_algorithms_for_target_depression(self):
        print("precision score")
        print("\n\n\n depression_cutoff \n")
        target = "depression_cutoff"
        multiple_features_eda = EDAMultiFeatureBackend(self.df, self.features + self.features_2, target)
        print("\n depression_cutoff with resample\nn=10")
        multiple_features_eda.model_checking(10, scoring='precision')
        print("\n depression_cutoff without resample\nn=10")
        multiple_features_eda.model_checking_without_resampling(10, scoring='precision')

        print("\n depression_cutoff with resample\nn=20")
        multiple_features_eda.model_checking(20, scoring='precision')
        print("\n depression_cutoff without resample\nn=20")
        multiple_features_eda.model_checking_without_resampling(20, scoring='precision')

        print("\n depression_cutoff with resample\nn=30")
        multiple_features_eda.model_checking(30, scoring='precision')
        print("\n depression_cutoff without resample\nn=30")
        multiple_features_eda.model_checking_without_resampling(30, scoring='precision')

        print("depression_cutoff logreg f1 score")
        multiple_features_eda.logistic_regression_grid_search()
        print("depression_cutoff logreg precision score")
        multiple_features_eda.logistic_regression_grid_search(scoring='precision')