diff --git a/docs/TDA_Regression.html b/docs/TDA_Prediction.html similarity index 88% rename from docs/TDA_Regression.html rename to docs/TDA_Prediction.html index e8ff2cce99f993c19f263b18679387680d459829..b620f9714e608f4bbc97051ad22a3a48bed34a23 100644 --- a/docs/TDA_Regression.html +++ b/docs/TDA_Prediction.html @@ -4,7 +4,7 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> <meta name="generator" content="pdoc 0.7.2" /> -<title>TDA_Regression API documentation</title> +<title>TDA_Prediction API documentation</title> <meta name="description" content="" /> <link href='https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css' rel='stylesheet'> <link href='https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/8.0.0/sanitize.min.css' rel='stylesheet'> @@ -17,18 +17,14 @@ <main> <article id="content"> <header> -<h1 class="title">Module <code>TDA_Regression</code></h1> +<h1 class="title">Module <code>TDA_Prediction</code></h1> </header> <section id="section-intro"> <details class="source"> <summary> <span>Expand source code</span> </summary> -<pre><code class="python"># importing toy & real world datasets from the scikit-learn library - -from sklearn import datasets - -def dataload(): +<pre><code class="python">def dataload(): """ upload toy datasets from scikit-learn """ @@ -43,8 +39,6 @@ def datafetch(file_name): print("reading data from:", file_name) return data -# standard descriptive statistic analysis of data - def descriptive_statistic(df): """ Provides brief descriptive statistics on dataset. @@ -56,9 +50,6 @@ def descriptive_statistic(df): print("\n\n Tail -- \n", None) print("Describe : ", None) - -# model selection - def model_selection(df): """ Takes dateframe as input. Performs foward/backward stepwise @@ -69,8 +60,6 @@ def model_selection(df): backward_step = None return foward_step, backward_step -# model accuracy - def MSE_fit(fit): """ Takes in a fitted model as the input. @@ -98,25 +87,7 @@ def accuracy_metrics(fit, MSE): d['BIC'] = None d['PRESS'] = None d['Cp']= None - return d - -# test code - -file_name = 'data.csv' - -a = datafetch(file_name) -print(a) - -b = descriptive_statistic(a) -print(b) - -c = model_selection(a) -print(c) - -d = MSE_fit(c) -print(d) - -print(accuracy_metrics(c, d))</code></pre> + return d</code></pre> </details> </section> <section> @@ -126,7 +97,7 @@ print(accuracy_metrics(c, d))</code></pre> <section> <h2 class="section-title" id="header-functions">Functions</h2> <dl> -<dt id="TDA_Regression.MSE_fit"><code class="name flex"> +<dt id="TDA_Prediction.MSE_fit"><code class="name flex"> <span>def <span class="ident">MSE_fit</span></span>(<span>fit)</span> </code></dt> <dd> @@ -147,7 +118,7 @@ Outputs the model's MSE.</p></section> return MSE</code></pre> </details> </dd> -<dt id="TDA_Regression.accuracy_metrics"><code class="name flex"> +<dt id="TDA_Prediction.accuracy_metrics"><code class="name flex"> <span>def <span class="ident">accuracy_metrics</span></span>(<span>fit, MSE)</span> </code></dt> <dd> @@ -179,7 +150,7 @@ and the MSE of the fitted model.</p></section> return d</code></pre> </details> </dd> -<dt id="TDA_Regression.datafetch"><code class="name flex"> +<dt id="TDA_Prediction.datafetch"><code class="name flex"> <span>def <span class="ident">datafetch</span></span>(<span>file_name)</span> </code></dt> <dd> @@ -197,7 +168,7 @@ and the MSE of the fitted model.</p></section> return data</code></pre> </details> </dd> -<dt id="TDA_Regression.dataload"><code class="name flex"> +<dt id="TDA_Prediction.dataload"><code class="name flex"> <span>def <span class="ident">dataload</span></span>(<span>)</span> </code></dt> <dd> @@ -214,7 +185,7 @@ and the MSE of the fitted model.</p></section> return data</code></pre> </details> </dd> -<dt id="TDA_Regression.descriptive_statistic"><code class="name flex"> +<dt id="TDA_Prediction.descriptive_statistic"><code class="name flex"> <span>def <span class="ident">descriptive_statistic</span></span>(<span>df)</span> </code></dt> <dd> @@ -236,7 +207,7 @@ Takes dataframe as input.</p></section> print("Describe : ", None)</code></pre> </details> </dd> -<dt id="TDA_Regression.model_selection"><code class="name flex"> +<dt id="TDA_Prediction.model_selection"><code class="name flex"> <span>def <span class="ident">model_selection</span></span>(<span>df)</span> </code></dt> <dd> @@ -270,12 +241,12 @@ regression. Returns best model for both methods.</p></section> <ul id="index"> <li><h3><a href="#header-functions">Functions</a></h3> <ul class=""> -<li><code><a title="TDA_Regression.MSE_fit" href="#TDA_Regression.MSE_fit">MSE_fit</a></code></li> -<li><code><a title="TDA_Regression.accuracy_metrics" href="#TDA_Regression.accuracy_metrics">accuracy_metrics</a></code></li> -<li><code><a title="TDA_Regression.datafetch" href="#TDA_Regression.datafetch">datafetch</a></code></li> -<li><code><a title="TDA_Regression.dataload" href="#TDA_Regression.dataload">dataload</a></code></li> -<li><code><a title="TDA_Regression.descriptive_statistic" href="#TDA_Regression.descriptive_statistic">descriptive_statistic</a></code></li> -<li><code><a title="TDA_Regression.model_selection" href="#TDA_Regression.model_selection">model_selection</a></code></li> +<li><code><a title="TDA_Prediction.MSE_fit" href="#TDA_Prediction.MSE_fit">MSE_fit</a></code></li> +<li><code><a title="TDA_Prediction.accuracy_metrics" href="#TDA_Prediction.accuracy_metrics">accuracy_metrics</a></code></li> +<li><code><a title="TDA_Prediction.datafetch" href="#TDA_Prediction.datafetch">datafetch</a></code></li> +<li><code><a title="TDA_Prediction.dataload" href="#TDA_Prediction.dataload">dataload</a></code></li> +<li><code><a title="TDA_Prediction.descriptive_statistic" href="#TDA_Prediction.descriptive_statistic">descriptive_statistic</a></code></li> +<li><code><a title="TDA_Prediction.model_selection" href="#TDA_Prediction.model_selection">model_selection</a></code></li> </ul> </li> </ul>