dataprofessor / code Goto Github PK
View Code? Open in Web Editor NEWCompilation of R and Python programming codes on the Data Professor YouTube channel.
Home Page: http://youtube.com/dataprofessor
Compilation of R and Python programming codes on the Data Professor YouTube channel.
Home Page: http://youtube.com/dataprofessor
@dataprofessor How well will the current regression model perform on new drugs? On what type of data points(new chemicals) do you think from your perspective the model will perform badly?
colors = ['green', 'mustard', 'khaki']
for index in range(len(colors)):
print('Current color:', s[index])
print("Goodbye!")
Please help me to create a code
Hello, I am seeking help with issue installing R magick
package on google colab. First, I tried to do it in general way:
install.packages("magick")
and I get the output as follows:
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning message in install.packages("magick"):
“installation of package ‘magick’ had non-zero exit status”
None of alternative solutions that I have found on kaggle like this one or this one worked in my case.
Can you please help me to figure out, what is the problem?
i need help
error message appears related to the lazypredict (and sklearn conflictions?)
cannot import name '_raise_dep_warning_if_not_pytest' from 'sklearn.utils.deprecation' (C:\Users\USER\anaconda3\lib\site-packages\sklearn\utils\deprecation.py)
How do i fix this error in R code on VS code any tips would help a ton.
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
@dataprofessor
If the code is run as is, it will display an error when building the Random Forest Model:
"Error in y - ymean : non-numeric argument to binary operator
In addition: Warning messages:..."
That is because the "Species" column in the TrainSet
is passed as char
Therefore, the model cannot be created and the app can't be run.
To solve it, we just need to pass the "Species" column to the TrainSet as factor after line 24:
TrainSet <- read.csv("training.csv", header = TRUE)
str(TrainSet)
#Since here "Species" is a char column,
#we convert it to a factor
TrainSet[,"Species"] <- as.factor(TrainSet[,"Species"])
TrainSet <- TrainSet[,-1]
str(TrainSet)
#Now "Species" is a factor with three levels ;)
This will keep the Sepal and Petal Length and Width as num, but turn the Species into a 3 - level factor.
Thanks for all of your lessons!
jzambrano-xyz
Hello @dataprofessor, I just started to follow the "Web Apps in R: Build BMI Calculator web application in R for health monitoring | Shiny Tutorial Ep 5" tutorial. I´ve tried "run app" to get the pop-up window from the video and I encounter a problem:
Loading required package: shiny
Warning: package ‘shiny’ was built under R version 4.0.4
Warning: package ‘shinythemes’ was built under R version 4.0.5
Warning in file(con, "r") :
cannot open file 'about.md': No such file or directory
Error in file(con, "r") : cannot open the connection
I already tried "help">"check updates" and quitting but I only get a "you are using the newest version of R studio" message. Should I delete my current R and download directly the latest version? seems that the updates were not taken in my R studio.
Thanks a lot for your feedback :)
/usr/local/lib/python3.6/dist-packages/rpy2/robjects/pandas2ri.py:14: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import Index as PandasIndex
/usr/local/lib/python3.6/dist-packages/rpy2/robjects/pandas2ri.py:34: UserWarning: pandas >= 1.0 is not supported.
warnings.warn('pandas >= 1.0 is not supported.')
I have reviewed one of your Youtube video about how to import python packages into R but i met some problems when i doing the following.
library(reticulate)
reticulate::py_install(packages = "umap-learn")
repl_python()
import os
import umap
It's ok to do with import os but import umap gets my RStudio aborted
Reticulate is version: 1.24
R version 4.1.2
OS: Windows
Python version: 3.8.13
Pls can you help me figure out what's going wrong
Professor I would like to get exercises to practice EDA in R. I'm new in this environment, I've been taking some courses and I'd like to practice.
I am in a class work in which I must develop a program in a virtual environment. My choice was '' Google Colab '', but when trying to activate my environment it always gives an error.
! conda create --name metawraptest-env python=3.7.10
WARNING: A conda environment already exists at '/usr/local/envs/metawraptest-env'
Remove existing environment (y/[n])? y
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /usr/local/envs/metawraptest-env
added / updated specs:
- python=3.7.10
The following NEW packages will be INSTALLED:
_libgcc_mutex pkgs/main/linux-64::_libgcc_mutex-0.1-main
ca-certificates pkgs/main/linux-64::ca-certificates-2021.4.13-h06a4308_1
certifi pkgs/main/linux-64::certifi-2020.12.5-py37h06a4308_0
ld_impl_linux-64 pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
libffi pkgs/main/linux-64::libffi-3.3-he6710b0_2
libgcc-ng pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
ncurses pkgs/main/linux-64::ncurses-6.2-he6710b0_1
openssl pkgs/main/linux-64::openssl-1.1.1k-h27cfd23_0
pip pkgs/main/linux-64::pip-21.0.1-py37h06a4308_0
python pkgs/main/linux-64::python-3.7.10-hdb3f193_0
readline pkgs/main/linux-64::readline-8.1-h27cfd23_0
setuptools pkgs/main/linux-64::setuptools-52.0.0-py37h06a4308_0
sqlite pkgs/main/linux-64::sqlite-3.35.4-hdfb4753_0
tk pkgs/main/linux-64::tk-8.6.10-hbc83047_0
wheel pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
xz pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate metawraptest-env
#
# To deactivate an active environment, use
#
# $ conda deactivate
But, when activating my environment, this appears:
$ conda activate metawraptest-env
File "<ipython-input-45-dbbb19337d51>", line 1
$ conda activate metawraptest-env
^
SyntaxError: invalid syntax
Or this from here:
! conda activate metawraptest-env
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
I tried to use '' Shell '', but it also gave error when using
$ conda init <SHELL_NAME>
File "<ipython-input-46-248a41531067>", line 1
$ conda init <SHELL_NAME>
^
SyntaxError: invalid syntax
The environment was created, but I can't activate it...
! conda env list
# conda environments:
#
base * /usr/local
metawraptest-env /usr/local/envs/metawraptest-env
I have created a virtual environment using Miniconda but still, it's showing the same error again and again. Please help as I'm unavailable to run the code.
Dear Professor,
I need machine learning code of more than 2 or more dependent variables.
Thanks
Ayesha
iris <- read.csv(text = getURL("https://raw.githubusercontent.com/dataprofessor/data/master/iris.csv") )
Error in function (type, msg, asError = TRUE) :
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.