regression-fatima 1.0.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Fatima
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: regression-fatima
3
+ Version: 1.0.0
4
+ Summary: A simple linear regression package
5
+ Home-page: http://pypi.python.org/pypi/regression-fatima/
6
+ Author: Fatima
7
+ Author-email: sekehalfatimazahra@gmail.com
8
+ License: LICENSE.txt
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Dynamic: author
12
+ Dynamic: author-email
13
+ Dynamic: description
14
+ Dynamic: description-content-type
15
+ Dynamic: home-page
16
+ Dynamic: license
17
+ Dynamic: license-file
18
+ Dynamic: summary
19
+
20
+ # regression-fatima
21
+
22
+ A simple linear regression package written in plain Python.
23
+
24
+ ## Installation
25
+
26
+ pip install regression-fatima
27
+
28
+ ## Usage
29
+
30
+ from regression import LinearRegression
31
+
32
+ model = LinearRegression()
33
+ model.fit([1, 2, 3, 4], [2, 4, 6, 8])
34
+ print(model.predict([5, 6]))
35
+
36
+ ## License
37
+
38
+ MIT
@@ -0,0 +1,19 @@
1
+ # regression-fatima
2
+
3
+ A simple linear regression package written in plain Python.
4
+
5
+ ## Installation
6
+
7
+ pip install regression-fatima
8
+
9
+ ## Usage
10
+
11
+ from regression import LinearRegression
12
+
13
+ model = LinearRegression()
14
+ model.fit([1, 2, 3, 4], [2, 4, 6, 8])
15
+ print(model.predict([5, 6]))
16
+
17
+ ## License
18
+
19
+ MIT
@@ -0,0 +1 @@
1
+ from .regression import LinearRegression
@@ -0,0 +1,21 @@
1
+ class LinearRegression:
2
+ """Simple linear regression: y = slope * x + intercept"""
3
+
4
+ def __init__(self):
5
+ self.slope = 0
6
+ self.intercept = 0
7
+
8
+ def fit(self, x, y):
9
+ """Find the best line for the data."""
10
+ mean_x = sum(x) / len(x)
11
+ mean_y = sum(y) / len(y)
12
+
13
+ top = sum((xi - mean_x) * (yi - mean_y) for xi, yi in zip(x, y))
14
+ bottom = sum((xi - mean_x) ** 2 for xi in x)
15
+
16
+ self.slope = top / bottom
17
+ self.intercept = mean_y - self.slope * mean_x
18
+
19
+ def predict(self, x):
20
+ """Predict y for a list of x values."""
21
+ return [self.slope * xi + self.intercept for xi in x]
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: regression-fatima
3
+ Version: 1.0.0
4
+ Summary: A simple linear regression package
5
+ Home-page: http://pypi.python.org/pypi/regression-fatima/
6
+ Author: Fatima
7
+ Author-email: sekehalfatimazahra@gmail.com
8
+ License: LICENSE.txt
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Dynamic: author
12
+ Dynamic: author-email
13
+ Dynamic: description
14
+ Dynamic: description-content-type
15
+ Dynamic: home-page
16
+ Dynamic: license
17
+ Dynamic: license-file
18
+ Dynamic: summary
19
+
20
+ # regression-fatima
21
+
22
+ A simple linear regression package written in plain Python.
23
+
24
+ ## Installation
25
+
26
+ pip install regression-fatima
27
+
28
+ ## Usage
29
+
30
+ from regression import LinearRegression
31
+
32
+ model = LinearRegression()
33
+ model.fit([1, 2, 3, 4], [2, 4, 6, 8])
34
+ print(model.predict([5, 6]))
35
+
36
+ ## License
37
+
38
+ MIT
@@ -0,0 +1,9 @@
1
+ LICENSE.txt
2
+ README.md
3
+ setup.py
4
+ regression/__init__.py
5
+ regression/regression.py
6
+ regression_fatima.egg-info/PKG-INFO
7
+ regression_fatima.egg-info/SOURCES.txt
8
+ regression_fatima.egg-info/dependency_links.txt
9
+ regression_fatima.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,14 @@
1
+ from setuptools import setup
2
+
3
+ setup(
4
+ name='regression-fatima',
5
+ version='1.0.0',
6
+ author='Fatima',
7
+ author_email='sekehalfatimazahra@gmail.com',
8
+ packages=['regression'],
9
+ url='http://pypi.python.org/pypi/regression-fatima/',
10
+ license='LICENSE.txt',
11
+ description='A simple linear regression package',
12
+ long_description=open('README.md').read(),
13
+ long_description_content_type="text/markdown"
14
+ )