Skip to content

Commit

Permalink
import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMoreo committed Feb 14, 2023
1 parent ee6af04 commit 8fc4669
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 19 deletions.
8 changes: 4 additions & 4 deletions examples/custom_quantifier.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import quapy as qp
from data import LabelledCollection
from method.base import BaseQuantifier, BinaryQuantifier
from model_selection import GridSearchQ
from quapy.method.aggregative import PACC, AggregativeProbabilisticQuantifier
from quapy.data import LabelledCollection
from quapy.method.base import BinaryQuantifier
from quapy.model_selection import GridSearchQ
from quapy.method.aggregative import AggregativeProbabilisticQuantifier
from quapy.protocol import APP
import numpy as np
from sklearn.linear_model import LogisticRegression
Expand Down
9 changes: 4 additions & 5 deletions examples/lequa2022_experiments.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import numpy as np
from sklearn.calibration import CalibratedClassifierCV
from sklearn.linear_model import LogisticRegression
import quapy as qp
import quapy.functional as F
from data.datasets import LEQUA2022_SAMPLE_SIZE, fetch_lequa2022
from evaluation import evaluation_report
from method.aggregative import EMQ
from model_selection import GridSearchQ
from quapy.data.datasets import LEQUA2022_SAMPLE_SIZE, fetch_lequa2022
from quapy.evaluation import evaluation_report
from quapy.method.aggregative import EMQ
from quapy.model_selection import GridSearchQ
import pandas as pd

"""
Expand Down
8 changes: 3 additions & 5 deletions quapy/method/aggregative.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
from copy import deepcopy
from typing import Callable, Union
import numpy as np
from joblib import Parallel, delayed
from scipy import optimize
from sklearn.base import BaseEstimator, clone
from sklearn.base import BaseEstimator
from sklearn.calibration import CalibratedClassifierCV
from sklearn.metrics import confusion_matrix
from sklearn.model_selection import StratifiedKFold, cross_val_predict
from tqdm import tqdm
from sklearn.model_selection import cross_val_predict
import quapy as qp
import quapy.functional as F
from classification.calibration import NBVSCalibration, BCTSCalibration, TSCalibration, VSCalibration
from quapy.classification.calibration import NBVSCalibration, BCTSCalibration, TSCalibration, VSCalibration
from quapy.classification.svmperf import SVMperf
from quapy.data import LabelledCollection
from quapy.method.base import BaseQuantifier, BinaryQuantifier, OneVsAllGeneric
Expand Down
3 changes: 1 addition & 2 deletions quapy/method/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from tqdm import tqdm

import quapy as qp
from evaluation import evaluate_on_samples
from quapy import functional as F
from quapy.data import LabelledCollection
from quapy.model_selection import GridSearchQ
Expand Down Expand Up @@ -178,7 +177,7 @@ def _accuracy_policy(self, error_name):
For each model in the ensemble, the performance is measured in terms of _error_name_ on the quantification of
the samples used for training the rest of the models in the ensemble.
"""
from quapy.evaluation import evaluate
from quapy.evaluation import evaluate_on_samples
error = qp.error.from_name(error_name)
tests = [m[3] for m in self.ensemble]
scores = []
Expand Down
2 changes: 1 addition & 1 deletion quapy/method/neural.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from torch.nn import MSELoss
from torch.nn.functional import relu

from protocol import UPP
from quapy.protocol import UPP
from quapy.method.aggregative import *
from quapy.util import EarlyStop

Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def get_version(rel_path):
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")

# Arguments marked as "Required" below must be included for upload to PyPI.
# Fields marked as "Optional" may be commented out.

Expand Down Expand Up @@ -114,7 +115,7 @@ def get_version(rel_path):

python_requires='>=3.6, <4',

install_requires=['scikit-learn', 'pandas', 'tqdm', 'matplotlib'],
install_requires=['scikit-learn', 'pandas', 'tqdm', 'matplotlib', 'joblib', 'xlrd', 'abstention'],

# List additional groups of dependencies here (e.g. development
# dependencies). Users will be able to install these using the "extras"
Expand Down Expand Up @@ -158,7 +159,8 @@ def get_version(rel_path):
project_urls={ # Optional
'Contributors': 'https://github.com/HLT-ISTI/QuaPy/graphs/contributors',
'Bug Reports': 'https://github.com/HLT-ISTI/QuaPy/issues',
'Documentation': 'https://github.com/HLT-ISTI/QuaPy/wiki',
'Wiki': 'https://github.com/HLT-ISTI/QuaPy/wiki',
'Documentation': 'https://hlt-isti.github.io/QuaPy/build/html/index.html',
'Source': 'https://github.com/HLT-ISTI/QuaPy/',
},
)

0 comments on commit 8fc4669

Please sign in to comment.