sklearn-fluent 0.2__tar.gz → 0.4__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.
- {sklearn_fluent-0.2 → sklearn_fluent-0.4}/PKG-INFO +11 -6
- sklearn_fluent-0.4/README.md +31 -0
- {sklearn_fluent-0.2 → sklearn_fluent-0.4}/setup.py +3 -3
- sklearn_fluent-0.4/sklearn_fluent/__init__.py +1 -0
- sklearn_fluent-0.4/sklearn_fluent/main.py +46 -0
- {sklearn_fluent-0.2 → sklearn_fluent-0.4}/sklearn_fluent.egg-info/PKG-INFO +12 -7
- sklearn_fluent-0.4/sklearn_fluent.egg-info/requires.txt +1 -0
- sklearn_fluent-0.2/README.md +0 -8
- sklearn_fluent-0.2/sklearn_fluent/__init__.py +0 -1
- sklearn_fluent-0.2/sklearn_fluent/main.py +0 -50
- sklearn_fluent-0.2/sklearn_fluent.egg-info/requires.txt +0 -1
- {sklearn_fluent-0.2 → sklearn_fluent-0.4}/setup.cfg +0 -0
- {sklearn_fluent-0.2 → sklearn_fluent-0.4}/sklearn_fluent.egg-info/SOURCES.txt +0 -0
- {sklearn_fluent-0.2 → sklearn_fluent-0.4}/sklearn_fluent.egg-info/dependency_links.txt +0 -0
- {sklearn_fluent-0.2 → sklearn_fluent-0.4}/sklearn_fluent.egg-info/top_level.txt +0 -0
@@ -1,13 +1,10 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: sklearn_fluent
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4
|
4
4
|
Summary: Linear/Multli Regression Mathematical Function in one line of code
|
5
|
-
Home-page: UNKNOWN
|
6
5
|
Author: YusiferZendric (Aditya Singh)
|
7
6
|
Author-email: <yzendric@gmail.com>
|
8
|
-
License: UNKNOWN
|
9
7
|
Keywords: python,sklearn,mathematical functions,functions,linear regressions
|
10
|
-
Platform: UNKNOWN
|
11
8
|
Classifier: Development Status :: 1 - Planning
|
12
9
|
Classifier: Intended Audience :: Developers
|
13
10
|
Classifier: Programming Language :: Python :: 3
|
@@ -15,6 +12,14 @@ Classifier: Operating System :: Unix
|
|
15
12
|
Classifier: Operating System :: MacOS :: MacOS X
|
16
13
|
Classifier: Operating System :: Microsoft :: Windows
|
17
14
|
Description-Content-Type: text/markdown
|
15
|
+
Requires-Dist: scikit-learn
|
16
|
+
Dynamic: author
|
17
|
+
Dynamic: author-email
|
18
|
+
Dynamic: classifier
|
19
|
+
Dynamic: description
|
20
|
+
Dynamic: description-content-type
|
21
|
+
Dynamic: keywords
|
22
|
+
Dynamic: requires-dist
|
23
|
+
Dynamic: summary
|
18
24
|
|
19
25
|
Just provide x and y list and there you have it the Mathemtical function + accuracy based on the x and y list.
|
20
|
-
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# sklearn_fluent
|
2
|
+
Just provide x and y list and there you have it the Mathemtical function + accuracy based on the x and y list.
|
3
|
+
|
4
|
+
## You can get it at [sklearn_fluent](https://pypi.org/project/sklearn-fluent/0.0.1/)
|
5
|
+
or
|
6
|
+
``` bash
|
7
|
+
pip install sklearn_fluent
|
8
|
+
```
|
9
|
+
|
10
|
+
# Usage
|
11
|
+
``` python
|
12
|
+
from sklearn_fluent import fluent_it
|
13
|
+
# for linear_regression
|
14
|
+
xlist = [4,123,21,312,313]
|
15
|
+
ylist = [21,23,124,12,31]
|
16
|
+
fluent_it(xlist,ylist,linearreg=True)
|
17
|
+
```
|
18
|
+
Result:
|
19
|
+
```bash
|
20
|
+
>> 'function: -0.1494a + 65.3014'
|
21
|
+
```
|
22
|
+
``` python
|
23
|
+
# for multi_regression
|
24
|
+
xlist = [[432,423,42],[14,213,32],[2432,23,2]]
|
25
|
+
ylist = [5,234,212]
|
26
|
+
fluent_it(xlisst,ylist,linearreg=False)
|
27
|
+
```
|
28
|
+
Result:
|
29
|
+
```bash
|
30
|
+
>> 'function: -0.0824a + -0.9238b + -0.0571c + 433.7416'
|
31
|
+
```
|
@@ -3,7 +3,7 @@ import codecs
|
|
3
3
|
import os
|
4
4
|
|
5
5
|
|
6
|
-
VERSION = '0.
|
6
|
+
VERSION = '0.4'
|
7
7
|
DESCRIPTION = 'Linear/Multli Regression Mathematical Function in one line of code'
|
8
8
|
LONG_DESCRIPTION = 'Just provide x and y list and there you have it the Mathemtical function + accuracy based on the x and y list.'
|
9
9
|
|
@@ -17,7 +17,7 @@ setup(
|
|
17
17
|
long_description_content_type="text/markdown",
|
18
18
|
long_description=LONG_DESCRIPTION,
|
19
19
|
packages=find_packages(),
|
20
|
-
install_requires=['
|
20
|
+
install_requires=['scikit-learn'],
|
21
21
|
keywords=['python', 'sklearn', 'mathematical functions', 'functions', 'linear regressions'],
|
22
22
|
classifiers=[
|
23
23
|
"Development Status :: 1 - Planning",
|
@@ -27,4 +27,4 @@ setup(
|
|
27
27
|
"Operating System :: MacOS :: MacOS X",
|
28
28
|
"Operating System :: Microsoft :: Windows",
|
29
29
|
]
|
30
|
-
)
|
30
|
+
)
|
@@ -0,0 +1 @@
|
|
1
|
+
from .main import req
|
@@ -0,0 +1,46 @@
|
|
1
|
+
def req(xlist, ylist, linearreg):
|
2
|
+
from sklearn.linear_model import LinearRegression
|
3
|
+
import numpy as np
|
4
|
+
|
5
|
+
if linearreg == True:
|
6
|
+
if len(ylist) > 50:
|
7
|
+
from sklearn.model_selection import train_test_split
|
8
|
+
x_train, x_test, y_train, y_test = train_test_split(np.array(xlist).reshape(-1, 1), np.array(ylist).reshape(-1, 1), test_size=0.2)
|
9
|
+
model = LinearRegression()
|
10
|
+
model.fit(x_train, y_train)
|
11
|
+
accuracy = round(model.score(x_test, y_test))
|
12
|
+
|
13
|
+
x_train = np.array(xlist).reshape(-1, 1)
|
14
|
+
y_train = np.array(ylist).reshape(-1, 1)
|
15
|
+
model = LinearRegression()
|
16
|
+
model.fit(x_train, y_train)
|
17
|
+
elif linearreg == False:
|
18
|
+
x_train = np.array(xlist)
|
19
|
+
y_train = np.array(ylist)
|
20
|
+
model = LinearRegression()
|
21
|
+
model.fit(x_train, y_train)
|
22
|
+
|
23
|
+
a = model.intercept_
|
24
|
+
b = model.coef_
|
25
|
+
letters = list('abcdefghijklmnopqrstuvwxyz')
|
26
|
+
reqletters = []
|
27
|
+
for i in range(0, len(b)):
|
28
|
+
reqletters.append(letters[i])
|
29
|
+
newvars = []
|
30
|
+
for i in range(len(reqletters)):
|
31
|
+
try:
|
32
|
+
new = str(round(b[0][i], 4)) + reqletters[i] # Extract single element
|
33
|
+
except:
|
34
|
+
new = str(round(float(b[0][0]), 4)) + reqletters[i] # Extract single element
|
35
|
+
newvars.append(new)
|
36
|
+
try:
|
37
|
+
mainvar = round(a[0], 4) # Extract single element
|
38
|
+
except:
|
39
|
+
mainvar = round(float(a[0]), 4)
|
40
|
+
newvars.append(mainvar)
|
41
|
+
last = " + ".join(list(map(str, newvars)))
|
42
|
+
|
43
|
+
try:
|
44
|
+
return f"function: {last}\naccuracy: {accuracy * 100}%"
|
45
|
+
except:
|
46
|
+
return f"function: {last}"
|
@@ -1,13 +1,10 @@
|
|
1
|
-
Metadata-Version: 2.
|
2
|
-
Name:
|
3
|
-
Version: 0.
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: sklearn_fluent
|
3
|
+
Version: 0.4
|
4
4
|
Summary: Linear/Multli Regression Mathematical Function in one line of code
|
5
|
-
Home-page: UNKNOWN
|
6
5
|
Author: YusiferZendric (Aditya Singh)
|
7
6
|
Author-email: <yzendric@gmail.com>
|
8
|
-
License: UNKNOWN
|
9
7
|
Keywords: python,sklearn,mathematical functions,functions,linear regressions
|
10
|
-
Platform: UNKNOWN
|
11
8
|
Classifier: Development Status :: 1 - Planning
|
12
9
|
Classifier: Intended Audience :: Developers
|
13
10
|
Classifier: Programming Language :: Python :: 3
|
@@ -15,6 +12,14 @@ Classifier: Operating System :: Unix
|
|
15
12
|
Classifier: Operating System :: MacOS :: MacOS X
|
16
13
|
Classifier: Operating System :: Microsoft :: Windows
|
17
14
|
Description-Content-Type: text/markdown
|
15
|
+
Requires-Dist: scikit-learn
|
16
|
+
Dynamic: author
|
17
|
+
Dynamic: author-email
|
18
|
+
Dynamic: classifier
|
19
|
+
Dynamic: description
|
20
|
+
Dynamic: description-content-type
|
21
|
+
Dynamic: keywords
|
22
|
+
Dynamic: requires-dist
|
23
|
+
Dynamic: summary
|
18
24
|
|
19
25
|
Just provide x and y list and there you have it the Mathemtical function + accuracy based on the x and y list.
|
20
|
-
|
@@ -0,0 +1 @@
|
|
1
|
+
scikit-learn
|
sklearn_fluent-0.2/README.md
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
# sklearn_fluent
|
2
|
-
Just provide x and y list and there you have it the Mathemtical function + accuracy based on the x and y list.
|
3
|
-
|
4
|
-
## You can get it at [sklearn_fluent](https://pypi.org/project/sklearn-fluent/0.0.1/)
|
5
|
-
or
|
6
|
-
``` bash
|
7
|
-
pip install sklearn_fluent
|
8
|
-
```
|
@@ -1 +0,0 @@
|
|
1
|
-
from sklearn_fluent.main import fluent_it
|
@@ -1,50 +0,0 @@
|
|
1
|
-
def fluent_it(xlist, ylist,linearreg):
|
2
|
-
|
3
|
-
from sklearn.linear_model import LinearRegression
|
4
|
-
import numpy as np
|
5
|
-
|
6
|
-
if linearreg==True:
|
7
|
-
if len(ylist) >50:
|
8
|
-
from sklearn.model_selection import train_test_split
|
9
|
-
x_train,x_test,y_train,y_test = train_test_split(np.array(xlist).reshape(-1,1),np.array(ylist).reshape(-1,1),test_size=0.2)
|
10
|
-
model = LinearRegression()
|
11
|
-
model.fit(x_train,y_train)
|
12
|
-
accuracy = round(model.score(x_test,y_test))
|
13
|
-
|
14
|
-
x_train = np.array(xlist).reshape(-1,1)
|
15
|
-
y_train = np.array(ylist).reshape(-1,1)
|
16
|
-
model = LinearRegression()
|
17
|
-
model.fit(x_train,y_train)
|
18
|
-
elif linearreg == False:
|
19
|
-
x_train = np.array(xlist)
|
20
|
-
y_train = np.array(ylist)
|
21
|
-
# print(x_train, y_train)
|
22
|
-
model = LinearRegression()
|
23
|
-
model.fit(x_train,y_train)
|
24
|
-
|
25
|
-
a = model.intercept_
|
26
|
-
b = model.coef_
|
27
|
-
letters = list('abcdefghijklmnopqrstuvwxyz')
|
28
|
-
reqletters = []
|
29
|
-
for i in range(0,len(b)):
|
30
|
-
reqletters.append(letters[i])
|
31
|
-
newvars = []
|
32
|
-
for i in range(len(reqletters)):
|
33
|
-
try:
|
34
|
-
new = str(round(b[i],4))+reqletters[i]
|
35
|
-
except:
|
36
|
-
new = str(round(float(b[0]),4))+reqletters[i]
|
37
|
-
newvars.append(new)
|
38
|
-
try:
|
39
|
-
mainvar = round(a,4)
|
40
|
-
except:
|
41
|
-
mainvar = round(float(a[0]),4)
|
42
|
-
newvars.append(mainvar)
|
43
|
-
last = " + ".join(list(map(str,newvars)))
|
44
|
-
|
45
|
-
try:
|
46
|
-
return f"function: {last}\naccuracy: {accuracy*100}%"
|
47
|
-
except:
|
48
|
-
return f"function: {last}"
|
49
|
-
# return last
|
50
|
-
|
@@ -1 +0,0 @@
|
|
1
|
-
sklearn
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|