-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add inclusive exclusive clause to sep data
- Loading branch information
Showing
3 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import numpy as np | ||
import pwlf | ||
|
||
x = np.array((0.0,1.0,1.5,2.0)) | ||
y = np.array((0.0,1.0,1.1,1.5)) | ||
|
||
my_fit1 = pwlf.piecewise_lin_fit(x,y) | ||
x0 = x.copy() | ||
# check that I can fit when break poitns spot on a | ||
ssr = my_fit1.fitWithBreaks(x0) | ||
|
||
# check that i can fit when I slightly modify x0 | ||
my_fit2 = pwlf.piecewise_lin_fit(x,y) | ||
x0[1] = 1.00001 | ||
x0[2] = 1.50001 | ||
ssr2 = my_fit2.fitWithBreaks(x0) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters