pyplotye 0.1.0__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.
pyplotye/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ """
2
+ pyplotye - A Python plotting library.
3
+ """
4
+
5
+ __version__ = "0.1.0"
6
+ __author__ = "Your Name"
7
+ __email__ = "your@email.com"
8
+
9
+ from .core import * # noqa: F401, F403
pyplotye/binning.py ADDED
@@ -0,0 +1,35 @@
1
+ import pandas as pd
2
+ import numpy as np
3
+ from sklearn.datasets import load_iris
4
+ from sklearn.preprocessing import MinMaxScaler
5
+
6
+ # Load dataset
7
+ iris = load_iris()
8
+
9
+ # Create DataFrame
10
+ df = pd.DataFrame(iris.data, columns=iris.feature_names)
11
+
12
+ # Transformation (log transform)
13
+ df['log_data'] = np.log(df['sepal length (cm)'])
14
+
15
+ # Scaling
16
+ scaler = MinMaxScaler()
17
+ df['scaled'] = scaler.fit_transform(
18
+ df[['sepal width (cm)']]
19
+ )
20
+
21
+ # Binning
22
+ df['binned'] = pd.cut(
23
+ df['petal length (cm)'],
24
+ bins=3,
25
+ labels=['Low', 'Medium', 'High']
26
+ )
27
+
28
+ # Fix skewed values
29
+ df['fixed_skew'] = np.sqrt(df['petal width (cm)'])
30
+
31
+ # Sampling
32
+ sample = df.sample(5)
33
+
34
+ # Display
35
+ print(sample)
pyplotye/core.py ADDED
@@ -0,0 +1,9 @@
1
+ """
2
+ Core module for pyplotye.
3
+ Add your main library logic here.
4
+ """
5
+
6
+
7
+ def hello():
8
+ """Sample function - replace with your actual implementation."""
9
+ return "Hello from pyplotye!"
pyplotye/demoppa.py ADDED
@@ -0,0 +1,23 @@
1
+ from sklearn.datasets import load_breast_cancer
2
+ from sklearn.model_selection import train_test_split
3
+ from sklearn.ensemble import RandomForestClassifier
4
+ from sklearn.metrics import accuracy_score
5
+
6
+ # Load microarray-like dataset
7
+ data = load_breast_cancer()
8
+ X, y = data.data, data.target
9
+
10
+ # Split data
11
+ X_train, X_test, y_train, y_test = train_test_split(
12
+ X, y, test_size=0.2, random_state=42
13
+ )
14
+
15
+ # Train model
16
+ model = RandomForestClassifier()
17
+ model.fit(X_train, y_train)
18
+
19
+ # Prediction
20
+ y_pred = model.predict(X_test)
21
+
22
+ # Accuracy
23
+ print("Accuracy:", accuracy_score(y_test, y_pred))
pyplotye/demotmt.py ADDED
@@ -0,0 +1,42 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt
3
+ from statsmodels.datasets import co2
4
+ from sklearn.linear_model import LinearRegression
5
+ from sklearn.model_selection import train_test_split
6
+ from sklearn.metrics import mean_squared_error
7
+
8
+ # Load temporal dataset
9
+ data = co2.load_pandas().data
10
+
11
+ # Remove missing values
12
+ data = data.ffill()
13
+
14
+ # Input (time) and Output (CO2 values)
15
+ X = np.arange(len(data)).reshape(-1, 1)
16
+ y = data['co2'].values
17
+
18
+ # Train-Test Split
19
+ X_train, X_test, y_train, y_test = train_test_split(
20
+ X, y, test_size=0.2, random_state=42
21
+ )
22
+
23
+ # Model Training
24
+ model = LinearRegression()
25
+ model.fit(X_train, y_train)
26
+
27
+ # Prediction
28
+ y_pred = model.predict(X_test)
29
+
30
+ # Error
31
+ print("Mean Squared Error:", mean_squared_error(y_test, y_pred))
32
+
33
+ # Comparison Graph
34
+ plt.scatter(X_test, y_test, label="Actual Values")
35
+ plt.scatter(X_test, y_pred, label="Predicted Values")
36
+
37
+ plt.title("Actual vs Predicted CO2 Values")
38
+ plt.xlabel("Time")
39
+ plt.ylabel("CO2 Levels")
40
+ plt.legend()
41
+
42
+ plt.show()
pyplotye/hist.py ADDED
@@ -0,0 +1,27 @@
1
+ import pandas as pd
2
+ import matplotlib.pyplot as plt
3
+ from sklearn.datasets import load_iris
4
+
5
+ # Load dataset
6
+ iris = load_iris()
7
+
8
+ # Create DataFrame
9
+ df = pd.DataFrame(iris.data,
10
+ columns=iris.feature_names)
11
+
12
+ # Dataset summary
13
+ print(df.describe())
14
+
15
+ # Histogram
16
+ df.hist(figsize=(8, 6))
17
+
18
+ # Scatter plot (multiple variables)
19
+ plt.figure(figsize=(6,4))
20
+ plt.scatter(df['sepal length (cm)'],
21
+ df['petal length (cm)'])
22
+
23
+ plt.xlabel("Sepal Length")
24
+ plt.ylabel("Petal Length")
25
+ plt.title("Multiple Variable Summary")
26
+
27
+ plt.show()
pyplotye/knndt.py ADDED
@@ -0,0 +1,42 @@
1
+ from sklearn.datasets import load_iris
2
+ from sklearn.model_selection import train_test_split
3
+ from sklearn.tree import DecisionTreeClassifier
4
+ from sklearn.neighbors import KNeighborsClassifier
5
+ from sklearn.neural_network import MLPClassifier
6
+ from sklearn.metrics import accuracy_score
7
+
8
+ # Load dataset
9
+ iris = load_iris()
10
+
11
+ X = iris.data
12
+ y = iris.target
13
+
14
+ # Train-Test Split
15
+ X_train, X_test, y_train, y_test = train_test_split(
16
+ X, y, test_size=0.2, random_state=42
17
+ )
18
+
19
+ # Decision Tree
20
+ dt = DecisionTreeClassifier()
21
+ dt.fit(X_train, y_train)
22
+ dt_pred = dt.predict(X_test)
23
+
24
+ # KNN
25
+ knn = KNeighborsClassifier()
26
+ knn.fit(X_train, y_train)
27
+ knn_pred = knn.predict(X_test)
28
+
29
+ # Neural Network
30
+ nn = MLPClassifier(max_iter=1000)
31
+ nn.fit(X_train, y_train)
32
+ nn_pred = nn.predict(X_test)
33
+
34
+ # Accuracy
35
+ print("Decision Tree Accuracy:",
36
+ accuracy_score(y_test, dt_pred))
37
+
38
+ print("KNN Accuracy:",
39
+ accuracy_score(y_test, knn_pred))
40
+
41
+ print("Neural Network Accuracy:",
42
+ accuracy_score(y_test, nn_pred))
pyplotye/linlog.py ADDED
@@ -0,0 +1,54 @@
1
+ import matplotlib.pyplot as plt
2
+ from sklearn.datasets import load_diabetes
3
+ from sklearn.linear_model import LinearRegression
4
+ from sklearn.model_selection import train_test_split
5
+ from sklearn.metrics import mean_squared_error, r2_score
6
+
7
+ # 1. Load and Split
8
+ data = load_diabetes()
9
+ X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, test_size=0.2, random_state=42)
10
+
11
+ # 2. Train Model
12
+ model = LinearRegression()
13
+ model.fit(X_train, y_train)
14
+
15
+ # 3. Predict and Evaluate
16
+ y_pred = model.predict(X_test)
17
+ print(f"Mean Squared Error: {mean_squared_error(y_test, y_pred):.2f}")
18
+ print(f"R2 Score: {r2_score(y_test, y_pred):.2f}")
19
+
20
+ # 4. Visualization
21
+ plt.scatter(y_test, y_pred, alpha=0.5)
22
+ plt.plot([y_test.min(), y_test.max()], [y_test.min(), y_test.max()], 'r--', lw=2) # Best fit line
23
+ plt.xlabel("Actual Values")
24
+ plt.ylabel("Predicted Values")
25
+ plt.title("Linear Regression: Diabetes Dataset")
26
+ plt.show()
27
+
28
+
29
+ import matplotlib.pyplot as plt
30
+ import seaborn as sns
31
+ from sklearn.datasets import load_breast_cancer
32
+ from sklearn.linear_model import LogisticRegression
33
+ from sklearn.model_selection import train_test_split
34
+ from sklearn.metrics import accuracy_score, confusion_matrix
35
+
36
+ # 1. Load and Split
37
+ data = load_breast_cancer()
38
+ X_train, X_test, y_train, y_test = train_test_split(data.data, data.target, test_size=0.2, random_state=42)
39
+
40
+ # 2. Train Model (max_iter ensures convergence)
41
+ model = LogisticRegression(max_iter=5000)
42
+ model.fit(X_train, y_train)
43
+
44
+ # 3. Predict and Evaluate
45
+ y_pred = model.predict(X_test)
46
+ print(f"Accuracy Score: {accuracy_score(y_test, y_pred):.2%}")
47
+
48
+ # 4. Visualization (Confusion Matrix is best for Classification)
49
+ cm = confusion_matrix(y_test, y_pred)
50
+ sns.heatmap(cm, annot=True, fmt='d', cmap='Blues')
51
+ plt.xlabel("Predicted")
52
+ plt.ylabel("Actual")
53
+ plt.title("Logistic Regression: Confusion Matrix")
54
+ plt.show()
pyplotye/missingval.py ADDED
@@ -0,0 +1,30 @@
1
+ import pandas as pd
2
+ import numpy as np
3
+ import matplotlib.pyplot as plt
4
+ from sklearn.datasets import load_iris
5
+
6
+ # Load dataset
7
+ iris = load_iris()
8
+
9
+ # Create DataFrame
10
+ df = pd.DataFrame(iris.data,
11
+ columns=iris.feature_names)
12
+
13
+ # Add missing values manually
14
+ df.iloc[0,0] = np.nan
15
+ df.iloc[5,2] = np.nan
16
+
17
+ # Missing value analysis
18
+ print("Missing Values:\n")
19
+ print(df.isnull().sum())
20
+
21
+ # Fix missing values using mean
22
+ df.fillna(df.mean(), inplace=True)
23
+
24
+ # Outlier Analysis using Boxplot
25
+ plt.boxplot(df['sepal length (cm)'])
26
+
27
+ plt.title("Outlier Analysis")
28
+ plt.ylabel("Sepal Length")
29
+
30
+ plt.show()
pyplotye/smoknn.py ADDED
File without changes
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyplotye
3
+ Version: 0.1.0
4
+ Summary: A Python data analysis and visualization toolkit for preprocessing, clustering, regression and classification.
5
+ Author-email: Harish <hackerat2027@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2026 Your Name
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/HackerHarish1419/pyplotye
29
+ Project-URL: Bug Tracker, https://github.com/HackerHarish1419/pyplotye/issues
30
+ Keywords: plotting,visualization,machine learning,data analysis,sklearn
31
+ Classifier: Programming Language :: Python :: 3
32
+ Classifier: License :: OSI Approved :: MIT License
33
+ Classifier: Operating System :: OS Independent
34
+ Classifier: Topic :: Scientific/Engineering :: Visualization
35
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
36
+ Requires-Python: >=3.8
37
+ Description-Content-Type: text/markdown
38
+ License-File: LICENSE
39
+ Requires-Dist: numpy>=1.21
40
+ Requires-Dist: pandas>=1.4
41
+ Requires-Dist: matplotlib>=3.5
42
+ Requires-Dist: scikit-learn>=1.0
43
+ Requires-Dist: statsmodels>=0.13
44
+ Requires-Dist: seaborn>=0.11
45
+ Requires-Dist: minisom>=2.3
46
+ Provides-Extra: dev
47
+ Requires-Dist: pytest>=7.0; extra == "dev"
48
+ Requires-Dist: twine>=4.0; extra == "dev"
49
+ Requires-Dist: build>=0.10; extra == "dev"
50
+ Dynamic: license-file
51
+
52
+ # pyplotye
53
+
54
+ [![PyPI version](https://badge.fury.io/py/pyplotye.svg)](https://badge.fury.io/py/pyplotye)
55
+ [![Python Versions](https://img.shields.io/pypi/pyversions/pyplotye.svg)](https://pypi.org/project/pyplotye/)
56
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
57
+
58
+ > A Python plotting library — describe what `pyplotye` does in one sentence here.
59
+
60
+ ## Features
61
+
62
+ - Feature 1
63
+ - Feature 2
64
+ - Feature 3
65
+
66
+ ## Installation
67
+
68
+ ```bash
69
+ pip install pyplotye
70
+ ```
71
+
72
+ ## Quick Start
73
+
74
+ ```python
75
+ from pyplotye import hello
76
+
77
+ print(hello())
78
+ ```
79
+
80
+ ## Documentation
81
+
82
+ Full documentation is available at [https://pyplotye.readthedocs.io](https://pyplotye.readthedocs.io).
83
+
84
+ ## Contributing
85
+
86
+ Contributions are welcome! Please open an issue or submit a pull request on [GitHub](https://github.com/yourusername/pyplotye).
87
+
88
+ ## License
89
+
90
+ This project is licensed under the MIT License — see the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,15 @@
1
+ pyplotye/__init__.py,sha256=-uqfBXhQ61685T1wYuvkXu9WydCfcMa8FhEuZhr2xF8,164
2
+ pyplotye/binning.py,sha256=bXTk2wuowao85alg5BWxK1za5vZWmnb5eVa3Y8SLlqc,701
3
+ pyplotye/core.py,sha256=1XsEH8VVrKrQQzbIz_MR48zuhLfxNrNTpc9IsxXWu7E,186
4
+ pyplotye/demoppa.py,sha256=n3pqlzleuyHFAyQZl52nSLDWXyqAPePogxm8gWn0hlg,601
5
+ pyplotye/demotmt.py,sha256=kBttokii7cq9ldcTHiMATQyycpCtPQqelnqC0KkFSII,1028
6
+ pyplotye/hist.py,sha256=APwJsKe4tzO6T3dTrdnUiIidRFartUkfjOXs8mog7qw,566
7
+ pyplotye/knndt.py,sha256=1YFTB-EZ4HNB7sA4VBaJc-CdxK5QEOYEjiL6mJC-U_I,1027
8
+ pyplotye/linlog.py,sha256=MTopfiePdyg25y4MjQPeuUKZnSqII7kKl5DQjFigtq0,1897
9
+ pyplotye/missingval.py,sha256=zFDVz6ZVFHEccS2hH-88nyv5tJmBlsNv6Q5Xyefs_uo,630
10
+ pyplotye/smoknn.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ pyplotye-0.1.0.dist-info/licenses/LICENSE,sha256=v2spsd7N1pKFFh2G8wGP_45iwe5S0DYiJzG4im8Rupc,1066
12
+ pyplotye-0.1.0.dist-info/METADATA,sha256=TLI0vCT5PGKQaDTmfuD3CIIHxFmkjkq7pf4_oUCmCdM,3471
13
+ pyplotye-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
14
+ pyplotye-0.1.0.dist-info/top_level.txt,sha256=l1tYW6rU6b42p13UIOvn8uS0cgYhwoMuTz55q9az_iU,9
15
+ pyplotye-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Your Name
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 @@
1
+ pyplotye