quicklearnkit 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quicklearnkit-0.0.1/PKG-INFO +26 -0
- quicklearnkit-0.0.1/README.md +1 -0
- quicklearnkit-0.0.1/pyproject.toml +3 -0
- quicklearnkit-0.0.1/quicklearnkit/__init__.py +2 -0
- quicklearnkit-0.0.1/quicklearnkit/classifier.py +90 -0
- quicklearnkit-0.0.1/quicklearnkit/quickimports.py +21 -0
- quicklearnkit-0.0.1/quicklearnkit/regressor.py +92 -0
- quicklearnkit-0.0.1/quicklearnkit/utils.py +39 -0
- quicklearnkit-0.0.1/quicklearnkit.egg-info/PKG-INFO +26 -0
- quicklearnkit-0.0.1/quicklearnkit.egg-info/SOURCES.txt +13 -0
- quicklearnkit-0.0.1/quicklearnkit.egg-info/dependency_links.txt +1 -0
- quicklearnkit-0.0.1/quicklearnkit.egg-info/requires.txt +3 -0
- quicklearnkit-0.0.1/quicklearnkit.egg-info/top_level.txt +1 -0
- quicklearnkit-0.0.1/setup.cfg +4 -0
- quicklearnkit-0.0.1/setup.py +24 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quicklearnkit
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A simplified interface for machine learning algorithms.
|
|
5
|
+
Home-page: https://github.com/yourusername/quicklearn
|
|
6
|
+
Author: hazi
|
|
7
|
+
Author-email: hajiafribaba@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: scikit-learn
|
|
14
|
+
Requires-Dist: pandas
|
|
15
|
+
Requires-Dist: numpy
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: requires-dist
|
|
23
|
+
Dynamic: requires-python
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
This is an upcoming wrapper library for machine learning beginners and all the enthusisasts out there who want to reduce the time taken for projects, this library works on simple principle and it is gonna save lot of time in upcoming future
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
This is an upcoming wrapper library for machine learning beginners and all the enthusisasts out there who want to reduce the time taken for projects, this library works on simple principle and it is gonna save lot of time in upcoming future
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from sklearn.linear_model import LogisticRegression as logisticregression
|
|
2
|
+
from sklearn.neighbors import KNeighborsClassifier as knnclassifier
|
|
3
|
+
from sklearn.tree import DecisionTreeClassifier as decisiontreeclassifier
|
|
4
|
+
from sklearn.ensemble import RandomForestClassifier as randomforestclassifier
|
|
5
|
+
from sklearn.ensemble import GradientBoostingClassifier as gradientboostingclassifier
|
|
6
|
+
from sklearn.ensemble import AdaBoostClassifier as adaboostclassifier
|
|
7
|
+
from xgboost import XGBClassifier as xgboostclassifier
|
|
8
|
+
from sklearn.svm import SVC as supportvectorclassifer
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LogisticRegressionmodel:
|
|
12
|
+
def __init__(self, **kwargs):
|
|
13
|
+
self.model = logisticregression(**kwargs)
|
|
14
|
+
|
|
15
|
+
def fit(self, X,y):
|
|
16
|
+
self.model.fit(X,y)
|
|
17
|
+
|
|
18
|
+
def predict(self,X):
|
|
19
|
+
self.model.predict(X)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class KNeighborsClassifiermodel:
|
|
23
|
+
def __init__(self, **kwargs):
|
|
24
|
+
self.model = knnclassifier(**kwargs)
|
|
25
|
+
|
|
26
|
+
def fit(self, X,y):
|
|
27
|
+
self.model.fit(X,y)
|
|
28
|
+
|
|
29
|
+
def predict(self,X):
|
|
30
|
+
self.model.predict(X)
|
|
31
|
+
|
|
32
|
+
class DecisionTreeClassifiermodel:
|
|
33
|
+
def __init__(self, **kwargs):
|
|
34
|
+
self.model = decisiontreeclassifier(**kwargs)
|
|
35
|
+
|
|
36
|
+
def fit(self,X,y):
|
|
37
|
+
self.model.fit(X,y)
|
|
38
|
+
|
|
39
|
+
def predict(self, X):
|
|
40
|
+
self.model.predict(X)
|
|
41
|
+
|
|
42
|
+
class RandomForestClassifiermodel:
|
|
43
|
+
def __init__(self, **kwargs):
|
|
44
|
+
self.model = randomforestclassifier(**kwargs)
|
|
45
|
+
|
|
46
|
+
def fit(self, X,y):
|
|
47
|
+
self.model.fit(X,y)
|
|
48
|
+
|
|
49
|
+
def predict(self, X):
|
|
50
|
+
self.model.predict(X)
|
|
51
|
+
|
|
52
|
+
class GradientBoostingClassifiermodel:
|
|
53
|
+
def __init__(self, **kwargs):
|
|
54
|
+
self.model = gradientboostingclassifier(**kwargs)
|
|
55
|
+
|
|
56
|
+
def fit(self, X,y):
|
|
57
|
+
self.model.fit(X,y)
|
|
58
|
+
|
|
59
|
+
def predict(self, X):
|
|
60
|
+
self.model.predict(X)
|
|
61
|
+
|
|
62
|
+
class AdaBoostClassifiermodel:
|
|
63
|
+
def __init__(self, **kwargs):
|
|
64
|
+
self.model = adaboostclassifier(**kwargs)
|
|
65
|
+
|
|
66
|
+
def fit(self, X,y):
|
|
67
|
+
self.model.fit(X,y)
|
|
68
|
+
|
|
69
|
+
def predict(self, X):
|
|
70
|
+
self.model.predict(X)
|
|
71
|
+
|
|
72
|
+
class SVClassifiermodel:
|
|
73
|
+
def __init__(self, **kwargs):
|
|
74
|
+
self.model = supportvectorclassifer(**kwargs)
|
|
75
|
+
|
|
76
|
+
def fit(self, X,y):
|
|
77
|
+
self.model.fit(X,y)
|
|
78
|
+
|
|
79
|
+
def predict(self, X):
|
|
80
|
+
self.model.predict(X)
|
|
81
|
+
|
|
82
|
+
class XGBClassifiermodel:
|
|
83
|
+
def __init__(self, **kwargs):
|
|
84
|
+
self.model = xgboostclassifier(**kwargs)
|
|
85
|
+
|
|
86
|
+
def fit (self, X,y):
|
|
87
|
+
self.model.fit(X,y)
|
|
88
|
+
|
|
89
|
+
def predict(self, X):
|
|
90
|
+
self.model.fit(X)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#from .regression import LinearRegression, KNeighborsRegression, DecisionTreeRegression, RandomForestRegression, AdaBoostRegression, GradientBoostingRegression, XGBRegressor,SVR
|
|
2
|
+
#from .classifier import LogisticRegression, KNeighborsClassifier, DecisionTreeClassifier, RandomForestClassifier, AdaBoostClassifier, GradientBoostingClassifier, XGBClassifier, SVC
|
|
3
|
+
|
|
4
|
+
#__all__= [
|
|
5
|
+
# 'LinearRegression', ' KNeighborsRegressor', 'DecisionTreeRegressor', 'RandomForestRegressor', 'AdaBoostRegressor', 'GradientBoostingRegressor', 'XGBRegressor', 'SVR',
|
|
6
|
+
# 'LogisticRegression', 'KNeighborsClassifier', 'DecisionTreeClassifier', 'RandomForestClassifier', 'AdaBoostClassifier', 'GradientBoostingClassifier', 'XGBClassifier', 'SVC'
|
|
7
|
+
#]
|
|
8
|
+
|
|
9
|
+
from .regressor import LinearRegressionmodel, KNNRegressionmodel, DecisionTreeRegressionmodel, RandomForestRegressionmodel, GradientBoostingRegressionmodel, AdaBoostRegressionmodel, XGBoostRegressionmodel, ElasticNetRegressionmodel
|
|
10
|
+
from .classifier import LogisticRegressionmodel, KNeighborsClassifiermodel, DecisionTreeClassifiermodel, RandomForestClassifiermodel, AdaBoostClassifiermodel, GradientBoostingClassifiermodel, XGBClassifiermodel, SVClassifiermodel
|
|
11
|
+
from .utils import create_random
|
|
12
|
+
|
|
13
|
+
__all__=[
|
|
14
|
+
'LinearRegressionmodel','LogisticRegressionmodel', 'KNNRegressionmodel','GradientBoostingRegressionmodel',
|
|
15
|
+
'AdaBoostRegressionmodel', 'XGBoostRegressionmodel', 'ElasticNetRegressionmodel',
|
|
16
|
+
'DecisionTreeRegressionmodel', 'RandomForestRegressionmodel',
|
|
17
|
+
'KNeighborsClassifiermodel', 'DecisionTreeClassifiermodel', 'RandomForestClassifiermodel','AdaBoostClassifiermodel',
|
|
18
|
+
'GradientBoostingClassifiermodel', 'XGBClassifiermodel', 'SVClassifiermodel',
|
|
19
|
+
'create_random'
|
|
20
|
+
]
|
|
21
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from sklearn.linear_model import LinearRegression as linearregression
|
|
2
|
+
from sklearn.neighbors import KNeighborsRegressor as knnregressor
|
|
3
|
+
from sklearn.tree import DecisionTreeRegressor as decisiontreeregressor
|
|
4
|
+
from sklearn.ensemble import RandomForestRegressor as randomforestregressor
|
|
5
|
+
from sklearn.ensemble import GradientBoostingRegressor as gradientboostingregressor
|
|
6
|
+
from sklearn.ensemble import AdaBoostRegressor as adaboostregressor
|
|
7
|
+
from xgboost import XGBRegressor as xgboostregressor
|
|
8
|
+
from sklearn.svm import SVR as supportvectorregressor
|
|
9
|
+
from sklearn.linear_model import ElasticNet as elasticnetregressor
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LinearRegressionmodel:
|
|
14
|
+
def __init__(self, **kwargs):
|
|
15
|
+
self.model = linearregression(**kwargs)
|
|
16
|
+
|
|
17
|
+
def fit(self, X,y):
|
|
18
|
+
self.model.fit(X,y)
|
|
19
|
+
|
|
20
|
+
def predict(self,X):
|
|
21
|
+
self.model.predict(X)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class KNNRegressionmodel:
|
|
25
|
+
def __init__(self, **kwargs):
|
|
26
|
+
self.model = knnregressor(**kwargs)
|
|
27
|
+
|
|
28
|
+
def fit(self, X, y):
|
|
29
|
+
self.model.fit(X,y)
|
|
30
|
+
|
|
31
|
+
def predict(self, X):
|
|
32
|
+
self.model.predict(X)
|
|
33
|
+
|
|
34
|
+
class DecisionTreeRegressionmodel:
|
|
35
|
+
def __init__(self, **kwargs):
|
|
36
|
+
self.model = decisiontreeregressor(**kwargs)
|
|
37
|
+
|
|
38
|
+
def fit(self,X,y):
|
|
39
|
+
self.model.fit(X,y)
|
|
40
|
+
|
|
41
|
+
def predict(self, X):
|
|
42
|
+
self.model.predict(X)
|
|
43
|
+
|
|
44
|
+
class RandomForestRegressionmodel:
|
|
45
|
+
def __init__(self, **kwargs):
|
|
46
|
+
self.model = randomforestregressor(**kwargs)
|
|
47
|
+
|
|
48
|
+
def fit(self, X, y):
|
|
49
|
+
self.model.fit(X,y)
|
|
50
|
+
|
|
51
|
+
def predict(self,X):
|
|
52
|
+
self.model.predict(X)
|
|
53
|
+
|
|
54
|
+
class GradientBoostingRegressionmodel:
|
|
55
|
+
def __init__(self, **kwargs):
|
|
56
|
+
self.model = randomforestregressor(**kwargs)
|
|
57
|
+
|
|
58
|
+
def fit(self, X, y):
|
|
59
|
+
self.model.fit(X,y)
|
|
60
|
+
|
|
61
|
+
def predict(self,X):
|
|
62
|
+
self.model.predict(X)
|
|
63
|
+
|
|
64
|
+
class AdaBoostRegressionmodel:
|
|
65
|
+
def __init__(self, **kwargs):
|
|
66
|
+
self.model = adaboostregressor(**kwargs)
|
|
67
|
+
|
|
68
|
+
def fit(self, X, y):
|
|
69
|
+
self.model.fit(X,y)
|
|
70
|
+
|
|
71
|
+
def predict(self,X):
|
|
72
|
+
self.model.predict(X)
|
|
73
|
+
|
|
74
|
+
class XGBoostRegressionmodel:
|
|
75
|
+
def __init__(self, **kwargs):
|
|
76
|
+
self.model = xgboostregressor(**kwargs)
|
|
77
|
+
|
|
78
|
+
def fit(self, X, y):
|
|
79
|
+
self.model.fit(X,y)
|
|
80
|
+
|
|
81
|
+
def predict(self,X):
|
|
82
|
+
self.model.predict(X)
|
|
83
|
+
|
|
84
|
+
class ElasticNetRegressionmodel:
|
|
85
|
+
def __init__(self, **kwargs):
|
|
86
|
+
self.model = elasticnetregressor(**kwargs)
|
|
87
|
+
|
|
88
|
+
def fit(self, X, y):
|
|
89
|
+
self.model.fit(X,y)
|
|
90
|
+
|
|
91
|
+
def predict(self,X):
|
|
92
|
+
self.model.predict(X)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
def create_random(mean, std, size, random_state=None):
|
|
4
|
+
"""
|
|
5
|
+
Generate random data with a specified mean and standard deviation.
|
|
6
|
+
|
|
7
|
+
Parameters:
|
|
8
|
+
mean (float): Desired mean of the data.
|
|
9
|
+
std (float): Desired standard deviation of the data.
|
|
10
|
+
size (int): Length of the data to generate.
|
|
11
|
+
random_state (int, optional): Seed for reproducibility. Defaults to None.
|
|
12
|
+
|
|
13
|
+
Returns:
|
|
14
|
+
dict: A dictionary containing:
|
|
15
|
+
- "data": Random data with the specified mean and standard deviation.
|
|
16
|
+
- "mean": Actual mean of the generated data.
|
|
17
|
+
- "std": Actual standard deviation of the generated data.
|
|
18
|
+
|
|
19
|
+
Raises:
|
|
20
|
+
ValueError: If std is negative or size is not a positive integer.
|
|
21
|
+
"""
|
|
22
|
+
if std < 0:
|
|
23
|
+
raise ValueError("Standard deviation must be non-negative.")
|
|
24
|
+
if size <= 0:
|
|
25
|
+
raise ValueError("Size must be a positive integer.")
|
|
26
|
+
|
|
27
|
+
# Create a random number generator instance
|
|
28
|
+
rng = np.random.default_rng(random_state)
|
|
29
|
+
|
|
30
|
+
# Generate random normal data
|
|
31
|
+
x = rng.normal(size=size)
|
|
32
|
+
x1 = (x - np.mean(x)) / np.std(x)
|
|
33
|
+
x2 = (x1 * std) + mean
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
"data": x2,
|
|
37
|
+
"mean": np.mean(x2),
|
|
38
|
+
"std": np.std(x2)
|
|
39
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quicklearnkit
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A simplified interface for machine learning algorithms.
|
|
5
|
+
Home-page: https://github.com/yourusername/quicklearn
|
|
6
|
+
Author: hazi
|
|
7
|
+
Author-email: hajiafribaba@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.6
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: scikit-learn
|
|
14
|
+
Requires-Dist: pandas
|
|
15
|
+
Requires-Dist: numpy
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: requires-dist
|
|
23
|
+
Dynamic: requires-python
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
This is an upcoming wrapper library for machine learning beginners and all the enthusisasts out there who want to reduce the time taken for projects, this library works on simple principle and it is gonna save lot of time in upcoming future
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
setup.py
|
|
4
|
+
quicklearnkit/__init__.py
|
|
5
|
+
quicklearnkit/classifier.py
|
|
6
|
+
quicklearnkit/quickimports.py
|
|
7
|
+
quicklearnkit/regressor.py
|
|
8
|
+
quicklearnkit/utils.py
|
|
9
|
+
quicklearnkit.egg-info/PKG-INFO
|
|
10
|
+
quicklearnkit.egg-info/SOURCES.txt
|
|
11
|
+
quicklearnkit.egg-info/dependency_links.txt
|
|
12
|
+
quicklearnkit.egg-info/requires.txt
|
|
13
|
+
quicklearnkit.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
quicklearnkit
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="quicklearnkit", # Package name
|
|
5
|
+
version="0.0.1", # Initial version
|
|
6
|
+
author="hazi", # Your name
|
|
7
|
+
author_email="hajiafribaba@gmail.com", # Your email
|
|
8
|
+
description="A simplified interface for machine learning algorithms.", # Short description
|
|
9
|
+
long_description=open("README.md").read(), # Long description from README
|
|
10
|
+
long_description_content_type="text/markdown", # Format of the long description
|
|
11
|
+
url="https://github.com/yourusername/quicklearn", # Project URL
|
|
12
|
+
packages=find_packages(), # Automatically find all packages
|
|
13
|
+
install_requires=[ # List your dependencies here
|
|
14
|
+
"scikit-learn",
|
|
15
|
+
"pandas",
|
|
16
|
+
"numpy",
|
|
17
|
+
],
|
|
18
|
+
classifiers=[ # Metadata for PyPI
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
],
|
|
23
|
+
python_requires=">=3.6", # Python version compatibility
|
|
24
|
+
)
|