Skip to content

Commit

Permalink
changed license to Apache 2 per daal4py license
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Nov 26, 2018
1 parent fc1a576 commit a4d5673
Show file tree
Hide file tree
Showing 13 changed files with 218 additions and 17 deletions.
29 changes: 13 additions & 16 deletions daal4py/__main__.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
#!/usr/bin/env python
#
# Copyright 2016-2018 Intel Corporation. All Rights Reserved.
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# The source code contained or described herein and all documents related
# to the source code ("Material") are owned by Intel Corporation or its
# suppliers or licensors. Title to the Material remains with Intel
# Corporation or its suppliers and licensors. The Material is protected
# by worldwide copyright laws and treaty provisions. No part of the
# Material may be used, copied, reproduced, modified, published, uploaded,
# posted, transmitted, distributed, or disclosed in any way without
# Intel's prior express written permission.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# No license under any patent, copyright, trade secret or other
# intellectual property right is granted to or conferred upon you by
# disclosure or delivery of the Materials, either expressly, by
# implication, inducement, estoppel or otherwise. Any license under such
# intellectual property rights must be express and approved by Intel in
# writing.

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import sys
from .sklearn import patch_sklearn
Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

from .decision_forest import (DaalRandomForestClassifier, DaalRandomForestRegressor)
from .monkeypatch.dispatcher import enable as patch_sklearn
from .monkeypatch.dispatcher import disable as unpatch_sklearn
Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/decision_forest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import numpy as np
from sklearn.externals.six import string_types
import numbers
Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/monkeypatch/dispatcher.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

from sklearn import __version__ as sklearn_version
from distutils.version import LooseVersion

Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/monkeypatch/k_means.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import numpy as np
from scipy import sparse as sp
from sklearn.utils import (check_random_state, check_array)
Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/monkeypatch/linear.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import numpy as np
from scipy import sparse as sp
from scipy import linalg
Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/monkeypatch/logistic_loss.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import numpy as np

import sklearn
Expand Down
18 changes: 18 additions & 0 deletions daal4py/sklearn/monkeypatch/logistic_path.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import numpy as np
import scipy.sparse as sparse
import scipy.optimize as optimize
Expand Down Expand Up @@ -25,6 +42,7 @@

use_daal = True

# Code adapted from sklearn.linear_model.logistic
def logistic_regression_path(X, y, pos_class=None, Cs=10, fit_intercept=True,
max_iter=100, tol=1e-4, verbose=0,
solver='lbfgs', coef=None,
Expand Down
18 changes: 17 additions & 1 deletion daal4py/sklearn/monkeypatch/pairwise.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# from sklearn.metrics.pairwise import *
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

from sklearn.metrics.pairwise import _parallel_pairwise, _pairwise_callable
from sklearn.metrics.pairwise import _VALID_METRICS

Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/monkeypatch/pca.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import numpy as np
from sklearn import decomposition
from sklearn.decomposition.pca import *
Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/monkeypatch/ridge.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import numpy as np
from scipy import sparse as sp
from sklearn.utils import check_array, check_X_y
Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/monkeypatch/svm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

from __future__ import print_function

import numpy as np
Expand Down
17 changes: 17 additions & 0 deletions daal4py/sklearn/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
#
#*******************************************************************************
# Copyright 2014-2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#******************************************************************************/

import numpy as np

def getFPType(X):
Expand Down

0 comments on commit a4d5673

Please sign in to comment.