sklearn-fluent 0.2__py3-none-any.whl → 0.4__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.
- sklearn_fluent/__init__.py +1 -1
- sklearn_fluent/main.py +17 -21
- {sklearn_fluent-0.2.dist-info → sklearn_fluent-0.4.dist-info}/METADATA +25 -21
- sklearn_fluent-0.4.dist-info/RECORD +6 -0
- {sklearn_fluent-0.2.dist-info → sklearn_fluent-0.4.dist-info}/WHEEL +1 -1
- sklearn_fluent-0.2.dist-info/RECORD +0 -6
- {sklearn_fluent-0.2.dist-info → sklearn_fluent-0.4.dist-info}/top_level.txt +0 -0
    
        sklearn_fluent/__init__.py
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            from  | 
| 1 | 
            +
            from .main import req 
         | 
    
        sklearn_fluent/main.py
    CHANGED
    
    | @@ -1,50 +1,46 @@ | |
| 1 | 
            -
            def  | 
| 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. | 
| 2 | 
            -
            Name:  | 
| 3 | 
            -
            Version: 0. | 
| 4 | 
            -
            Summary: Linear/Multli Regression Mathematical Function in one line of code
         | 
| 5 | 
            -
             | 
| 6 | 
            -
            Author:  | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
            Classifier:  | 
| 12 | 
            -
            Classifier:  | 
| 13 | 
            -
            Classifier:  | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 1 | 
            +
            Metadata-Version: 2.2
         | 
| 2 | 
            +
            Name: sklearn_fluent
         | 
| 3 | 
            +
            Version: 0.4
         | 
| 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=HDn_n8x7LuLLsze1ZAklx4fJ7jvl2iydho9lEdfEAwM,23
         | 
| 2 | 
            +
            sklearn_fluent/main.py,sha256=SmTcBV6vG-noI0Hxc3pCtJGWj3eGTUXRSx86Rls9YzY,1633
         | 
| 3 | 
            +
            sklearn_fluent-0.4.dist-info/METADATA,sha256=9rST8Itp3oKxm51VWUZEZaqwHgttpmjq9M7ZfFhwPHw,936
         | 
| 4 | 
            +
            sklearn_fluent-0.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
         | 
| 5 | 
            +
            sklearn_fluent-0.4.dist-info/top_level.txt,sha256=YEMvxTSoqj_0VwfTl7iVj75ickR3Va1qvZJ6ePOmwWE,15
         | 
| 6 | 
            +
            sklearn_fluent-0.4.dist-info/RECORD,,
         | 
| @@ -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,,
         | 
| 
            File without changes
         |