forked from mckinsey/causalnex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sklearn binary classifier (mckinsey#90)
* binary dtype folder and __init__ * dtype base class * continuous dtype * binary dtype * update core * make plural * update interface for idx * minor variable name change * notears update * python 3.5 support * fix fstring * remove categorical methods, doctrings * formatting and docstrings * remove redundant cat code * isort * indexerror check * defensive check tests * datatype loss tests * more test coverage * more tests and formatting * fix test import * remove double test * linting * docstring and pylint * docstring fix Co-authored-by: Zain Patel <zain.patel@quantumblack.com> * fix long string Co-authored-by: Zain Patel <zain.patel@quantumblack.com> * docstring fix Co-authored-by: Zain Patel <zain.patel@quantumblack.com> * remove relative imports * docstring fix * dict comprehension * list comprehension and neatness * remove unuesd import to __init__ * fix test * remove unused return interface * new sklearn folder structure * sklearn class outline * new dtype interface * docstring clarification * inverse link function * add binary f1score tests * one datatype instane per feature * rename dtype -> disttype, attach dists to nodes * fix tests * fix linting * fix preserve node dtyper * fix tests * fix tests * fix tests * final docstring and test fixes * lint fix * test_fix, warning * linting * fix test * fix tests * reduce threshold of test * docstring clarification * _target_dist_type injection * docstring updates + clf fit outline * old doctring deprecation * clf predict_proba and predict * return bugfix * docstring update * import fix, linting, clf fit finished * args docstring and None schema * raise better error * black linting * linting * revert to public interface * remove warning * remove useless supression and import * add useless change to resolve merge conflict * update inits * standardization and data reconstruction * remove unused imports * fix clf .precit() * regressor fit_predict * remove useless regressor predict * test import fix * fix warnings * pass series name thru * fix schema pass thru * better dict comprehension Co-authored-by: Zain Patel <zain.patel@quantumblack.com> * import and comment fixes * update to .format() * fig sklearn is fitted test * more dtype schema insertion * DAGRegressor test fix * dag regressor test * more linting * big test restructure * combined test suite * error string update * more test coverage * linting and isort * move test to combined test * return float64 preds * moar clf tests * remove untestable (multiclass) code * class number error test * balck reformat * docstrings, pylint * fix test bug * standard scaler for _base * pull classes direct from LabelEncoder * update tutorial Co-authored-by: Zain Patel <zain.patel@quantumblack.com>
- Loading branch information
1 parent
1701a45
commit 04bceb4
Showing
13 changed files
with
862 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright 2019-2020 QuantumBlack Visual Analytics Limited | ||
# | ||
# 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 | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND | ||
# NONINFRINGEMENT. IN NO EVENT WILL THE LICENSOR OR OTHER CONTRIBUTORS | ||
# BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN | ||
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN | ||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
# | ||
# The QuantumBlack Visual Analytics Limited ("QuantumBlack") name and logo | ||
# (either separately or in combination, "QuantumBlack Trademarks") are | ||
# trademarks of QuantumBlack. The License does not grant you any right or | ||
# license to the QuantumBlack Trademarks. You may not use the QuantumBlack | ||
# Trademarks or any confusingly similar mark as a trademark for your product, | ||
# or use the QuantumBlack Trademarks in any other manner that might cause | ||
# confusion in the marketplace, including but not limited to in advertising, | ||
# on websites, or on software. | ||
# | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
""" | ||
``causalnex.structure.pytorch.sklearn`` provides sklearn style functionality to NOTEARS. | ||
""" | ||
|
||
__all__ = ["DAGRegressor", "DAGClassifier"] | ||
|
||
from .clf import DAGClassifier | ||
from .reg import DAGRegressor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.