GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — shring example · WinVector/Examples@03dbea7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • rebalance
    • traj_graph_2.Rmd
    • traj_graph_2.md
    • traj_graph_2_files/figure-gfm
      • unnamed-chunk-13-1.png
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎rebalance/traj_graph_2.Rmd‎

Copy file name to clipboardExpand all lines: rebalance/traj_graph_2.Rmd
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ d_ex <- wrapr::build_frame(
4141

4242

4343
```{r}
44-
build_traj <- function(d_ex, lambda_max = 4, length.out = 100) {
44+
build_traj <- function(d_ex, lambda_max = 3, length.out = 100) {
4545
frame <- list()
4646
suppressWarnings(
4747
for(lambda in seq(0, lambda_max, length.out = length.out)) {
@@ -70,7 +70,7 @@ frame <- build_traj(d_ex)
7070

7171
```{r}
7272
want_frame <- function(frame) {
73-
check_eps = 1e-2
73+
check_eps = 0.02
7474
n_f_rows <- nrow(frame)
7575
have_cross <- FALSE
7676
have_increasing <- FALSE
@@ -100,11 +100,11 @@ want_frame <- function(frame) {
100100

101101
```{r}
102102
mk_example <- function() {
103-
d_cols <- c('x1', 'x2', 'x3', 'x4', 'y')
103+
d_cols <- c('x1', 'x2', 'y')
104104
n_rows <- 10
105105
while(TRUE) {
106106
d_ex <- data.frame(matrix(
107-
sample(seq(-5, 5), size = length(d_cols) * n_rows, replace = TRUE),
107+
sample(seq(-10, 10), size = length(d_cols) * n_rows, replace = TRUE),
108108
ncol=length(d_cols)))
109109
colnames(d_ex) <- d_cols
110110
d_ex['y'] = d_ex['y'] >= 0
Collapse file

‎rebalance/traj_graph_2.md‎

Copy file name to clipboardExpand all lines: rebalance/traj_graph_2.md
+27-27Lines changed: 27 additions & 27 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ d_ex <- wrapr::build_frame(
4545
```
4646

4747
``` r
48-
build_traj <- function(d_ex, lambda_max = 4, length.out = 100) {
48+
build_traj <- function(d_ex, lambda_max = 3, length.out = 100) {
4949
frame <- list()
5050
suppressWarnings(
5151
for(lambda in seq(0, lambda_max, length.out = length.out)) {
@@ -71,7 +71,7 @@ frame <- build_traj(d_ex)
7171

7272
``` r
7373
want_frame <- function(frame) {
74-
check_eps = 1e-2
74+
check_eps = 0.02
7575
n_f_rows <- nrow(frame)
7676
have_cross <- FALSE
7777
have_increasing <- FALSE
@@ -98,11 +98,11 @@ want_frame <- function(frame) {
9898

9999
``` r
100100
mk_example <- function() {
101-
d_cols <- c('x1', 'x2', 'x3', 'x4', 'y')
101+
d_cols <- c('x1', 'x2', 'y')
102102
n_rows <- 10
103103
while(TRUE) {
104104
d_ex <- data.frame(matrix(
105-
sample(seq(-5, 5), size = length(d_cols) * n_rows, replace = TRUE),
105+
sample(seq(-10, 10), size = length(d_cols) * n_rows, replace = TRUE),
106106
ncol=length(d_cols)))
107107
colnames(d_ex) <- d_cols
108108
d_ex['y'] = d_ex['y'] >= 0
@@ -123,34 +123,34 @@ cat(wrapr::draw_frame(d_ex))
123123
```
124124

125125
## d_ex <- wrapr::build_frame(
126-
## "x1" , "x2", "x3", "x4", "y" |
127-
## -4L , 4L , 0L , -2L , TRUE |
128-
## 3L , -5L , -1L , -1L , TRUE |
129-
## 1L , -3L , -1L , -3L , TRUE |
130-
## -5L , -2L , -3L , -5L , TRUE |
131-
## 4L , -3L , 1L , -5L , FALSE |
132-
## -1L , 3L , 2L , -3L , TRUE |
133-
## 2L , 2L , -2L , -2L , FALSE |
134-
## -5L , 3L , -3L , 5L , TRUE |
135-
## 5L , 5L , -1L , -1L , FALSE |
136-
## -2L , -5L , 2L , -4L , FALSE )
126+
## "x1" , "x2", "y" |
127+
## 4L , 4L , FALSE |
128+
## -4L , 6L , TRUE |
129+
## 10L , -5L , FALSE |
130+
## -9L , -8L , FALSE |
131+
## 6L , 0L , FALSE |
132+
## 3L , -8L , TRUE |
133+
## -7L , 6L , TRUE |
134+
## 6L , 9L , FALSE |
135+
## 5L , -1L , FALSE |
136+
## 9L , 8L , FALSE )
137137

138138
``` r
139139
knitr::kable(d_ex)
140140
```
141141

142-
| x1 | x2 | x3 | x4 | y |
143-
|----:|----:|----:|----:|:------|
144-
| -4 | 4 | 0 | -2 | TRUE |
145-
| 3 | -5 | -1 | -1 | TRUE |
146-
| 1 | -3 | -1 | -3 | TRUE |
147-
| -5 | -2 | -3 | -5 | TRUE |
148-
| 4 | -3 | 1 | -5 | FALSE |
149-
| -1 | 3 | 2 | -3 | TRUE |
150-
| 2 | 2 | -2 | -2 | FALSE |
151-
| -5 | 3 | -3 | 5 | TRUE |
152-
| 5 | 5 | -1 | -1 | FALSE |
153-
| -2 | -5 | 2 | -4 | FALSE |
142+
| x1 | x2 | y |
143+
|----:|----:|:------|
144+
| 4 | 4 | FALSE |
145+
| -4 | 6 | TRUE |
146+
| 10 | -5 | FALSE |
147+
| -9 | -8 | FALSE |
148+
| 6 | 0 | FALSE |
149+
| 3 | -8 | TRUE |
150+
| -7 | 6 | TRUE |
151+
| 6 | 9 | FALSE |
152+
| 5 | -1 | FALSE |
153+
| 9 | 8 | FALSE |
154154

155155
``` r
156156
frame <- build_traj(d_ex)
Collapse file

‎rebalance/traj_graph_2_files/figure-gfm/unnamed-chunk-13-1.png‎

Copy file name to clipboard
-1.38 KB
  • Display the source diff
  • Display the rich diff
Loading

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.