Skip to main content

Package containing deep learning model, classic machine learning models, various preprocessing functions and result metrics

Project description

learned

Machine Learning library for Python (very soon C and JavaScript)

Table of Contents

LinReg class

Explanation: 
        LinReg is a class that allows simple or multiple linear regressions and returns trained parameters.

Parameters: 
        data: Unfragmented structure that contains inputs and outputs.
Usage:
'''
// The "full_dataset" is an unfragmented structure that contains inputs and outputs.

lin_reg = Learn.LinReg(data=full_dataset)  # or lin_reg = LinReg(full_dataset)
'''

Output:
        '''
        <Learn.LinReg at 0x1fdbd6b6220>
        ''' 

LinReg.train

Explanation: 
        It applies the training process for the dataset entered while creating the class.

Parameters: 
        This method does not take parameter!
Usage:
'''
lin_reg.train()
'''

Output:
        (An example simple linear regression output)
        '''
        Completed in 0.0 seconds.
        Training R2-Score: % 97.0552464372771
        Intercept: 10349.456288746507, Coefficients: [[812.87723722]]
        '''

LinReg.test

Explanation: 
        Applies the created model to a different input and gives the r2 score result.

Parameters: 
        t_data: Unfragmented structure that contains inputs and outputs.
Usage:
'''
lin_reg.test(t_data=test_dataset) # or lin_reg.test(test_dataset)
'''

Output:
        (An example simple linear regression output)
        '''
        Testing R2-Score: % 91.953582170654
        '''

Note: 
        Returns an error message if applied for a model that has not been previously trained.
        '''
        Exception: Model not trained!
        '''

LinReg.predict

Explanation: 
        Applies the created model to the input data, which it takes as a parameter, and returns the estimated results.

Parameters: 
        x: Input dataset consisting of arguments
Usage:
'''
predicts = lin_reg.predict(x=x_set) # or predicts = lin_reg.predict(x_set)
'''

Output:
        Predicted values list

Note: 
        Returns an error message if applied for a model that has not been previously trained.
        '''
        Exception: Model not trained!
        '''

LinReg.r2_score

Explanation: 
        It takes actual results and predicted results for the same inputs as parameters and returns the value of r2 score.

Parameters: 
        y_true: Real results
        y_predict: Estimated results
Usage:
'''
lin_reg.r2_score(y_true=real_results, y_predict=predicted_results) # or lin_reg.r2_score(real_results, predicted_results)
'''

Output:
        '''
        0.970552
        dtype: float64
        '''

LinReg.intercept

Explanation: 
        Returns the trained intercept value

Parameters: 
        @property (Does not take parameter)
Usage:
'''
intercept = lin_reg.intercept
'''

Output:
        '''
        10349.456288746507
        '''

LinReg.coefficients

Explanation: 
        Returns the trained coefficients

Parameters: 
        @property (Does not take parameter)
Usage:
'''
coefficients = lin_reg.coefficients
'''

Output:
        '''
        array([[812.87723722]])
        '''

LogReg class

Parameters

LogReg.train

LogReg.predict

GradientDescent class

Parameters

GradientDescent.optimizer

GradientDescent.predict

GradientDescent.get_parameters

Preprocessing class

Preprocessing.get_split_data

TODO

  • cross validation
  • p-value
  • Other algorithms
  • Detailed documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

learned-0.5.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

learned-0.5.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page