sklearn-fluent 0.2__py3-none-any.whl → 0.4.1__py3-none-any.whl

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.
@@ -1 +1,3 @@
1
- from sklearn_fluent.main import fluent_it
1
+ from .main import req as fluent_it
2
+
3
+ __all__ = ['fluent_it']
sklearn_fluent/main.py CHANGED
@@ -1,50 +1,46 @@
1
- def fluent_it(xlist, ylist,linearreg):
2
-
1
+ def req(xlist, ylist, linearreg):
3
2
  from sklearn.linear_model import LinearRegression
4
3
  import numpy as np
5
4
 
6
- if linearreg==True:
7
- if len(ylist) >50:
5
+ if linearreg == True:
6
+ if len(ylist) > 50:
8
7
  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)
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)
10
9
  model = LinearRegression()
11
- model.fit(x_train,y_train)
12
- accuracy = round(model.score(x_test,y_test))
10
+ model.fit(x_train, y_train)
11
+ accuracy = round(model.score(x_test, y_test))
13
12
 
14
- x_train = np.array(xlist).reshape(-1,1)
15
- y_train = np.array(ylist).reshape(-1,1)
13
+ x_train = np.array(xlist).reshape(-1, 1)
14
+ y_train = np.array(ylist).reshape(-1, 1)
16
15
  model = LinearRegression()
17
- model.fit(x_train,y_train)
16
+ model.fit(x_train, y_train)
18
17
  elif linearreg == False:
19
18
  x_train = np.array(xlist)
20
19
  y_train = np.array(ylist)
21
- # print(x_train, y_train)
22
20
  model = LinearRegression()
23
- model.fit(x_train,y_train)
21
+ model.fit(x_train, y_train)
24
22
 
25
23
  a = model.intercept_
26
24
  b = model.coef_
27
25
  letters = list('abcdefghijklmnopqrstuvwxyz')
28
26
  reqletters = []
29
- for i in range(0,len(b)):
27
+ for i in range(0, len(b)):
30
28
  reqletters.append(letters[i])
31
29
  newvars = []
32
30
  for i in range(len(reqletters)):
33
31
  try:
34
- new = str(round(b[i],4))+reqletters[i]
32
+ new = str(round(b[0][i], 4)) + reqletters[i] # Extract single element
35
33
  except:
36
- new = str(round(float(b[0]),4))+reqletters[i]
34
+ new = str(round(float(b[0][0]), 4)) + reqletters[i] # Extract single element
37
35
  newvars.append(new)
38
36
  try:
39
- mainvar = round(a,4)
37
+ mainvar = round(a[0], 4) # Extract single element
40
38
  except:
41
- mainvar = round(float(a[0]),4)
39
+ mainvar = round(float(a[0]), 4)
42
40
  newvars.append(mainvar)
43
- last = " + ".join(list(map(str,newvars)))
41
+ last = " + ".join(list(map(str, newvars)))
44
42
 
45
43
  try:
46
- return f"function: {last}\naccuracy: {accuracy*100}%"
44
+ return f"function: {last}\naccuracy: {accuracy * 100}%"
47
45
  except:
48
46
  return f"function: {last}"
49
- # return last
50
-
@@ -1,21 +1,25 @@
1
- Metadata-Version: 2.1
2
- Name: sklearn-fluent
3
- Version: 0.2
4
- Summary: Linear/Multli Regression Mathematical Function in one line of code
5
- Home-page: UNKNOWN
6
- Author: YusiferZendric (Aditya Singh)
7
- Author-email: <yzendric@gmail.com>
8
- License: UNKNOWN
9
- Keywords: python,sklearn,mathematical functions,functions,linear regressions
10
- Platform: UNKNOWN
11
- Classifier: Development Status :: 1 - Planning
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Operating System :: Unix
15
- Classifier: Operating System :: MacOS :: MacOS X
16
- Classifier: Operating System :: Microsoft :: Windows
17
- Description-Content-Type: text/markdown
18
- Requires-Dist: sklearn
19
-
20
- Just provide x and y list and there you have it the Mathemtical function + accuracy based on the x and y list.
21
-
1
+ Metadata-Version: 2.2
2
+ Name: sklearn_fluent
3
+ Version: 0.4.1
4
+ Summary: Linear/Multli Regression Mathematical Function in one line of code
5
+ Author: YusiferZendric (Aditya Singh)
6
+ Author-email: <yzendric@gmail.com>
7
+ Keywords: python,sklearn,mathematical functions,functions,linear regressions
8
+ Classifier: Development Status :: 1 - Planning
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: Unix
12
+ Classifier: Operating System :: MacOS :: MacOS X
13
+ Classifier: Operating System :: Microsoft :: Windows
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
24
+
25
+ Just provide x and y list and there you have it the Mathemtical function + accuracy based on the x and y list.
@@ -0,0 +1,6 @@
1
+ sklearn_fluent/__init__.py,sha256=_tBxgz2zPN6jg4RCDM51m2dIKTgxaMQSzrWfBXhuIio,60
2
+ sklearn_fluent/main.py,sha256=SmTcBV6vG-noI0Hxc3pCtJGWj3eGTUXRSx86Rls9YzY,1633
3
+ sklearn_fluent-0.4.1.dist-info/METADATA,sha256=EYju593j_MCYI9l-QF7JfokQ6ozS8Cvr7K0aQtkcAaI,938
4
+ sklearn_fluent-0.4.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
5
+ sklearn_fluent-0.4.1.dist-info/top_level.txt,sha256=YEMvxTSoqj_0VwfTl7iVj75ickR3Va1qvZJ6ePOmwWE,15
6
+ sklearn_fluent-0.4.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.37.1)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,6 +0,0 @@
1
- sklearn_fluent/__init__.py,sha256=zF78HVRV1PWsZt4QIiP6wDpO4AnwNicSFrf-kIcZl3A,43
2
- sklearn_fluent/main.py,sha256=asPGyaslbegVygktSF_7gRDOZvIEjl7lN8YY4p4FTL8,1577
3
- sklearn_fluent-0.2.dist-info/METADATA,sha256=QP_tW-t4pPL2EXoMAtGB1-_B1xdChHjzK5Uo6tf-MRU,790
4
- sklearn_fluent-0.2.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
5
- sklearn_fluent-0.2.dist-info/top_level.txt,sha256=YEMvxTSoqj_0VwfTl7iVj75ickR3Va1qvZJ6ePOmwWE,15
6
- sklearn_fluent-0.2.dist-info/RECORD,,