-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add base for sklearn frontend with methods to override
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import ivy | ||
from ivy.functional.frontends.numpy import array | ||
|
||
_int8 = ivy.IntDtype("int8") | ||
_int16 = ivy.IntDtype("int16") | ||
_int32 = ivy.IntDtype("int32") | ||
_int64 = ivy.IntDtype("int64") | ||
_uint8 = ivy.UintDtype("uint8") | ||
_uint16 = ivy.UintDtype("uint16") | ||
_uint32 = ivy.UintDtype("uint32") | ||
_uint64 = ivy.UintDtype("uint64") | ||
_bfloat16 = ivy.FloatDtype("bfloat16") | ||
_float16 = ivy.FloatDtype("float16") | ||
_float32 = ivy.FloatDtype("float32") | ||
_float64 = ivy.FloatDtype("float64") | ||
_complex64 = ivy.ComplexDtype("complex64") | ||
_complex128 = ivy.ComplexDtype("complex128") | ||
_bool = ivy.Dtype("bool") | ||
|
||
_frontend_array = array |
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,30 @@ | ||
class BaseEstimator: | ||
def get_params(self, deep=True): | ||
return {} | ||
|
||
def set_params(self, **params): | ||
return self | ||
|
||
|
||
class ClassifierMixin: | ||
|
||
def score(self, X, y, sample_weight=None): | ||
raise NotImplementedError | ||
|
||
def fit(self, X, y, **kwargs): | ||
raise NotImplementedError | ||
|
||
def predict(self, X): | ||
raise NotImplementedError | ||
|
||
|
||
class RegressorMixin: | ||
|
||
def score(self, X, y, sample_weight=None): | ||
raise NotImplementedError | ||
|
||
def fit(self, X, y, **kwargs): | ||
raise NotImplementedError | ||
|
||
def predict(self, X): | ||
raise NotImplementedError |
Empty file.