Skip to content

Commit

Permalink
Cleaned Up PHOTON
Browse files Browse the repository at this point in the history
Reassured all examples are working
  • Loading branch information
RLeenings committed Jun 5, 2019
1 parent c44a5ec commit 12f6f57
Show file tree
Hide file tree
Showing 39 changed files with 16 additions and 24,226 deletions.
12 changes: 10 additions & 2 deletions photonai/base/PhotonBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,7 @@ def transform(self, X, y=None, **kwargs):
elif hasattr(self.base_element, 'predict', **kwargs):
# Logger().warn("used prediction instead of transform " + self.name)
# raise Warning()
return self.base_element.predict(X)
return self.base_element.predict(X), y, kwargs
else:
Logger().error('BaseException: transform-predict-mess')
raise BaseException('transform-predict-mess')
Expand Down Expand Up @@ -1956,7 +1956,7 @@ def predict(self, data, targets=None, **kwargs):
# todo: parallelize prediction
predicted_data = np.array([])
for name, element in self.pipe_elements.items():
element_transform, _, _ = element.predict(data, **kwargs)
element_transform = element.predict(data, **kwargs)
predicted_data = PipelineStacking.stack_data(predicted_data, element_transform)
if self.voting:
if hasattr(predicted_data, 'shape'):
Expand Down Expand Up @@ -2217,6 +2217,14 @@ def set_params(self, **kwargs):
self.base_element.set_params(**unnamed_config)
return self

def copy_me(self):

ps = PipelineSwitch(self.name)
for element in self.pipeline_element_list:
new_element = element.copy_me()
ps += new_element
return ps

def prettify_config_output(self, config_name, config_value, return_dict=False):

"""
Expand Down
2 changes: 1 addition & 1 deletion photonai/base/PhotonBatchElement.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .PhotonBase import PipelineElement
from ..photonlogger import Logger
from ..photonlogger.Logger import Logger
import numpy as np


Expand Down
57 changes: 1 addition & 56 deletions photonai/configuration/PhotonCore.json
Original file line number Diff line number Diff line change
Expand Up @@ -419,58 +419,14 @@
"photonai.modelwrapper.KerasDNNRegressor.KerasDNNRegressor",
"Estimator"
],
"SiameseDNNClassifier":[
"photonai.modelwrapper.SiameseDNNClassifier.SiameseDNNClassifier",
"Estimator"
],
"PretrainedCNNClassifier":[
"photonai.modelwrapper.PretrainedCNN.PretrainedCNNClassifier",
"Estimator"
],
"CNN1dClassifier":[
"photonai.modelwrapper.CNN1d.CNN1d",
"Estimator"
],
"TensorFlowDNNClassifier":[
"photonai.modelwrapper.TFDNNClassifier.TFDNNClassifier",
"Estimator"
],
"KerasDNNMultiOutput":[
"photonai.modelwrapper.KerasDNNMultiOutput.KerasDNNMultiOutput",
"Estimator"
],
"SimpleAutoencoder":[
"photonai.modelwrapper.KerasAutoencoder.SimpleAutoencoder",
"Estimator"
],
"RLCNN":[
"photonai.modelwrapper.RLCNN.RLCNN",
"Estimator"
],
"WrapperModel":[
"photonai.modelwrapper.WrapperModel.WrapperModel",
"Estimator"
],
"LogisticGWASFeatureSelection":[
"photonai.modelwrapper.FeatureSelection.LogisticGWASFeatureSelection",
"Transformer"
],
"SourceSplitter":[
"photonai.modelwrapper.SourceSplitter.SourceSplitter",
"Transformer"
],
"PyESNClassifier":[
"photonai.modelwrapper.PyESNWrapper.PyESNClassifier",
"Estimator"
],
"PyESNRegressor":[
"photonai.modelwrapper.PyESNWrapper.PyESNRegressor",
"Estimator"
],
"TestWrapper":[
"photonai.modelwrapper.TestWrapper.WrapperTestElement",
"Estimator"
],
"CategorialANOVASelectPercentile":[
"photonai.modelwrapper.FeatureSelection.AnovaSelectPercentile",
"Transformer"
Expand Down Expand Up @@ -499,18 +455,10 @@
"photonai.modelwrapper.PhotonOneClassSVM.PhotonOneClassSVM",
"Estimator"
],
"Selectphotonai.modelwrapper":[
"photonai.modelwrapper.FeatureSelection.ModelSelector",
"Transformer"
],
"ImbalancedDataTransform":[
"photonai.modelwrapper.ImbalancedWrapper.ImbalancedDataTransform",
"Transformer"
],
"GPR_AM":[
"photonai.modelwrapper.GPR_AM.GPR_AM",
"Transformer"
],
"AnomalyDetectorWrapper":[
"photonai.modelwrapper.AnomalyDetectorWrapper.AnomalyDetectorWrapper",
"Estimator"
Expand All @@ -526,9 +474,6 @@
"SamplePairingClassification": [
"photonai.modelwrapper.SamplePairing.SamplePairingClassification",
"Transformer"
],
"PretrainedCNNRegressor": [
"photonai.modelwrapper.PretrainedCNN.PretrainedCNNRegressor",
"Estimator"
]

}
Empty file removed photonai/documentation/__init__.py
Empty file.
Loading

0 comments on commit 12f6f57

Please sign in to comment.