Hot answers tagged

6

This is the way I would do it. Data needs to be Association, not list, when you label by the whole batches and not single objects. A good training set has varying data, not almost identical. Hence, carefully design Graphics so circles and lines are different sizes and in different places. You can also add noise (like random points), but I did not do it for ...


5

Look at your data: If you try a least square fit to this data, MMA mainly tries to fit the leftmost end because that is where the large errors are. Therefore you must in some way tell MMA, that the errors at the left end are less important. That is you need a weighted fit. In FindFit you may specify a norm function, that the actual error to be minimized ...


4

If you need to compute all 16 (4×4) integrals and then extract the diagonal elements, use Diagonal: Diagonal[angdist3[#, 0.3] & /@ a] {100707., 71762., 25625.6, 13508.} You could instead compute only those 4 results. MapThread will map over both a and b simultaneously: MapThread[angdist[#1, #2, 0.3] &, {a, b}] {100707., 71762., 25625.6, 13508.} ...


3

If in your original dataset you had retained the large values associated with $R<3$, then @DanielHuber 's approach is a good one (which is one way to account for varying precision of the observations). But with your modified dataset with $R\geq 3$, there is less need for weighting. However, because the data and model structure induces high correlations ...


2

A pedestrian approach: implement a trapezoidal rule: i = 0; data = Data[[All, (2*i + 1) ;; (2*i + 2)]]; list = 1/2 Table[(data[[i, 2]] + data[[i + 1, 2]])*(data[[i, 1]] - data[[i + 1, 1]]), {i, 1, Length@data - 1}] // Abs; The integral of the absolute value is given by Total@list. Find the position of the first point to reach half this sum: First@data[[...


2

Update Using the provided files. Since the Excel files have no header, importing as a Dataset is not possible. The easiest way is to add headers to the Excel file and use the code from the comments. If that is not possible then classGrades = Import["~/Downloads/GG.xlsx"] // First // MapAt[Round, #, {All, 1}] & // (* Change class id to ...


Only top voted, non community-wiki answers of a minimum length are eligible