Two final exercises, ML optional part and course evaluation form

Two final exercises, ML optional part and course evaluation form

de Antonello Lobianco -
Número de respuestas: 8

Hello everyone, I hope you had a great Easter holiday.

I was just browsing the course logs and noticed that while most of you did submit the quizzes, there are still no submissions of the two final exercises, the forest growth fitting problem and the profit maximisation problem.

As again this is the first run of the course, please let me know if there is any problem with them, if they are too "difficult" or at the opposite too boring, or just if they require too much time from you. I designed the two exercises to be the simplest possible for the tasks I wanted to highlight, and while the specific applications in the exercise may be out of your interest, the general methods to wrangle data in Julia, perform general curve fitting or solve contained optimisation problems surely will apply also to your specific domain.

All the tasks in the exercises should have been covered in the segments of the second unit Scientific programming with Julia.

I have re-read my own-written instructions in the exercise and indeed some are not super clear sonrisa sonrisa

I do invite you to start the exercise and if you are stuck on some point just ask in the forum.. provided I get notified by Arche, I should reply to you shortly and the clarification would be helpful to the others of you....

The course will end with the submission of these two exercises (currently the deadline is Sunday the 1st of May for both, let me know if you need more time). The original "concept" for this course includes a part on introductory Machine Learning. I have added the resolution of the 3 exercises on ML to the course ARCHE pages. While not part of this course, feel free to submit these exercises if you are interested in the subject or ask in the forum, I'll try to respond to these topics as well. For the way that Arche is implemented at the UL (courses are reset every year instead of what on my opinion would be better, duplicated on different years) everything in the course, including your contributions, will remain available on Arche until 31 August but then it will be lost. However, after that date, you can still refer to the public side of the course, which I am still completing by adding the quizzes and exercises, but will be done well before the summer.

Finally, you may have noticed that an (anonymous) feedback form is available on the course site. When you have 5 minutes, please fill it out, it is very important for me to understand the issues the course raises and how to address them..


Have a nice day,

   Antonello


En respuesta a Antonello Lobianco

Re: Two final exercises, ML optional part and course evaluation form

de Cristobal Eduardo Carreno-Mosqueira -
Hello everyone,

I have the following questions about forest growth fitting problem:
Q1: When I calculate the filter_nTrees results in boolean vector with missing type data, but the other filters are bit vector, so it is necessary to transform boolean data and missing data into bit vector. I did this using "ismissing" function, is this correct?
Q2: The filter_overall, I suppose must be applied to points data frame and obtain the filtered data, but there's no instruction about that. can you clarify this point?
Q3: if we supposed points.cac and points.vHa are the data for fitting step, points.cac is the independent variable, and points.vHa is dependent variable, so there are a lot of same values of points.cac have different values at points.vHa delivers a strange plot like this:
plot
 I think this is not correct, the dispersion is big. These variables I've taken are wrong?s

Best regards

En respuesta a Cristobal Eduardo Carreno-Mosqueira

Re: Two final exercises, ML optional part and course evaluation form

de Antonello Lobianco -
Hello,
Q1: When I calculate the filter_nTrees results in boolean vector with missing type data, but the other filters are bit vector, so it is necessary to transform boolean data and missing data into bit vector. I did this using "ismissing" function, is this correct?
There should be no missing data involved in this exercise. Check how you arrived to get them.
Q2: The filter_overall, I suppose must be applied to points data frame and obtain the filtered data, but there's no instruction about that. can you clarify this point?
Query the new public course site with the keyword "boolean selection": https://sylvaticus.github.io/SPMLJ/stable/search.html?q=boolean+selection
Q3: if we supposed points.cac and points.vHa are the data for fitting step, points.cac is the independent variable, and points.vHa is dependent variable, so there are a lot of same values of points.cac have different values at points.vHa delivers a strange plot like this:
You are correct. The actual result is only a little bit "better" because we filter out some odd cases, but still there is a lot of heterogeneity. But that's absolutely normal. We are plotting sampling plots of different trees species, in different regions, altitudes and soil qualities, the variance is huge. Still, you can fit an overall logistic curve, but of course, more you segment your data lower the variance you'll get. Perhaps an exercise for next year guiño
En respuesta a Antonello Lobianco

Re: Two final exercises, ML optional part and course evaluation form

de Cristobal Eduardo Carreno-Mosqueira -
Hello to everyone, I'm stuck in step 8 of "profit maximisation problem", I understood it is necessary to select the activities with an integer column equal to one, but I still don't understand the syntax of "set_integer(x[a])" and even I don't know what is variable "a". My idea is just to code "set_integer(x[a in 1:nA]". Professor, can you clarify this point?

Thank you
Best regards
En respuesta a Cristobal Eduardo Carreno-Mosqueira

Re: Two final exercises, ML optional part and course evaluation form

de Antonello Lobianco -
Hello, sorry, `a` is just a whatever index, I should have written `x[i]`.
The problem is that you want to set as integer only the activities for which `activities. integer` is equal to 1. If you code `set_integer(x[a in 1:nA])` (actually I think you mean `set_integer.(x[1:nA])` ) you would set all the activities as integer !
The simplest way is to just use a for loop I think. Don't be afraid of using loops in Julia, they are fast.
En respuesta a Antonello Lobianco

Re: Two final exercises, ML optional part and course evaluation form

de Cristobal Eduardo Carreno-Mosqueira -
Hello again, I followed your advice and I got these results:
- for integer variables:
x[1] >= 0.0
x[2] >= 0.0
x[3] >= 0.0
x[4] >= 0.0
x[5] >= 0.0
x[6] >= 0.0
x[7] >= 0.0
x[8] >= 0.0
x[9] >= 0.0
x[10] >= 0.0
x[11] >= 0.0
x[12] >= 0.0
x[8] integer
x[9] integer
x[10] integer

- Optimization problem results:
* Exploit Coppices: 3.9999999999999996
* Exploit High Forest: 4.440892098500626e-16
* Sell Fuelwood: 1000.0
* Sell Industrial Wood: 0.0
* Buy liquidity: 55000.0
* Sell liquidity: 0.0
* Rent workers: 0.0
* Buy Chain saw: 6.0
* Buy Tractor: 2.0
* Buy Full-logging eq.: 0.0
* Buy coppices Stumpage: 3.9999999999999996
* Buy High forest Stumpage: 4.440892098500626e-16

I did the correct way?
Have a nice day!
En respuesta a Antonello Lobianco

Re: Two final exercises, ML optional part and course evaluation form

de Antonello Lobianco -
Hello everyone, just a gentle reminder concerning the deadline for the last two exercises of the course, Sunday evening at (23:59).
Also, please fill out the course evaluation form, it's important for me to understand your needs, and I have already received important feedback, thank you to those of you that already submitted it.

Best regards,
Antonello
En respuesta a Antonello Lobianco

Re: Two final exercises, ML optional part and course evaluation form

de Antonello Lobianco -
At the request of some of you, I extended the deadline of Quizzes 1.11, 1.12 and 1.13 and the two exercises to Sunday 8 May 23:59.
This time I will not be able to extend it further, as I need to provide the list of students to the UL.
Thank you for your comprehension and best regards, /Antonello