-
Notifications
You must be signed in to change notification settings - Fork 0
This is a python machine learning project that lets you load csv/txt files containing data and can predict outcomes of new inputs based on the loaded data. No libraries / frameworks (except NumPy for linear algebra and matplotlib for plotting) are used. Gradient Descent is used for deriving the hypothesis.
manan/linear-regression
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
>> >> I have committed two code snippets and two datasets to the repository and also a picture of the plot returned from calling classifier.plot() in the first snippet. Using the framework is quite easy and here are the basic steps: 1. Initialize the classifier: lr.LinearRegression() 2. Load some data like ex1data1.txt or ex1data2.txt: classifier.load_data('filepath') 3. You can plot the data if you only have one X column and one Y column like ex1data.txt but you cannot plot data with multiple x columns and one Y column like ex1data2.txt: classifier.plot() 4. You can predict outcomes in either case: classifier.predict(matrix-shaped-(1xn)) Look at ex1data1.txt and ex1data2.txt to understand how your data should look. The last column is assumed to the Y column (and all the previous ones are assumed to be X columns) unless you give two files with X and Y matrice/vectors. >> >>
About
This is a python machine learning project that lets you load csv/txt files containing data and can predict outcomes of new inputs based on the loaded data. No libraries / frameworks (except NumPy for linear algebra and matplotlib for plotting) are used. Gradient Descent is used for deriving the hypothesis.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published