Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavnt committed May 12, 2021
1 parent 3af11d9 commit 498d2d6
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 6 deletions.
85 changes: 79 additions & 6 deletions pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,85 @@
import Image from 'next/image'
import Bleed from 'nextra-theme-docs/bleed'

# Nextra
# Kobra

**Nextra** is a [Next.js](https://nextjs.org) based static site generator. 0 lines of code needed.
# Onboarding

It supports Markdown with React components ([MDX](/mdx)), automatically generated [sidebar and anchor links](/docs/anchors), file-system based routing, built-in syntax highlighting, i18n and more.
Hey! Welcome to Kobra! We're so happy that you're trying it out, and we'd love your feedback! Here are some basic instructions for how to get started with Kobra – we really hope you won't have to use these instructions, but when you do, please take a note of it so we'll know which parts of the experience aren't intuitive

<Bleed>
<Image src="/demo.png" width={2288} height={1974} layout="intrinsic" />
</Bleed>
Do not open the specific steps unless you're stuck

---

Here are the basic steps to creating a Kobra program (we're going to be creating a Simple Linear Regression):

1. Upload dataset

Download dataset [here](https://raw.githubusercontent.com/kobra-dev/datasets/main/Salary_Data.csv)

- Upload the file

In the top right, go to the file upload tab and upload your dataset. If this isn't intuitive, please make a note of it

- Load in the dataset

Go to the variables tab and create a variable for data

![/Screen_Shot_2021-05-11_at_2.06.46_PM.png](/Screen_Shot_2021-05-11_at_2.06.46_PM.png)

Set the data variable to a new dataframe – make the filename the same as the dataset you uploaded (the String block is in the text tab)

![/Screen_Shot_2021-05-11_at_2.07.30_PM.png](/Screen_Shot_2021-05-11_at_2.07.30_PM.png)

2. Create X and y variables
- Create variables for X and y

Go to the variables tab and create a variable for X and y

- Set each variable to one column of the dataframe

Drag out the "Get column" block from the dataframes tab

![/Screen_Shot_2021-05-11_at_2.11.07_PM.png](/Screen_Shot_2021-05-11_at_2.11.07_PM.png)

3. Create scatterplot
- Add a scatterplot to the plo

Get this blocks from the plots tab, and add it to your program

![/Screen_Shot_2021-05-11_at_2.12.02_PM.png](/Screen_Shot_2021-05-11_at_2.12.02_PM.png)

4. Click the run button to view your scatterplot (in data visualization tab)
5. Create & Train Linear Regression Model
- Create a variable for your linear regression model

Go to the variables tab, and create a variable for a model

- Set it to a linear regression model

Drag out the linear regression model from the Linear Regression tab and set model to it

![/Screen_Shot_2021-05-11_at_2.18.47_PM.png](/Screen_Shot_2021-05-11_at_2.18.47_PM.png)

- Fit the linear regression model

Drag out the `fit linear regression model` block and fit the model variable

![/Screen_Shot_2021-05-11_at_2.25.11_PM.png](/Screen_Shot_2021-05-11_at_2.25.11_PM.png)

6. Make prediction with linear regression
- Make a prediction and print it out

Drag out the print block from the text category, and then use the create text block to combine a string saying "Prediction (5 yrs experience)" and your predction

![/Screen_Shot_2021-05-11_at_2.30.25_PM.png](/Screen_Shot_2021-05-11_at_2.30.25_PM.png)

Add in a prediction block, where you're making a prediction with your linear regression model (in linear regression tab)

![/Screen_Shot_2021-05-11_at_2.31.22_PM.png](/Screen_Shot_2021-05-11_at_2.31.22_PM.png)

Full program

- Full program

![/Screen_Shot_2021-05-11_at_2.32.15_PM.png](/Screen_Shot_2021-05-11_at_2.32.15_PM.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Screen_Shot_2021-05-11_at_2.07.30_PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Screen_Shot_2021-05-11_at_2.11.07_PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Screen_Shot_2021-05-11_at_2.12.02_PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Screen_Shot_2021-05-11_at_2.18.47_PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Screen_Shot_2021-05-11_at_2.25.11_PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Screen_Shot_2021-05-11_at_2.30.25_PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Screen_Shot_2021-05-11_at_2.31.22_PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Screen_Shot_2021-05-11_at_2.32.15_PM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 498d2d6

@vercel
Copy link

@vercel vercel bot commented on 498d2d6 May 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.